diff --git a/l10n_do_rnc_validation/__manifest__.py b/l10n_do_rnc_validation/__manifest__.py index cfc6f2f..081429c 100644 --- a/l10n_do_rnc_validation/__manifest__.py +++ b/l10n_do_rnc_validation/__manifest__.py @@ -15,5 +15,5 @@ "views/res_config_settings_views.xml", "data/ir_config_parameter_data.xml", ], - "installable": False, + "installable": True, } diff --git a/l10n_do_rnc_validation/models/res_partner.py b/l10n_do_rnc_validation/models/res_partner.py index 06dbfe7..b066e02 100644 --- a/l10n_do_rnc_validation/models/res_partner.py +++ b/l10n_do_rnc_validation/models/res_partner.py @@ -15,20 +15,7 @@ class ResPartner(models.Model): _inherit = "res.partner" - - @api.model - def name_search(self, name, args=None, operator="ilike", limit=100): - res = super(ResPartner, self).name_search( - name, args=args, operator=operator, limit=100 - ) - if not res and name: - if len(name) in (9, 11): - partners = self.search([("vat", "=", name)]) - else: - partners = self.search([("vat", "ilike", name)]) - if partners: - res = partners.name_get() - return res + _rec_names_search = ['name', 'vat'] @api.model def get_contact_data(self, vat): diff --git a/l10n_do_rnc_validation/views/res_config_settings_views.xml b/l10n_do_rnc_validation/views/res_config_settings_views.xml index ff16bca..a3acda6 100644 --- a/l10n_do_rnc_validation/views/res_config_settings_views.xml +++ b/l10n_do_rnc_validation/views/res_config_settings_views.xml @@ -6,18 +6,18 @@ - - - + + + - + Get Contact data from Indexa API - +