Align account_do with core localization structure

Add CreateChart defaults for the Dominican receivable and payable accounts, following the pattern used by official Tryton localization modules.

Register the chart wizard extension, add core-style documentation files, and protect the structure with transactional and static tests.
This commit is contained in:
José Arturo García
2026-08-09 13:44:20 -04:00
parent 5595296401
commit 85dc8ec2b3
9 changed files with 122 additions and 2 deletions
+20
View File
@@ -0,0 +1,20 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool, PoolMeta
class CreateChart(metaclass=PoolMeta):
__name__ = 'account.create_chart'
def default_properties(self, fields):
pool = Pool()
ModelData = pool.get('ir.model.data')
defaults = super().default_properties(fields)
template_id = ModelData.get_id('account_do.do_account_root')
if self.account.account_template.id == template_id:
defaults['account_receivable'] = self.get_account(
'account_do.do_account_110201')
defaults['account_payable'] = self.get_account(
'account_do.do_account_210101')
return defaults