The early payment cash discount functionality was merged in 16.0. This PR allows for the behavior to be as localization specific as possible. This concerns : The tax computation (some countries leave it untouched after the discount, some countries discount it, and Belgium has a mixed behaviour) The account in which the cash difference resulting of the cash discount should be put. task- 2983913 related to #99572 closes odoo/odoo#102032 X-original-commit: 591757902dcdf1e3609d9c5ae23e2b134ee8e4da Signed-off-by: Laurent Smet <las@odoo.com> Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
18 lines
844 B
Python
18 lines
844 B
Python
from odoo import models
|
|
|
|
|
|
class AccountChartTemplate(models.Model):
|
|
_inherit = 'account.chart.template'
|
|
|
|
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):
|
|
""" If EGYPT chart, we add 2 new journals TA and IFRS"""
|
|
if self == self.env.ref('l10n_eg.egypt_chart_template_standard'):
|
|
if not journals_dict:
|
|
journals_dict = []
|
|
journals_dict.extend(
|
|
[{"name": "Tax Adjustments", "company_id": company.id, "code": "TA", "type": "general", "sequence": 1,
|
|
"favorite": True},
|
|
{"name": "IFRS 16", "company_id": company.id, "code": "IFRS", "type": "general", "favorite": True,
|
|
"sequence": 10}])
|
|
return super()._prepare_all_journals(acc_template_ref, company, journals_dict=journals_dict)
|