In Latin American countries, every partner needs to be identified even if he does not have the usual VAT number (whatever it is called) e.g. you can also be identified by your identity card. We chose to put those types also in the vat field, but to be clear what it is, we added a selection field before the vat field which is VAT by default, but is e.g. RUT (VAT of Argentina) when you choose Argentina as country.
9 lines
350 B
Python
9 lines
350 B
Python
# 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, {})
|
|
env['res.partner'].search([]).write({'l10n_latam_identification_type_id': env.ref('l10n_latam_base.it_vat').id})
|