summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorArturo Flores <arturo@vauxoo.com>2020-05-19 08:17:43 +0000
committerJosse Colpaert <jco@odoo.com>2020-06-03 09:55:10 +0000
commit014d9fcea4738210e44c6d36cc665a4c8f60c988 (patch)
tree3a15413c587d792c0b84bd39f74ec02490ff2814 /addons
parent499bbfd5c3d473fed4acd8dd46c043f06d41a09d (diff)
[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>
Diffstat (limited to 'addons')
-rw-r--r--addons/l10n_pe/models/__init__.py2
-rw-r--r--addons/l10n_pe/models/account_chart_template.py14
-rw-r--r--addons/l10n_pe/models/res_company.py13
3 files changed, 0 insertions, 29 deletions
diff --git a/addons/l10n_pe/models/__init__.py b/addons/l10n_pe/models/__init__.py
index 2037a75eaa2..7be3012e1aa 100644
--- a/addons/l10n_pe/models/__init__.py
+++ b/addons/l10n_pe/models/__init__.py
@@ -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
diff --git a/addons/l10n_pe/models/account_chart_template.py b/addons/l10n_pe/models/account_chart_template.py
deleted file mode 100644
index e9314da7709..00000000000
--- a/addons/l10n_pe/models/account_chart_template.py
+++ /dev/null
@@ -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)
diff --git a/addons/l10n_pe/models/res_company.py b/addons/l10n_pe/models/res_company.py
deleted file mode 100644
index bee9be55580..00000000000
--- a/addons/l10n_pe/models/res_company.py
+++ /dev/null
@@ -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'