mirror of
https://bitbucket.org/presik/trytonpsk-crm_fiduprevisora.git
synced 2023-12-14 05:33:07 +01:00
add field classification
This commit is contained in:
parent
4085f1f1f3
commit
c6cde38869
|
@ -24,6 +24,12 @@ NEW_MEDIA = new_sel = [
|
||||||
('supersalud', 'Supersalud'),
|
('supersalud', 'Supersalud'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
CLASSIFICATION = new_sel = [
|
||||||
|
('', ''),
|
||||||
|
('riesgo_vida', 'Riesgo de Vida'),
|
||||||
|
('regular', 'Regular'),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class ReceiverService(ModelSQL, ModelView):
|
class ReceiverService(ModelSQL, ModelView):
|
||||||
'Receicer Service'
|
'Receicer Service'
|
||||||
|
@ -111,6 +117,10 @@ class CustomerService(metaclass=PoolMeta):
|
||||||
'customer_service', 'Receivers')
|
'customer_service', 'Receivers')
|
||||||
others_receivers_string = fields.Function(fields.Char('Others Receicers'),
|
others_receivers_string = fields.Function(fields.Char('Others Receicers'),
|
||||||
'get_others_receivers_string')
|
'get_others_receivers_string')
|
||||||
|
classification = fields.Selection(CLASSIFICATION, 'Classification', states={
|
||||||
|
'required': (Eval('media') == 'supersalud'),
|
||||||
|
'invisible': (Eval('media') != 'supersalud'),
|
||||||
|
})
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __setup__(cls):
|
def __setup__(cls):
|
||||||
|
|
|
@ -88,6 +88,11 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="receiver" widget="selection"/>
|
<field name="receiver" widget="selection"/>
|
||||||
<separator id="process" string="Process" colspan="4"/>
|
<separator id="process" string="Process" colspan="4"/>
|
||||||
</xpath>
|
</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']"
|
<xpath expr="/form/notebook/page[@id='summary']/field[@name='diagnose']"
|
||||||
position="replace">
|
position="replace">
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
Loading…
Reference in a new issue