and preparation for the edi module This module now depends on l10n_latam_base for the identification types and l10n_latam_invoice_document for the invoice numbering. It has its own implementation where you can choose yourself the sequences you want to add on a journal in a many2many. By default, you will have the sequences for the document types of the first journal. But you can share them on other journals or create new sequences for a journal.
16 lines
578 B
Python
16 lines
578 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import models
|
|
from odoo.http import request
|
|
|
|
|
|
class AccountChartTemplate(models.Model):
|
|
_inherit = 'account.chart.template'
|
|
|
|
def _load(self, sale_tax_rate, purchase_tax_rate, company):
|
|
""" Set tax calculation rounding method required in Chilean localization"""
|
|
res = super()._load(sale_tax_rate, purchase_tax_rate, company)
|
|
if company.country_id.code == 'CL':
|
|
company.write({'tax_calculation_rounding_method': 'round_globally'})
|
|
return res
|