#047689 fix allowed_enology_product function
This commit is contained in:
parent
b2a2fa19d7
commit
0cc6648220
|
@ -832,7 +832,7 @@ msgstr "Varietat"
|
|||
|
||||
msgctxt "field:production,allowed_enology_products:"
|
||||
msgid "Allowed Enology Products"
|
||||
msgstr "Productes vinícules permesos"
|
||||
msgstr "Productes vinícoles permesos"
|
||||
|
||||
msgctxt "field:production,allowed_output_products:"
|
||||
msgid "Allowed Output Products"
|
||||
|
@ -852,7 +852,7 @@ msgstr "Distribució de costos"
|
|||
|
||||
msgctxt "field:production,enology_products:"
|
||||
msgid "Enology Products"
|
||||
msgstr "Productes Vinícules"
|
||||
msgstr "Productes Vinícoles"
|
||||
|
||||
msgctxt "field:production,output_distribution:"
|
||||
msgid "Output Distribution"
|
||||
|
@ -1177,7 +1177,7 @@ msgstr "Preus de la Distribució de costos"
|
|||
|
||||
msgctxt "model:ir.action,name:act_production_enology_product_tree"
|
||||
msgid "Production Enology Product"
|
||||
msgstr "Productes Vinícules"
|
||||
msgstr "Productes Vinícoles"
|
||||
|
||||
msgctxt "model:ir.action,name:act_production_output_distribution_tree"
|
||||
msgid "Production Output Distribution"
|
||||
|
@ -1411,7 +1411,7 @@ msgstr ""
|
|||
|
||||
msgctxt "model:production.enology.product,name:"
|
||||
msgid "Production Enology Product"
|
||||
msgstr "Productes Vinícules"
|
||||
msgstr "Productes Vinícoles"
|
||||
|
||||
msgctxt "model:production.output.distribution,name:"
|
||||
msgid "Output Distribution"
|
||||
|
|
|
@ -195,8 +195,8 @@ class Production(metaclass=PoolMeta):
|
|||
products = []
|
||||
if not self.production_template:
|
||||
return []
|
||||
for template in self.production_template.inputs:
|
||||
products += template.products
|
||||
for x in self.production_template.inputs:
|
||||
products += x.products
|
||||
return [x.id for x in products]
|
||||
|
||||
@fields.depends('production_template')
|
||||
|
@ -286,8 +286,7 @@ class Production(metaclass=PoolMeta):
|
|||
enology_products = (production.production_template and
|
||||
production.production_template.enology_products or [])
|
||||
for enology in enology_products:
|
||||
quantity = Uom.compute_qty(enology.uom, enology.quantity,
|
||||
production.production_template.uom, round=True)
|
||||
quantity = enology.quantity
|
||||
qty = quantity * (input_quantity or 1) / template_qty
|
||||
qty = enology.uom.round(qty)
|
||||
move = production._move(production.picking_location,
|
||||
|
|
Loading…
Reference in New Issue