add field classification
This commit is contained in:
parent
4085f1f1f3
commit
c6cde38869
|
@ -24,6 +24,12 @@ NEW_MEDIA = new_sel = [
|
|||
('supersalud', 'Supersalud'),
|
||||
]
|
||||
|
||||
CLASSIFICATION = new_sel = [
|
||||
('', ''),
|
||||
('riesgo_vida', 'Riesgo de Vida'),
|
||||
('regular', 'Regular'),
|
||||
]
|
||||
|
||||
|
||||
class ReceiverService(ModelSQL, ModelView):
|
||||
'Receicer Service'
|
||||
|
@ -111,6 +117,10 @@ class CustomerService(metaclass=PoolMeta):
|
|||
'customer_service', 'Receivers')
|
||||
others_receivers_string = fields.Function(fields.Char('Others Receicers'),
|
||||
'get_others_receivers_string')
|
||||
classification = fields.Selection(CLASSIFICATION, 'Classification', states={
|
||||
'required': (Eval('media') == 'supersalud'),
|
||||
'invisible': (Eval('media') != 'supersalud'),
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
|
|
|
@ -88,6 +88,11 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="receiver" widget="selection"/>
|
||||
<separator id="process" string="Process" colspan="4"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/group[@id='info_case']/field[@name='media']"
|
||||
position="after">
|
||||
<label name="classification"/>
|
||||
<field name="classification" widget="selection"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/notebook/page[@id='summary']/field[@name='diagnose']"
|
||||
position="replace">
|
||||
</xpath>
|
||||
|
|
Loading…
Reference in New Issue