mirror of
https://github.com/bringout/oca-ocb-l10n_europe.git
synced 2026-04-26 17:02:05 +02:00
19.0 vanilla
This commit is contained in:
parent
ff721d030e
commit
7721452493
1826 changed files with 124775 additions and 274114 deletions
|
|
@ -8,7 +8,7 @@ Add a new model named "Identification Type" that extend the vat field functional
|
|||
|
||||
This behavior is a common requirement for some latam countries like Argentina and Chile. If your localization has this requirements then you need to depend on this module and define in your localization module the identifications types that are used in your country. Generally these types of identifications are defined by the government authorities that regulate the fiscal operations. For example:
|
||||
|
||||
* AFIP in Argentina defines DNI, CUIT (vat for legal entities), CUIL (vat for natural person), and another 80 valid identification types.
|
||||
* ARCA in Argentina defines DNI, CUIT (vat for legal entities), CUIL (vat for natural person), and another 80 valid identification types.
|
||||
|
||||
Each identification holds this information:
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ Rules when creating a new partner: We will only see the identification types tha
|
|||
|
||||
* If the partner have not country address set: Will show the generic identification types plus the ones defined in the partner's related company country (If the partner has not specific company then will show the identification types related to the current user company)
|
||||
|
||||
* If the partner has country address : will show the generic identification types plus the ones defined for the country of the partner.
|
||||
* If the partner has country address: will show the generic identification types plus the ones defined for the country of the partner.
|
||||
|
||||
When creating a new company, will set to the related partner always the related country is_vat identification type.
|
||||
|
||||
|
|
@ -48,38 +48,15 @@ pip install odoo-bringout-oca-ocb-l10n_latam_base
|
|||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- contacts
|
||||
- base_vat
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: LATAM Localization Base
|
||||
- **Version**: 1.0
|
||||
- **Category**: Accounting/Localizations
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: True
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_latam_base`.
|
||||
- Repository: https://github.com/OCA/OCB
|
||||
- Branch: 19.0
|
||||
- Path: addons/l10n_latam_base
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Reports: doc/REPORTS.md
|
||||
- Security: doc/SECURITY.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
This package preserves the original LGPL-3 license.
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from . import models
|
||||
from odoo import api, SUPERUSER_ID
|
||||
|
||||
|
||||
def _set_default_identification_type(cr, registry):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
def _set_default_identification_type(env):
|
||||
env.cr.execute(
|
||||
"""
|
||||
UPDATE res_partner
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
'version': '1.0',
|
||||
'category': 'Accounting/Localizations',
|
||||
'sequence': 14,
|
||||
'author': 'Odoo, ADHOC SA',
|
||||
'author': 'Odoo S.A., ADHOC SA',
|
||||
'summary': 'LATAM Identification Types',
|
||||
'description': """
|
||||
Add a new model named "Identification Type" that extend the vat field functionality in the partner and let the user to identify (an eventually invoice) to contacts not only with their fiscal tax ID (VAT) but with other types of identifications like national document, passport, foreign ID, etc. With this module installed you will see now in the partner form view two fields:
|
||||
|
|
@ -14,7 +14,7 @@ Add a new model named "Identification Type" that extend the vat field functional
|
|||
|
||||
This behavior is a common requirement for some latam countries like Argentina and Chile. If your localization has this requirements then you need to depend on this module and define in your localization module the identifications types that are used in your country. Generally these types of identifications are defined by the government authorities that regulate the fiscal operations. For example:
|
||||
|
||||
* AFIP in Argentina defines DNI, CUIT (vat for legal entities), CUIL (vat for natural person), and another 80 valid identification types.
|
||||
* ARCA in Argentina defines DNI, CUIT (vat for legal entities), CUIL (vat for natural person), and another 80 valid identification types.
|
||||
|
||||
Each identification holds this information:
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ Rules when creating a new partner: We will only see the identification types tha
|
|||
|
||||
* If the partner have not country address set: Will show the generic identification types plus the ones defined in the partner's related company country (If the partner has not specific company then will show the identification types related to the current user company)
|
||||
|
||||
* If the partner has country address : will show the generic identification types plus the ones defined for the country of the partner.
|
||||
* If the partner has country address: will show the generic identification types plus the ones defined for the country of the partner.
|
||||
|
||||
When creating a new company, will set to the related partner always the related country is_vat identification type.
|
||||
|
||||
|
|
@ -50,11 +50,18 @@ This module is compatible with base_vat module in order to be able to validate V
|
|||
'base_vat',
|
||||
],
|
||||
'data': [
|
||||
'data/res_country_group.xml',
|
||||
'data/l10n_latam.identification.type.csv',
|
||||
'views/res_partner_view.xml',
|
||||
'views/l10n_latam_identification_type_view.xml',
|
||||
'views/portal_address_templates.xml',
|
||||
'security/ir.model.access.csv',
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_frontend': [
|
||||
'l10n_latam_base/static/src/components/select_menu_wrapper/**.*',
|
||||
],
|
||||
},
|
||||
'installable': True,
|
||||
'post_init_hook': '_set_default_identification_type',
|
||||
'license': 'LGPL-3',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import portal
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.http import request
|
||||
|
||||
from odoo.addons.account.controllers.portal import PortalAccount
|
||||
|
||||
|
||||
class L10nLatamBasePortalAccount(PortalAccount):
|
||||
|
||||
def _prepare_address_form_values(self, partner_sudo, *args, **kwargs):
|
||||
rendering_values = super()._prepare_address_form_values(partner_sudo, *args, **kwargs)
|
||||
if request.env.company._is_latam() and rendering_values['is_used_as_billing']:
|
||||
can_edit_vat = rendering_values['can_edit_vat']
|
||||
LatamIdentificationType = request.env['l10n_latam.identification.type'].sudo()
|
||||
rendering_values.update({
|
||||
'identification_type': (
|
||||
rendering_values['current_partner'].l10n_latam_identification_type_id
|
||||
or self._l10n_get_default_identification_type_id()
|
||||
),
|
||||
'identification_types': LatamIdentificationType.search([
|
||||
'|',
|
||||
('country_id', '=', False),
|
||||
('country_id.code', '=', request.env.company.country_code),
|
||||
]) if can_edit_vat else LatamIdentificationType,
|
||||
'vat_label': request.env._("Identification Number"),
|
||||
'is_latam_country': True,
|
||||
'display_b2b_fields': True,
|
||||
})
|
||||
return rendering_values
|
||||
|
||||
def _get_mandatory_billing_address_fields(self, country_sudo):
|
||||
mandatory_fields = super()._get_mandatory_billing_address_fields(country_sudo)
|
||||
if request.env.company._is_latam():
|
||||
mandatory_fields.update({'l10n_latam_identification_type_id', 'vat'})
|
||||
return mandatory_fields
|
||||
|
||||
def _get_vat_validation_fields(self):
|
||||
fnames = super()._get_vat_validation_fields()
|
||||
if request.env.company._is_latam():
|
||||
fnames.update({'name', 'l10n_latam_identification_type_id'})
|
||||
return fnames
|
||||
|
||||
def _l10n_get_default_identification_type_id(self):
|
||||
"""Hook to set default identification type depending on LATAM country."""
|
||||
return request.env['l10n_latam.identification.type']
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
id,name,sequence,is_vat
|
||||
l10n_latam_base.it_vat,VAT,80,TRUE
|
||||
l10n_latam_base.it_pass,Passport,90,
|
||||
l10n_latam_base.it_fid,Foreign ID,100,
|
||||
"id","name","sequence","is_vat","name@es_419","name@pt_BR"
|
||||
"l10n_latam_base.it_vat","VAT","80","TRUE","IVA","CNPJ"
|
||||
"l10n_latam_base.it_pass","Passport","90","","","Passaporte"
|
||||
"l10n_latam_base.it_fid","Foreign ID","100","","ID Extranjera","ID estrangeiro"
|
||||
|
|
|
|||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record id="latam" model="res.country.group">
|
||||
<field name="name">Latin America Identification</field>
|
||||
<field name="code">LATAMID</field>
|
||||
<field name="country_ids" eval="[Command.set([
|
||||
ref('base.ar'),ref('base.br'),ref('base.cl'),ref('base.co'),
|
||||
ref('base.ec'),ref('base.pe'),ref('base.uy'),ref('base.gt')])]"/>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
@ -1,19 +1,38 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_latam_base
|
||||
# * l10n_latam_base
|
||||
#
|
||||
# Weblate <noreply-mt-weblate@weblate.org>, 2025.
|
||||
# "Fernanda Alvarez (mfar)" <mfar@odoo.com>, 2026.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0alpha1+e\n"
|
||||
"Project-Id-Version: Odoo Server 18.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-08-22 13:00+0000\n"
|
||||
"PO-Revision-Date: 2019-08-22 13:00+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"POT-Creation-Date: 2025-12-30 19:03+0000\n"
|
||||
"PO-Revision-Date: 2026-02-21 10:10+0000\n"
|
||||
"Last-Translator: \"Fernanda Alvarez (mfar)\" <mfar@odoo.com>\n"
|
||||
"Language-Team: Spanish (Latin America) <https://translate.odoo.com/projects/"
|
||||
"odoo-19-l10n/l10n_latam_base/es_419/>\n"
|
||||
"Language: es_419\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.14.3\n"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.address_form_fields
|
||||
msgid "<option value=\"\">Identification Type...</option>"
|
||||
msgstr "<option value=\"\">Tipo de identificación...</option>"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid ""
|
||||
"<span class=\"oe_read_only\" invisible=\"is_vat and 'LATAMID' not in "
|
||||
"fiscal_country_group_codes\"> - </span>"
|
||||
msgstr ""
|
||||
"<span class=\"oe_read_only\" invisible="
|
||||
"\"is_vat and 'LATAMID' not in fiscal_country_group_codes\"> - </span>"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__active
|
||||
|
|
@ -26,10 +45,20 @@ msgstr "Activo"
|
|||
msgid "Archived"
|
||||
msgstr "Archivado"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.address_form_fields
|
||||
msgid ""
|
||||
"Changing Identification type is not allowed once document(s) have "
|
||||
"been issued for your account. Please contact us "
|
||||
"directly for this operation."
|
||||
msgstr ""
|
||||
"No puedes cambiar el tipo de identificación después de emitir documentos "
|
||||
"para tu cuenta. Contáctanos para realizar esta operación."
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,name:l10n_latam_base.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Compañías"
|
||||
msgstr "Empresas"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,name:l10n_latam_base.model_res_partner
|
||||
|
|
@ -41,6 +70,11 @@ msgstr "Contacto"
|
|||
msgid "Country"
|
||||
msgstr "País"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,website_form_label:l10n_latam_base.model_res_partner
|
||||
msgid "Create a Customer"
|
||||
msgstr "Crear un cliente"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__create_uid
|
||||
msgid "Created by"
|
||||
|
|
@ -58,20 +92,21 @@ msgstr "Descripción"
|
|||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_company__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nombre a mostrar"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:l10n_latam.identification.type,name:l10n_latam_base.it_fid
|
||||
msgid "Foreign ID"
|
||||
msgstr "Cédula Extranjera"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__id
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_company__id
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
msgstr "ID"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_latam_base/controllers/portal.py:0
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__vat
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_users__vat
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
|
|
@ -89,24 +124,22 @@ msgstr "Número de identificación para el tipo seleccionado"
|
|||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__l10n_latam_identification_type_id
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_users__l10n_latam_identification_type_id
|
||||
#: model:ir.ui.menu,name:l10n_latam_base.menu_l10n_latam_identification_type
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.address_form_fields
|
||||
msgid "Identification Type"
|
||||
msgstr "Tipo de Identificación"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,name:l10n_latam_base.model_l10n_latam_identification_type
|
||||
msgid "Identification Types"
|
||||
msgstr "Tipos de Identificación"
|
||||
msgstr "Tipos de identificación"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__is_vat
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__is_vat
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_users__is_vat
|
||||
msgid "Is Vat"
|
||||
msgstr "Es Identificación Fiscal?"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Última modificación en"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__write_uid
|
||||
msgid "Last Updated by"
|
||||
|
|
@ -117,6 +150,11 @@ msgstr "Última actualización por"
|
|||
msgid "Last Updated on"
|
||||
msgstr "Última actualización el"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:res.country.group,name:l10n_latam_base.latam
|
||||
msgid "Latin America Identification"
|
||||
msgstr "Identificación"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__name
|
||||
msgid "Name"
|
||||
|
|
@ -127,11 +165,6 @@ msgstr "Nombre"
|
|||
msgid "Number"
|
||||
msgstr "Número"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:l10n_latam.identification.type,name:l10n_latam_base.it_pass
|
||||
msgid "Passport"
|
||||
msgstr "Pasaporte"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__sequence
|
||||
msgid "Sequence"
|
||||
|
|
@ -147,6 +180,11 @@ msgstr "Mostrar los tipos de identificación activos"
|
|||
msgid "Show archived identification types"
|
||||
msgstr "Mostrar los tipos de identificación archivados"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid "Tax ID"
|
||||
msgstr "Número de identificación fiscal"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,help:l10n_latam_base.field_res_partner__l10n_latam_identification_type_id
|
||||
#: model:ir.model.fields,help:l10n_latam_base.field_res_users__l10n_latam_identification_type_id
|
||||
|
|
@ -157,8 +195,3 @@ msgstr "Tipo de identificación"
|
|||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid "Type"
|
||||
msgstr "Tipo"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:l10n_latam.identification.type,name:l10n_latam_base.it_vat
|
||||
msgid "VAT"
|
||||
msgstr ""
|
||||
|
|
@ -4,10 +4,10 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0alpha1+e\n"
|
||||
"Project-Id-Version: Odoo Server 19.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-08-22 13:00+0000\n"
|
||||
"PO-Revision-Date: 2019-08-22 13:00+0000\n"
|
||||
"POT-Creation-Date: 2025-12-30 19:03+0000\n"
|
||||
"PO-Revision-Date: 2025-12-30 19:03+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
|
|
@ -15,6 +15,18 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.address_form_fields
|
||||
msgid "<option value=\"\">Identification Type...</option>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid ""
|
||||
"<span class=\"oe_read_only\" invisible=\"is_vat and 'LATAMID' not in "
|
||||
"fiscal_country_group_codes\"> - </span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__active
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_l10n_latam_identification_type_search
|
||||
|
|
@ -26,6 +38,14 @@ msgstr ""
|
|||
msgid "Archived"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.address_form_fields
|
||||
msgid ""
|
||||
"Changing Identification type is not allowed once document(s) have been"
|
||||
" issued for your account. Please contact us directly"
|
||||
" for this operation."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,name:l10n_latam_base.model_res_company
|
||||
msgid "Companies"
|
||||
|
|
@ -41,6 +61,11 @@ msgstr ""
|
|||
msgid "Country"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,website_form_label:l10n_latam_base.model_res_partner
|
||||
msgid "Create a Customer"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__create_uid
|
||||
msgid "Created by"
|
||||
|
|
@ -58,20 +83,21 @@ msgstr ""
|
|||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_company__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:l10n_latam.identification.type,name:l10n_latam_base.it_fid
|
||||
msgid "Foreign ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__id
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_company__id
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_latam_base/controllers/portal.py:0
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__vat
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_users__vat
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
|
|
@ -89,6 +115,7 @@ msgstr ""
|
|||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__l10n_latam_identification_type_id
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_users__l10n_latam_identification_type_id
|
||||
#: model:ir.ui.menu,name:l10n_latam_base.menu_l10n_latam_identification_type
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.address_form_fields
|
||||
msgid "Identification Type"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -99,14 +126,11 @@ msgstr ""
|
|||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__is_vat
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__is_vat
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_users__is_vat
|
||||
msgid "Is Vat"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__write_uid
|
||||
msgid "Last Updated by"
|
||||
|
|
@ -117,6 +141,11 @@ msgstr ""
|
|||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:res.country.group,name:l10n_latam_base.latam
|
||||
msgid "Latin America Identification"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__name
|
||||
msgid "Name"
|
||||
|
|
@ -127,11 +156,6 @@ msgstr ""
|
|||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:l10n_latam.identification.type,name:l10n_latam_base.it_pass
|
||||
msgid "Passport"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__sequence
|
||||
msgid "Sequence"
|
||||
|
|
@ -147,6 +171,11 @@ msgstr ""
|
|||
msgid "Show archived identification types"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid "Tax ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,help:l10n_latam_base.field_res_partner__l10n_latam_identification_type_id
|
||||
#: model:ir.model.fields,help:l10n_latam_base.field_res_users__l10n_latam_identification_type_id
|
||||
|
|
@ -157,8 +186,3 @@ msgstr ""
|
|||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:l10n_latam.identification.type,name:l10n_latam_base.it_vat
|
||||
msgid "VAT"
|
||||
msgstr ""
|
||||
|
|
|
|||
|
|
@ -0,0 +1,192 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_latam_base
|
||||
#
|
||||
# Weblate <noreply-mt-weblate@weblate.org>, 2025.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 18.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-12-30 19:03+0000\n"
|
||||
"PO-Revision-Date: 2025-11-17 03:12+0000\n"
|
||||
"Last-Translator: Weblate <noreply-mt-weblate@weblate.org>\n"
|
||||
"Language-Team: Portuguese (Brazil) <https://translate.odoo.com/projects/"
|
||||
"odoo-19-l10n/l10n_latam_base/pt_BR/>\n"
|
||||
"Language: pt_BR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
||||
"X-Generator: Weblate 5.12.2\n"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.address_form_fields
|
||||
msgid "<option value=\"\">Identification Type...</option>"
|
||||
msgstr "<option value=\"\">Tipo de identificação...</option>"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid ""
|
||||
"<span class=\"oe_read_only\" invisible=\"is_vat and 'LATAMID' not in "
|
||||
"fiscal_country_group_codes\"> - </span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__active
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_l10n_latam_identification_type_search
|
||||
msgid "Active"
|
||||
msgstr "Ativo"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_l10n_latam_identification_type_search
|
||||
msgid "Archived"
|
||||
msgstr "Arquivado"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.address_form_fields
|
||||
msgid ""
|
||||
"Changing Identification type is not allowed once document(s) have "
|
||||
"been issued for your account. Please contact us "
|
||||
"directly for this operation."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,name:l10n_latam_base.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Empresas"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,name:l10n_latam_base.model_res_partner
|
||||
msgid "Contact"
|
||||
msgstr "Contato"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__country_id
|
||||
msgid "Country"
|
||||
msgstr "País"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,website_form_label:l10n_latam_base.model_res_partner
|
||||
msgid "Create a Customer"
|
||||
msgstr "Criar um cliente"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Criado por"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Criado em"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__description
|
||||
msgid "Description"
|
||||
msgstr "Descrição"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_company__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nome de exibição"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__id
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_company__id
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_latam_base/controllers/portal.py:0
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__vat
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_users__vat
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid "Identification Number"
|
||||
msgstr "Número de identificação"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,help:l10n_latam_base.field_res_partner__vat
|
||||
#: model:ir.model.fields,help:l10n_latam_base.field_res_users__vat
|
||||
msgid "Identification Number for selected type"
|
||||
msgstr "Número de identificação do tipo selecionado"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.actions.act_window,name:l10n_latam_base.action_l10n_latam_identification_type
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__l10n_latam_identification_type_id
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_users__l10n_latam_identification_type_id
|
||||
#: model:ir.ui.menu,name:l10n_latam_base.menu_l10n_latam_identification_type
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.address_form_fields
|
||||
msgid "Identification Type"
|
||||
msgstr "Tipo de identificação"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model,name:l10n_latam_base.model_l10n_latam_identification_type
|
||||
msgid "Identification Types"
|
||||
msgstr "Tipos de identificação"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__is_vat
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_partner__is_vat
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_res_users__is_vat
|
||||
msgid "Is Vat"
|
||||
msgstr "É CNPJ"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Última atualização por"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Última atualização em"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:res.country.group,name:l10n_latam_base.latam
|
||||
msgid "Latin America Identification"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__name
|
||||
msgid "Name"
|
||||
msgstr "Nome"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid "Number"
|
||||
msgstr "Número"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,field_description:l10n_latam_base.field_l10n_latam_identification_type__sequence
|
||||
msgid "Sequence"
|
||||
msgstr "Sequência"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_l10n_latam_identification_type_search
|
||||
msgid "Show active identification types"
|
||||
msgstr "Mostrar tipos de identificação ativos"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_l10n_latam_identification_type_search
|
||||
msgid "Show archived identification types"
|
||||
msgstr "Mostrar tipos de identificação arquivados"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid "Tax ID"
|
||||
msgstr "CPF/CNPJ"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model:ir.model.fields,help:l10n_latam_base.field_res_partner__l10n_latam_identification_type_id
|
||||
#: model:ir.model.fields,help:l10n_latam_base.field_res_users__l10n_latam_identification_type_id
|
||||
msgid "The type of identification"
|
||||
msgstr "O tipo de identificação"
|
||||
|
||||
#. module: l10n_latam_base
|
||||
#: model_terms:ir.ui.view,arch_db:l10n_latam_base.view_partner_latam_form
|
||||
msgid "Type"
|
||||
msgstr "Tipo"
|
||||
|
|
@ -1,22 +1,22 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields, api
|
||||
from odoo.osv import expression
|
||||
|
||||
|
||||
class L10nLatamIdentificationType(models.Model):
|
||||
class L10n_LatamIdentificationType(models.Model):
|
||||
_name = 'l10n_latam.identification.type'
|
||||
_description = "Identification Types"
|
||||
_order = 'sequence'
|
||||
|
||||
sequence = fields.Integer(default=10)
|
||||
name = fields.Char(translate=True, required=True,)
|
||||
description = fields.Char()
|
||||
description = fields.Char(translate=True,)
|
||||
active = fields.Boolean(default=True)
|
||||
is_vat = fields.Boolean()
|
||||
country_id = fields.Many2one('res.country')
|
||||
|
||||
def name_get(self):
|
||||
@api.depends('country_id')
|
||||
def _compute_display_name(self):
|
||||
multi_localization = len(self.search([]).mapped('country_id')) > 1
|
||||
return [(rec.id, '%s%s' % (
|
||||
rec.name, multi_localization and rec.country_id and ' (%s)' % rec.country_id.code or '')) for rec in self]
|
||||
for rec in self:
|
||||
rec.display_name = '{}{}'.format(rec.name, multi_localization and rec.country_id and ' (%s)' % rec.country_id.code or '')
|
||||
|
|
|
|||
|
|
@ -18,3 +18,7 @@ class ResCompany(models.Model):
|
|||
if country_vat_type:
|
||||
company.partner_id.l10n_latam_identification_type_id = country_vat_type
|
||||
return companies
|
||||
|
||||
def _is_latam(self):
|
||||
"""Return whether the given company belong to latam countries or not."""
|
||||
return False
|
||||
|
|
|
|||
|
|
@ -7,25 +7,34 @@ class ResPartner(models.Model):
|
|||
_inherit = 'res.partner'
|
||||
|
||||
l10n_latam_identification_type_id = fields.Many2one('l10n_latam.identification.type',
|
||||
string="Identification Type", index='btree_not_null', auto_join=True,
|
||||
string="Identification Type", index='btree_not_null', bypass_search_access=True,
|
||||
default=lambda self: self.env.ref('l10n_latam_base.it_vat', raise_if_not_found=False),
|
||||
inverse="_inverse_vat", # To trigger the vat checking
|
||||
help="The type of identification")
|
||||
is_vat = fields.Boolean(related='l10n_latam_identification_type_id.is_vat')
|
||||
vat = fields.Char(string='Identification Number', help="Identification Number for selected type")
|
||||
|
||||
@api.model
|
||||
def _commercial_fields(self):
|
||||
return super()._commercial_fields() + ['l10n_latam_identification_type_id']
|
||||
|
||||
@api.constrains('vat', 'l10n_latam_identification_type_id')
|
||||
def check_vat(self):
|
||||
with_vat = self.filtered(lambda x: x.l10n_latam_identification_type_id.is_vat)
|
||||
return super(ResPartner, with_vat).check_vat()
|
||||
def _run_check_identification(self, validation='error'):
|
||||
return
|
||||
|
||||
@api.onchange('country_id')
|
||||
def _onchange_country(self):
|
||||
country = self.country_id or self.company_id.account_fiscal_country_id or self.env.company.account_fiscal_country_id
|
||||
identification_type = self.l10n_latam_identification_type_id
|
||||
if not identification_type or (identification_type.country_id != country):
|
||||
self.l10n_latam_identification_type_id = self.env['l10n_latam.identification.type'].search(
|
||||
[('country_id', '=', country.id), ('is_vat', '=', True)], limit=1) or self.env.ref(
|
||||
'l10n_latam_base.it_vat', raise_if_not_found=False)
|
||||
def _check_vat(self, validation='error'):
|
||||
partners_vat = self.filtered(lambda p:
|
||||
not p.l10n_latam_identification_type_id
|
||||
or p.l10n_latam_identification_type_id.is_vat
|
||||
)
|
||||
super(ResPartner, partners_vat)._check_vat(validation=validation)
|
||||
(self - partners_vat)._run_check_identification(validation=validation)
|
||||
|
||||
@api.onchange('vat', 'country_id', 'l10n_latam_identification_type_id')
|
||||
def _onchange_vat(self):
|
||||
super()._onchange_vat()
|
||||
|
||||
def _get_frontend_writable_fields(self):
|
||||
frontend_writable_fields = super()._get_frontend_writable_fields()
|
||||
frontend_writable_fields.add('l10n_latam_identification_type_id')
|
||||
|
||||
return frontend_writable_fields
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_latam_identification_type_all","latam id type all","model_l10n_latam_identification_type",,1,0,0,0
|
||||
"access_latam_identification_type_all","latam id type all","model_l10n_latam_identification_type",base.group_user,1,0,0,0
|
||||
"access_latam_identification_type_portal","latam id type portal","model_l10n_latam_identification_type",base.group_portal,1,0,0,0
|
||||
"access_latam_identification_type_manager","latam id type manager","model_l10n_latam_identification_type","base.group_partner_manager",1,1,0,0
|
||||
"access_latam_identification_type_public","latam id type public","model_l10n_latam_identification_type",base.group_public,1,0,0,0
|
||||
|
|
|
|||
|
|
|
@ -0,0 +1,29 @@
|
|||
import { Component, useState } from "@odoo/owl";
|
||||
import { SelectMenu } from "@web/core/select_menu/select_menu";
|
||||
import { useBus } from "@web/core/utils/hooks";
|
||||
|
||||
export class SelectMenuWrapper extends Component {
|
||||
static template = "l10n_latam_base.SelectMenuWrapper";
|
||||
static components = { SelectMenu };
|
||||
static props = {
|
||||
el: { optional: true, type: Object },
|
||||
};
|
||||
|
||||
setup() {
|
||||
this.state = useState({
|
||||
choices: [],
|
||||
value: this.props.el.value,
|
||||
});
|
||||
this.state.choices = [...this.props.el.querySelectorAll("option")].filter((x) => x.value);
|
||||
this.props.el.classList.add("d-none");
|
||||
useBus(this.props.el, "select", (ev) => this.onSelect(ev.detail.value));
|
||||
}
|
||||
|
||||
onSelect(value) {
|
||||
this.state.value = value;
|
||||
this.props.el.value = value;
|
||||
// Manually trigger the change event
|
||||
const event = new Event("change", { bubbles: true });
|
||||
this.props.el.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-name="l10n_latam_base.SelectMenuWrapper">
|
||||
<SelectMenu t-props="state" togglerClass="'form-control'" class="'o_extended_address'" onSelect.bind="onSelect"/>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
|
|
@ -2,16 +2,15 @@
|
|||
<odoo>
|
||||
|
||||
<record id="view_l10n_latam_identification_type_tree" model="ir.ui.view">
|
||||
<field name="name">l10n_latam.identification.type.tree</field>
|
||||
<field name="name">l10n_latam.identification.type.list</field>
|
||||
<field name="model">l10n_latam.identification.type</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree decoration-muted="(not active)" create="0" edit="0">
|
||||
<list decoration-muted="(not active)" create="0" edit="0">
|
||||
<field name="name"/>
|
||||
<field name="description"/>
|
||||
<field name="country_id"/>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
@ -33,7 +32,7 @@
|
|||
<record id="action_l10n_latam_identification_type" model="ir.actions.act_window">
|
||||
<field name="name">Identification Type</field>
|
||||
<field name="res_model">l10n_latam.identification.type</field>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_mode">list</field>
|
||||
<field name="search_view_id" ref="view_l10n_latam_identification_type_search"/>
|
||||
<field name="domain">['|', ('active', '=', True), ('active', '=', False)]</field>
|
||||
<field name="context">{"search_default_active":1}</field>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="address_form_fields" inherit_id="portal.address_form_fields">
|
||||
<div id="div_vat" position="before">
|
||||
<div t-if="is_used_as_billing and is_latam_country" class="col-xl-6 mb-3">
|
||||
<label class="col-form-label" for="l10n_latam_identification_type_id">
|
||||
Identification Type
|
||||
</label>
|
||||
<select
|
||||
t-if="is_commercial_address and can_edit_vat"
|
||||
name="l10n_latam_identification_type_id"
|
||||
class="form-select"
|
||||
>
|
||||
<option value="">Identification Type...</option>
|
||||
<option
|
||||
t-foreach="identification_types"
|
||||
t-as="id_type"
|
||||
t-att-value="id_type.id"
|
||||
t-att-selected="id_type.id == identification_type.id"
|
||||
t-out="id_type.name"
|
||||
/>
|
||||
</select>
|
||||
<p
|
||||
t-else=""
|
||||
class="form-control"
|
||||
t-out="identification_type.name"
|
||||
readonly="1"
|
||||
title="Changing Identification type is not allowed once document(s) have been
|
||||
issued for your account. Please contact us directly for this operation."
|
||||
/>
|
||||
<input
|
||||
t-if="not (is_commercial_address and can_edit_vat)"
|
||||
type="hidden"
|
||||
readonly="1"
|
||||
name="l10n_latam_identification_type_id"
|
||||
t-att-value="identification_type.id"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -3,21 +3,22 @@
|
|||
|
||||
<record id="view_partner_latam_form" model="ir.ui.view">
|
||||
<field name="name">view_partner_latam_form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="inherit_id" ref="base_vat.view_partner_base_vat_form"/>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="priority">100</field>
|
||||
<field type="xml" name="arch">
|
||||
<field name="vat" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="vat" position="after">
|
||||
<label for="l10n_latam_identification_type_id" string="Identification Number"/>
|
||||
<div>
|
||||
<field name="l10n_latam_identification_type_id" options="{'no_open': True, 'no_create': True}" placeholder="Type" attrs="{'readonly': [('parent_id','!=',False)]}" class="oe_inline" domain="country_id and ['|', ('country_id', '=', False), ('country_id', '=', country_id)] or []" required="True"/>
|
||||
<span class="oe_read_only"> - </span>
|
||||
<field name="vat" placeholder="Number" class="oe_inline" attrs="{'readonly': [('parent_id','!=',False)]}"/>
|
||||
</div>
|
||||
</field>
|
||||
<xpath expr="//label[@for='vat']" position="replace">
|
||||
<label for="l10n_latam_identification_type_id" string="Identification Number" invisible="is_vat and 'LATAMID' not in fiscal_country_group_codes"/>
|
||||
<label for="vat" string="Tax ID" invisible="not is_vat or 'LATAMID' in fiscal_country_group_codes"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='vat']" position="replace">
|
||||
<field name="l10n_latam_identification_type_id" options="{'no_open': True, 'no_create': True}"
|
||||
placeholder="Type" class="oe_inline" required="True" readonly="parent_id"
|
||||
domain="country_id and ['|', ('country_id', '=', False), ('country_id', '=', country_id)] or []"
|
||||
invisible="is_vat and 'LATAMID' not in fiscal_country_group_codes"/>
|
||||
<span class="oe_read_only" invisible="is_vat and 'LATAMID' not in fiscal_country_group_codes"> - </span>
|
||||
<field name="vat" placeholder="Number" class="oe_inline" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-ocb-l10n_latam_base"
|
||||
version = "16.0.0"
|
||||
description = "LATAM Localization Base - LATAM Identification Types"
|
||||
description = "LATAM Localization Base -
|
||||
LATAM Identification Types
|
||||
"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-contacts>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-base_vat>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-contacts>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-base_vat>=19.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
|
|
@ -17,7 +19,7 @@ classifiers = [
|
|||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue