Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
F
fumoc_sale
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Le Filament
Fumaison Occitane
fumoc_sale
Validations
4576bef8
Valider
4576bef8
rédigé
Il y a 3 ans
par
Rémi - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
[ADD] available quants on lots
parent
e777926b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
2
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
models/stock_production_lot.py
+10
-0
10 ajouts, 0 suppression
models/stock_production_lot.py
views/stock_move_line.xml
+16
-1
16 ajouts, 1 suppression
views/stock_move_line.xml
avec
26 ajouts
et
1 suppression
models/stock_production_lot.py
+
10
−
0
Voir le fichier @
4576bef8
# Copyright 2021 Le Filament (<http://www.le-filament.com>)
# Copyright 2017 Open For Small Business Ltd
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import
datetime
import
re
...
...
@@ -60,3 +61,12 @@ class FumocStockProductionLot(models.Model):
for
field
,
value
in
dates_dict
.
items
():
setattr
(
self
,
field
,
value
)
# function copied from https://github.com/odoonz/odoonz-addons/tree/14.0/stock_prodlot_qty
# Copyright 2017 Open For Small Business Ltd
def
name_get
(
self
):
res
=
super
().
name_get
()
if
self
.
env
.
context
.
get
(
"
show_qty
"
):
res
=
self
.
browse
([
r
[
0
]
for
r
in
res
]).
mapped
(
lambda
r
:
(
r
.
id
,
r
.
name
+
"
(en stock : %.0f)
"
%
r
.
product_qty
)
)
return
res
Ce diff est replié.
Cliquez pour l'agrandir.
views/stock_move_line.xml
+
16
−
1
Voir le fichier @
4576bef8
...
...
@@ -10,13 +10,28 @@
<field
name=
"inherit_id"
ref=
"product_expiry.view_stock_move_line_detailed_operation_tree_expiry"
/>
<field
name=
"priority"
eval=
"8"
/>
<field
name=
"arch"
type=
"xml"
>
<field
name=
"lot_id"
position=
"attributes"
>
<attribute
name=
"context"
>
{'default_product_id': product_id, 'default_company_id': company_id, 'active_picking_id': picking_id, 'show_qty': True}
</attribute>
</field>
<xpath
expr=
"//field[@name='expiration_date']"
position=
"attributes"
>
<attribute
name=
"string"
>
DLC
</attribute>
<attribute
name=
"attrs"
>
{'column_invisible': [('parent.show_lots_text', '=', True)]}
</attribute>
<attribute
name=
"attrs"
>
{'column_invisible': [('parent.show_lots_text', '=',
True)], 'readonly': [('picking_type_use_existing_lots', '=',
True)]}
</attribute>
<attribute
name=
"widget"
>
date
</attribute>
</xpath>
</field>
</record>
<record
id=
"fumoc_stock_move_line_operation_tree_inherit"
model=
"ir.ui.view"
>
<field
name=
"name"
>
fumoc_sale.stock.move.line.op.tree
</field>
<field
name=
"model"
>
stock.move.line
</field>
<field
name=
"inherit_id"
ref=
"product_expiry.view_stock_move_line_operation_tree_expiry"
/>
<field
name=
"priority"
eval=
"8"
/>
<field
name=
"arch"
type=
"xml"
>
<field
name=
"lot_id"
position=
"attributes"
>
<attribute
name=
"context"
>
{'default_product_id': parent.product_id, 'default_company_id': parent.company_id, 'active_picking_id': picking_id, 'show_qty': True}
</attribute>
</field>
</field>
</record>
</data>
</odoo>
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter