19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:16 +01:00
parent 89c6e82fe7
commit 1b82c20a58
572 changed files with 43570 additions and 53303 deletions

View file

@ -1,5 +1,3 @@
# coding: utf-8
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import template_co
from . import l10n_latam_identification_type
from . import res_partner

View file

@ -2,7 +2,7 @@
from odoo import models, fields
class L10nCoDocumentType(models.Model):
class L10n_LatamIdentificationType(models.Model):
_inherit = "l10n_latam.identification.type"
l10n_co_document_code = fields.Char("Document Code")

View file

@ -1,20 +0,0 @@
# coding: utf-8
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, api
class ResPartner(models.Model):
_inherit = 'res.partner'
@api.constrains('vat', 'country_id', 'l10n_latam_identification_type_id')
def check_vat(self):
# check_vat is implemented by base_vat which this localization
# doesn't directly depend on. It is however automatically
# installed for Colombia.
if self.sudo().env.ref('base.module_base_vat').state == 'installed':
# don't check Colombian partners unless they have RUT (= Colombian VAT) set as document type
self = self.filtered(lambda partner: partner.country_id.code != "CO" or\
partner.l10n_latam_identification_type_id.l10n_co_document_code == 'rut')
return super(ResPartner, self).check_vat()
else:
return True

View file

@ -0,0 +1,48 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from odoo.addons.account.models.chart_template import template
class AccountChartTemplate(models.AbstractModel):
_inherit = 'account.chart.template'
@template('co')
def _get_co_template_data(self):
return {
'property_account_receivable_id': 'co_puc_130500',
'property_account_payable_id': 'co_puc_220500',
}
@template('co', 'res.company')
def _get_co_res_company(self):
return {
self.env.company.id: {
'anglo_saxon_accounting': True,
'account_fiscal_country_id': 'base.co',
'bank_account_code_prefix': '1110',
'cash_account_code_prefix': '1105',
'transfer_account_code_prefix': '1115',
'account_default_pos_receivable_account_id': 'co_puc_130507',
'income_currency_exchange_account_id': 'co_puc_421005',
'expense_currency_exchange_account_id': 'co_puc_530505',
'account_journal_early_pay_discount_loss_account_id': 'co_puc_530535',
'account_journal_early_pay_discount_gain_account_id': 'co_puc_421040',
'account_sale_tax_id': 'l10n_co_tax_8',
'account_purchase_tax_id': 'l10n_co_tax_1',
'default_cash_difference_income_account_id': 'co_puc_428000',
'default_cash_difference_expense_account_id': 'co_puc_532000',
'expense_account_id': 'co_puc_610000',
'income_account_id': 'co_puc_417500',
'account_stock_journal_id': 'inventory_valuation',
'account_stock_valuation_id': 'co_puc_140500',
},
}
@template('co', 'account.account')
def _get_co_account_account(self):
return {
'co_puc_140500': {
'account_stock_expense_id': 'co_puc_621000',
'account_stock_variation_id': 'co_puc_146501',
},
}