lims_production: lot: add relation to production origin

This commit is contained in:
Adrián Bernardi 2022-01-12 11:24:13 -03:00
parent 758d7d0819
commit 0fa927e027
4 changed files with 8 additions and 0 deletions

View File

@ -338,6 +338,10 @@ msgctxt "field:stock.lot,preparation_date:"
msgid "Preparation date"
msgstr "Fecha de preparación"
msgctxt "field:stock.lot,production:"
msgid "Production origin"
msgstr "Producción origen"
msgctxt "field:stock.lot,purity_degree:"
msgid "Purity Degree"
msgstr "Grado de pureza"

View File

@ -194,6 +194,7 @@ class Production(metaclass=PoolMeta):
production.technician else None),
solvent=(production.solvent.id if production.solvent
else None),
production=production,
)
if lot:
lot.save()

View File

@ -200,6 +200,8 @@ class Lot(metaclass=PoolMeta):
depends=['special_category'], states={
'invisible': Not(Bool(Equal(Eval('special_category'),
'input_prod')))})
production = fields.Many2One('production', 'Production origin',
readonly=True)
@classmethod
def __setup__(cls):

View File

@ -24,5 +24,6 @@
<field name="exclusive_glp"/>
<field name="solvent"/>
<field name="technician"/>
<field name="production"/>
</xpath>
</data>