del states in serial for view tree edit serial
This commit is contained in:
parent
7e7ce08625
commit
40204302f4
@ -20,6 +20,10 @@ class OpticalEquipment(Workflow, ModelSQL, ModelView):
|
|||||||
'readonly': Eval('state') != 'draft',
|
'readonly': Eval('state') != 'draft',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_states_serial={
|
||||||
|
'readonly': Eval('state') != 'draft',
|
||||||
|
}
|
||||||
|
|
||||||
code = fields.Char(
|
code = fields.Char(
|
||||||
"Code", select=True,states={'readonly': True })
|
"Code", select=True,states={'readonly': True })
|
||||||
|
|
||||||
@ -75,7 +79,7 @@ class OpticalEquipment(Workflow, ModelSQL, ModelView):
|
|||||||
warranty = fields.Integer("Warranty",
|
warranty = fields.Integer("Warranty",
|
||||||
states=_states,)
|
states=_states,)
|
||||||
serial = fields.Char("Serial", size=None,
|
serial = fields.Char("Serial", size=None,
|
||||||
states=_states,)
|
states=_states_serial,)
|
||||||
health_register = fields.Char("Health Register", size=None,
|
health_register = fields.Char("Health Register", size=None,
|
||||||
states=_states,)
|
states=_states,)
|
||||||
|
|
||||||
@ -90,7 +94,7 @@ class OpticalEquipment(Workflow, ModelSQL, ModelView):
|
|||||||
depends=['propietary'])
|
depends=['propietary'])
|
||||||
|
|
||||||
|
|
||||||
del _states
|
del _states_serial
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
this repository contains the full copyright notices and license terms.-->
|
this repository contains the full copyright notices and license terms.-->
|
||||||
<tree editable="1">
|
<tree editable="1">
|
||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
|
<field name="state"/>
|
||||||
<field name="company"/>
|
<field name="company"/>
|
||||||
<field name="location"/>
|
<field name="location"/>
|
||||||
<field name="propietary"/>
|
<field name="propietary"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user