2
0

[16.0][IMP] Wizard to calculate vies_passed in all partners

This is the forward port of https://github.com/OCA/account-financial-tools/pull/1716

MT-1044 @moduon
This commit is contained in:
Emilio Pascual 2023-09-18 09:20:43 +02:00
parent fe7e10794f
commit 0dc84e32b1
No known key found for this signature in database
GPG Key ID: 328505B7DB49BF88
3 changed files with 60 additions and 10 deletions

View File

@ -4,8 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-18 07:12+0000\n"
"PO-Revision-Date: 2023-09-18 07:12+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -13,6 +15,16 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: base_vat_optional_vies
#: model_terms:ir.ui.view,arch_db:base_vat_optional_vies.res_config_settings_view_form
msgid "Compute check vies"
msgstr ""
#. module: base_vat_optional_vies
#: model:ir.model,name:base_vat_optional_vies.model_res_config_settings
msgid "Config Settings"
msgstr ""
#. module: base_vat_optional_vies
#: model:ir.model,name:base_vat_optional_vies.model_res_partner
msgid "Contact"
@ -27,8 +39,22 @@ msgid ""
"Note: the expected format is %(expected_format)s"
msgstr ""
#. module: base_vat_optional_vies
#: model_terms:ir.ui.view,arch_db:base_vat_optional_vies.res_config_settings_view_form
msgid ""
"This process can take a long time. Are you sure you want to start the "
"process?"
msgstr ""
#. module: base_vat_optional_vies
#: model:ir.model.fields,field_description:base_vat_optional_vies.field_res_partner__vies_passed
#: model:ir.model.fields,field_description:base_vat_optional_vies.field_res_users__vies_passed
msgid "VIES validation"
msgstr ""
#. module: base_vat_optional_vies
#. odoo-python
#: code:addons/base_vat_optional_vies/models/res_config_settings.py:0
#, python-format
msgid "Vies passed calculated in %s partners"
msgstr ""

View File

@ -6,15 +6,26 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-04-17 10:18+0000\n"
"Last-Translator: gelo joga Rodríguez <gelo.joga@factorlibre.com>\n"
"POT-Creation-Date: 2023-09-18 07:12+0000\n"
"PO-Revision-Date: 2023-09-18 09:17+0200\n"
"Last-Translator: Emilio Pascual <emilio@moduom.team>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1\n"
"X-Generator: Poedit 3.3.1\n"
#. module: base_vat_optional_vies
#: model_terms:ir.ui.view,arch_db:base_vat_optional_vies.res_config_settings_view_form
msgid "Compute check vies"
msgstr "Calcular comprobación VIES"
#. module: base_vat_optional_vies
#: model:ir.model,name:base_vat_optional_vies.model_res_config_settings
msgid "Config Settings"
msgstr "Opciones de configuración"
#. module: base_vat_optional_vies
#: model:ir.model,name:base_vat_optional_vies.model_res_partner
@ -33,8 +44,23 @@ msgstr ""
"El NIF [%(wrong_vat)s] para %(record_label)s parece no ser válido. \n"
"Nota: El formato esperado es %(expected_format)s"
#. module: base_vat_optional_vies
#: model_terms:ir.ui.view,arch_db:base_vat_optional_vies.res_config_settings_view_form
msgid ""
"This process can take a long time. Are you sure you want to start the "
"process?"
msgstr ""
"Este proceso puede tardar. ¿Está seguro que quiere iniciar el proceso?"
#. module: base_vat_optional_vies
#: model:ir.model.fields,field_description:base_vat_optional_vies.field_res_partner__vies_passed
#: model:ir.model.fields,field_description:base_vat_optional_vies.field_res_users__vies_passed
msgid "VIES validation"
msgstr "Validación automática VIES"
#. module: base_vat_optional_vies
#. odoo-python
#: code:addons/base_vat_optional_vies/models/res_config_settings.py:0
#, python-format
msgid "Vies passed calculated in %s partners"
msgstr "Validación automática VIES calculada para %s contactos"

View File

@ -9,15 +9,13 @@ class ResConfigSettings(models.TransientModel):
def execute_update_check_vies(self):
# Only parent partners, children are synced from parent
count_partners = self.env["res.partner"].search_count(
[("parent_id", "=", False)]
)
self.env["res.partner"].search([("parent_id", "=", False)]).check_vat()
count_partners = self.env["res.partner"].search_count([])
self.env["res.partner"].search([]).check_vat()
return {
"effect": {
"fadeout": "slow",
"message": _("Vies passed calculated in %s partners") % count_partners,
"img_url": "/web/static/src/img/smile.svg",
"img_url": "/web/static/img/smile.svg",
"type": "rainbow_man",
}
}