diff --git a/models/res_partner.py b/models/res_partner.py index 839c2f1b4dc022a30ef5c75d9e3f03c1eb11e188..c185b5e693477baf8990897328e7eca82dfe415b 100644 --- a/models/res_partner.py +++ b/models/res_partner.py @@ -97,6 +97,7 @@ class ResPartner(models.Model): string='Payment Method', domain="[('payment_type', '=', 'inbound')]" ) + cufe = fields.Integer(string="CUFE") @api.model def _get_carrier_domain(self): diff --git a/models/res_partner_regulation.py b/models/res_partner_regulation.py index c890852ccde6444aaacc08365e0b2994c70258f6..7c4bc134e846ae39e3c84c401dd8d9f51216c139 100644 --- a/models/res_partner_regulation.py +++ b/models/res_partner_regulation.py @@ -45,7 +45,6 @@ class ResPartnerRegulation(models.Model): string="Sector / Delivery Address", domain="[('type', '=', 'delivery'), ('parent_id', '=', partner_id)]", ) - cufe = fields.Integer(string="CUFE") def _prepare_tracking_msg(self, field_name, from_value, to_value): body = """ diff --git a/views/res_partner_views.xml b/views/res_partner_views.xml index a270b93e08dbd851d5aa3382f9d8a4b9fd2bcdb8..615319cf6e7a76b85cd6fee348e1b471f5908b2b 100644 --- a/views/res_partner_views.xml +++ b/views/res_partner_views.xml @@ -192,7 +192,6 @@ <field name="regulation_type_id"/> <field name="partner_id" invisible="1"/> <field name="sector"/> - <field name="cufe"/> <field name="due_date" autocomplete="off"/> <field name="certification_file" options="{'accepted_file_extensions': '.pdf,.jpg,.jpeg,.png'}" @@ -265,6 +264,9 @@ <field name="category_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" placeholder="Etiquetas..." can_create="true" can_write="true" modifiers="{}"/> </div> </xpath> + <field name="vat" position="after"> + <field name="cufe" attrs="{'invisible': [('type','!=', 'delivery')]}"/> + </field> </field> </record>