diff options
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/l10n_pe/models/__init__.py | 2 | ||||
| -rw-r--r-- | addons/l10n_pe/models/account_chart_template.py | 14 | ||||
| -rw-r--r-- | addons/l10n_pe/models/res_company.py | 13 |
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' |
