Skip to content

Commit

Permalink
Merge pull request #190 from indexa-git/16.0-mig-002-jc
Browse files Browse the repository at this point in the history
[16.0][MIG] l10n_do_rnc_validation: v16 migration
  • Loading branch information
fernando-pcg authored Aug 12, 2024
2 parents 60d8b91 + 5b98fdf commit 21589fd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 92 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ jobs:
with:
repository: indexa-git/l10n-dominicana
path: l10n-dominicana
# TODO change this to ${{ env.GITHUB_BASE_REF_SLUG || env.GITHUB_REF_SLUG }}
ref: '${{ env.GITHUB_BASE_REF_SLUG || env.GITHUB_REF_SLUG }}'

- name: Select Odoo modules to install
Expand Down
2 changes: 1 addition & 1 deletion l10n_do_rnc_validation/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"views/res_config_settings_views.xml",
"data/ir_config_parameter_data.xml",
],
"installable": False,
"installable": True,
}
37 changes: 9 additions & 28 deletions l10n_do_rnc_validation/i18n/es_DO.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-10-22 23:41+0000\n"
"PO-Revision-Date: 2021-10-22 19:42-0400\n"
"POT-Creation-Date: 2024-03-26 19:32+0000\n"
"PO-Revision-Date: 2024-03-26 15:33-0400\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: es_DO\n"
"X-Generator: Poedit 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.4.2\n"

#. module: l10n_do_rnc_validation
#: model:ir.model,name:l10n_do_rnc_validation.model_res_company
Expand All @@ -32,43 +32,23 @@ msgstr "Opciones de configuración"
msgid "Contact"
msgstr "Contacto"

#. module: l10n_do_rnc_validation
#: model:ir.model.fields,field_description:l10n_do_rnc_validation.field_res_company__display_name
#: model:ir.model.fields,field_description:l10n_do_rnc_validation.field_res_config_settings__display_name
#: model:ir.model.fields,field_description:l10n_do_rnc_validation.field_res_partner__display_name
msgid "Display Name"
msgstr "Nombre mostrado"

#. module: l10n_do_rnc_validation
#: model_terms:ir.ui.view,arch_db:l10n_do_rnc_validation.res_config_settings_view_form_inherited
msgid "Get Contact data from Indexa API"
msgstr "Obtener datos de contacto de la API de Indexa"

#. module: l10n_do_rnc_validation
#: model:ir.model.fields,field_description:l10n_do_rnc_validation.field_res_company__id
#: model:ir.model.fields,field_description:l10n_do_rnc_validation.field_res_config_settings__id
#: model:ir.model.fields,field_description:l10n_do_rnc_validation.field_res_partner__id
msgid "ID"
msgstr "ID (identificación)"

#. module: l10n_do_rnc_validation
#: model_terms:ir.ui.view,arch_db:l10n_do_rnc_validation.res_config_settings_view_form_inherited
msgid "Indexa API RNC data"
msgstr "Datos de Indexa API RNC"

#. module: l10n_do_rnc_validation
#: model:ir.model.fields,field_description:l10n_do_rnc_validation.field_res_company____last_update
#: model:ir.model.fields,field_description:l10n_do_rnc_validation.field_res_config_settings____last_update
#: model:ir.model.fields,field_description:l10n_do_rnc_validation.field_res_partner____last_update
msgid "Last Modified on"
msgstr "Última modificación en"

#. module: l10n_do_rnc_validation
#: model_terms:ir.ui.view,arch_db:l10n_do_rnc_validation.l10n_do_external_validation_rnc_view_partner_form
msgid "Name, RNC or Cédula"
msgstr "Nombre, RNC o Cédula"

#. module: l10n_do_rnc_validation
#. odoo-python
#: code:addons/l10n_do_rnc_validation/models/res_partner.py:0
#, python-format
msgid "No serializable data from API response"
Expand All @@ -77,9 +57,10 @@ msgstr "No hay datos serializables de la respuesta de la API"
#. module: l10n_do_rnc_validation
#: model_terms:ir.ui.view,arch_db:l10n_do_rnc_validation.l10n_do_external_validation_rnc_view_res_partner_filter
msgid "RNC/Cédula"
msgstr ""
msgstr "RNC/Cédula"

#. module: l10n_do_rnc_validation
#. odoo-python
#: code:addons/l10n_do_rnc_validation/models/res_partner.py:0
#, python-format
msgid "RNC/Cédula %s is already assigned to %s"
Expand Down

This file was deleted.

15 changes: 1 addition & 14 deletions l10n_do_rnc_validation/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 21589fd

Please sign in to comment.