This commit is contained in:
Raimon Esteve 2021-09-22 13:03:31 +02:00
parent ae5ce1d129
commit 5548ff0bbe
7 changed files with 8 additions and 9 deletions

View File

@ -1152,7 +1152,7 @@ msgstr ""
msgctxt "model:ir.message,text:msg_uom_not_fit"
msgid ""
"Inputs from Production template \"%(producttion)s\" must be of uom "
"\"%(uom)s\" and we have \"%(uoms)s.\" ."
"\"%(uom)s\" and we have \"%(uoms)s\" ."
msgstr ""
"Les entrades de la plantilla de producció \"%(production)s\" ha de tenir la "
"uom \"%(uom)s\" i ens trobem \"%(uoms)\"."

View File

@ -1152,7 +1152,7 @@ msgstr ""
msgctxt "model:ir.message,text:msg_uom_not_fit"
msgid ""
"Inputs from Production template \"%(producttion)s\" must be of uom "
"\"%(uom)s\" and we have \"%(uoms)s.\" ."
"\"%(uom)s\" and we have \"%(uoms)s\" ."
msgstr ""
"Las entradas de la plantilla de producción solo puede contener productos con"
" uom \"%(uom)s\" i nos encontramos \"%(uoms)s\"."

View File

@ -13,7 +13,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="text">Product "%(product)s" cannot have more than one Variety because of its agronomic type.</field>
</record>
<record model="ir.message" id="msg_uom_not_fit">
<field name="text">Inputs from Production template "%(producttion)s" must be of uom "%(uom)s" and we have "%(uoms)s." .</field>
<field name="text">Inputs from Production template "%(producttion)s" must be of uom "%(uom)s" and we have "%(uoms)s".</field>
</record>
</data>
</tryton>

View File

@ -8,6 +8,7 @@ from trytond.i18n import gettext
from decimal import Decimal
from trytond.transaction import Transaction
class ProductionTemplate(ModelSQL, ModelView):
"Produciton Template"
__name__ = 'production.template'
@ -19,13 +20,10 @@ class ProductionTemplate(ModelSQL, ModelView):
quantity = fields.Float('Quantity',
digits=(16, Eval('unit_digits', 2)),
depends=['unit_digits'])
inputs = fields.Many2Many('production.template.inputs-product.template',
'production_template', 'template', "Inputs")
outputs = fields.Many2Many('production.template.outputs-product.template',
'production_template', 'template', "Outputs")
enology_products = fields.One2Many('production.template.line',
'production_template', 'Complementary Products')
pass_feature = fields.Boolean('Pass on Feature')
@ -155,6 +153,7 @@ class Production(metaclass=PoolMeta):
delete = []
outputs = []
delete_outputs = []
for production in productions:
if not production.production_template:
continue
@ -265,6 +264,7 @@ class Production(metaclass=PoolMeta):
Move.save(moves)
super().done(productions)
class OutputDistribution(ModelSQL, ModelView):
'Output Distribution'
__name__ = 'production.output.distribution'

View File

@ -61,7 +61,6 @@
<field name="res_model">production.template.line</field>
</record>
<!-- Production Output Distribution -->
<record model="ir.ui.view" id="production_output_distribution_view_form">
<field name="model">production.output.distribution</field>

View File

@ -9,5 +9,5 @@ this repository contains the full copyright notices and license terms. -->
<field name="final_quantity"/>
<field name="produced_quantity"/>
<field name="production_state"/>
<field name="initial_quantity" invisible="1"/>
<field name="initial_quantity" tree_invisible="1"/>
</tree>

View File

@ -2,7 +2,7 @@
# the full copyright notices and license terms.
from trytond.model import fields, Model
from trytond.pool import Pool
from trytond.pyson import Bool, Eval
from trytond.pyson import Eval
from trytond.transaction import Transaction
__all__ = ['WineMixin']