diff --git a/customer_service.py b/customer_service.py index 4945537..58673f1 100644 --- a/customer_service.py +++ b/customer_service.py @@ -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): diff --git a/view/customer_service_form.xml b/view/customer_service_form.xml index 312eb39..7ec4c3f 100644 --- a/view/customer_service_form.xml +++ b/view/customer_service_form.xml @@ -88,6 +88,11 @@ this repository contains the full copyright notices and license terms. --> + +