[DEL] l10n_pe: delete rounding method and let round per line be as default

closes odoo/odoo#52320

X-original-commit: ef84278ea131af2f283750c95cd389a2af1570af
Signed-off-by: Josse Colpaert <jco@openerp.com>
This commit is contained in:
Arturo Flores
2020-06-03 09:55:10 +00:00
committed by Josse Colpaert
parent 499bbfd5c3
commit 014d9fcea4
3 changed files with 0 additions and 29 deletions
-2
View File
@@ -1,9 +1,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import account_tax
from . import account_move
from . import account_chart_template
from . import l10n_latam_identification_type
from . import res_partner
from . import res_city_district
from . import res_city
from . import res_company
@@ -1,14 +0,0 @@
from odoo import models
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
def _load(self, sale_tax_rate, purchase_tax_rate, company):
"""Load the rounding method properly to the company once the CoA is installed.
"""
company.filtered(lambda c: c.country_id.id == self.env.ref('base.pe').id).write({
'tax_calculation_rounding_method': 'round_globally',
})
return super()._load(sale_tax_rate, purchase_tax_rate, company)
-13
View File
@@ -1,13 +0,0 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, api
class ResCompany(models.Model):
_inherit = "res.company"
@api.onchange('country_id')
def onchange_country(self):
"""In Peru, the rounding method it's calculated as global"""
for rec in self.filtered(lambda x: x.country_id == self.env.ref('base.pe')):
rec.tax_calculation_rounding_method = 'round_globally'