-
Security25/25No findings
-
Activity25/25Last human commit 6 months ago
-
Required by25/259 modules depend on it
-
Maturity25/25In 7 Odoo series since 13.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE res_partner SET l10n_latam_identification_type_id = %s` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
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:
- Identification Type
- Identification Number
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:
- 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:
- name: short name of the identification
- description: could be the same short name or a long name
- country_id: the country where this identification belongs
- is_vat: identify this record as the corresponding VAT for the specific country.
- sequence: let us to sort the identification types depending on the ones that are most used.
- active: we can activate/inactivate identifications to make it easier to our customers
In order to make this module compatible for multi-company environments where we have companies that does not need/support this requirement, we have added generic identification types and generic rules to manage the contact information and make it transparent for the user when only use the VAT as we formerly know.
Generic Identifications:
- VAT: The Fiscal Tax Identification or VAT number, by default will be selected as identification type so the user will only need to add the related vat number.
- Passport
- Foreign ID (Foreign National Document)
Rules when creating a new partner: We will only see the identification types that are meaningful, taking into account these rules:
-
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.
When creating a new company, will set to the related partner always the related country is_vat identification type.
All the defined identification types can be reviewed and activate/deactivate in "Contacts / Configuration / Identification Type" menu.
This module is compatible with base_vat module in order to be able to validate VAT numbers for each country that have or not have the possibility to manage multiple identification types.
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- l10n_ar, l10n_br, l10n_cl, l10n_co, l10n_co_electronic_invoice, l10n_ec, l10n_pe, l10n_py_base, l10n_uy
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 4
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
address_form_fields |
address_form_fields | ir.ui.view | qweb | Inherits portal.address_form_fields |
view_l10n_latam_identification_type_search |
l10n_latam.identification.type.search | l10n_latam.identification.type | search | New |
view_l10n_latam_identification_type_tree |
l10n_latam.identification.type.list | l10n_latam.identification.type | list | New |
view_partner_latam_form |
view_partner_latam_form | res.partner | form | Inherits base_vat.view_partner_base_vat_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
-
activeBooleandefault=True -
country_idMany2one → res.countryargs: 'res.country' -
descriptionChartranslate=True -
is_vatBoolean -
nameCharrequired=Truetranslate=True -
sequenceIntegerdefault=10
No public methods.
No new fields.
Public methods (1)-
create(self, vals_list)@api.model_create_multiIf exists, use specific vat identification.type for the country of the company
-
is_vatBooleanrelated='l10n_latam_identification_type_id.is_vat' -
l10n_latam_identification_type_idMany2one → l10n_latam.identification.typebypass_search_access=Truedefault=<expr>help='The type of identification'index='btree_not_null'inverse='_inverse_vat'string='Identification Type' args: 'l10n_latam.identification.type' -
vatCharhelp='Identification Number for selected type'string='Identification Number'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…