This commit is contained in:
2026-03-08 08:53:02 +01:00
parent a3f15c30e6
commit 4e6ddc39c1
4 changed files with 3226 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# 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
from . import account
def register():
Pool.register(
account.AccountTemplate,
module='account_itsa', type_='model')
Pool.register(
account.CreateChart,
module='account_itsa', type_='wizard')

View File

@@ -0,0 +1,40 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
import csv
from io import BytesIO, TextIOWrapper
from sql import Table
from sql.aggregate import Sum
from sql.conditionals import Coalesce
from trytond.config import config
from trytond.model import ModelStorage, ModelView, fields
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval
from trytond.transaction import Transaction
from trytond.wizard import Button, StateTransition, StateView, Wizard
class AccountTemplate(metaclass=PoolMeta):
__name__ = 'account.account.template'
@classmethod
def __register__(cls, module_name):
cursor = Transaction().connection.cursor()
model_data = Table('ir_model_data')
super().__register__(module_name)
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_ch.root')
# if self.account.account_template.id == template_id:
# defaults['account_receivable'] = self.get_account(
# 'account_ch.3400')
# defaults['account_payable'] = self.get_account(
# 'account_ch.6040')
return defaults

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
[tryton]
version=7.2.3
depends:
account
extras_depend:
account_invoice
xml:
account_itsa.xml
#tax_ict.xml