Initial import from Docker volume
This commit is contained in:
11
modules/account_de_skr03/__init__.py
Executable file
11
modules/account_de_skr03/__init__.py
Executable file
@@ -0,0 +1,11 @@
|
||||
# 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.TaxTemplate,
|
||||
module='account_de_skr03', type_='model')
|
||||
BIN
modules/account_de_skr03/__pycache__/__init__.cpython-311.opt-1.pyc
Executable file
BIN
modules/account_de_skr03/__pycache__/__init__.cpython-311.opt-1.pyc
Executable file
Binary file not shown.
BIN
modules/account_de_skr03/__pycache__/__init__.cpython-311.pyc
Executable file
BIN
modules/account_de_skr03/__pycache__/__init__.cpython-311.pyc
Executable file
Binary file not shown.
BIN
modules/account_de_skr03/__pycache__/account.cpython-311.opt-1.pyc
Executable file
BIN
modules/account_de_skr03/__pycache__/account.cpython-311.opt-1.pyc
Executable file
Binary file not shown.
BIN
modules/account_de_skr03/__pycache__/account.cpython-311.pyc
Executable file
BIN
modules/account_de_skr03/__pycache__/account.cpython-311.pyc
Executable file
Binary file not shown.
40
modules/account_de_skr03/account.py
Executable file
40
modules/account_de_skr03/account.py
Executable 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.
|
||||
from sql import Table
|
||||
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.transaction import Transaction
|
||||
|
||||
|
||||
class TaxTemplate(metaclass=PoolMeta):
|
||||
__name__ = 'account.tax.template'
|
||||
|
||||
@classmethod
|
||||
def __register__(cls, module_name):
|
||||
cursor = Transaction().connection.cursor()
|
||||
model_data = Table('ir_model_data')
|
||||
|
||||
# Migration from 5.6: Rename main tax ids
|
||||
if module_name == 'account_de_skr03':
|
||||
for old_id, new_id in (
|
||||
('tax_ust_19', 'tax_ust_standard_rate'),
|
||||
('tax_ust_7', 'tax_ust_reduced_rate'),
|
||||
('tax_vst_19', 'tax_vst_standard_rate'),
|
||||
('tax_vst_7', 'tax_vst_reduced_rate'),
|
||||
('tax_eu_19_purchase', 'tax_purchase_eu_standard_rate'),
|
||||
('tax_eu_7_purchase', 'tax_purchase_eu_reduced_rate'),
|
||||
('tax_import_19', 'tax_import_standard_rate'),
|
||||
('tax_import_7', 'tax_import_reduced_rate'),
|
||||
):
|
||||
cursor.execute(*model_data.select(model_data.id,
|
||||
where=(model_data.fs_id == new_id)
|
||||
& (model_data.module == module_name)))
|
||||
if cursor.fetchone():
|
||||
continue
|
||||
cursor.execute(*model_data.update(
|
||||
columns=[model_data.fs_id],
|
||||
values=[new_id],
|
||||
where=(model_data.fs_id == old_id)
|
||||
& (model_data.module == module_name)))
|
||||
|
||||
super().__register__(module_name)
|
||||
7568
modules/account_de_skr03/account_de.xml
Executable file
7568
modules/account_de_skr03/account_de.xml
Executable file
File diff suppressed because it is too large
Load Diff
1687
modules/account_de_skr03/tax_de.xml
Executable file
1687
modules/account_de_skr03/tax_de.xml
Executable file
File diff suppressed because it is too large
Load Diff
2
modules/account_de_skr03/tests/__init__.py
Executable file
2
modules/account_de_skr03/tests/__init__.py
Executable file
@@ -0,0 +1,2 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
BIN
modules/account_de_skr03/tests/__pycache__/__init__.cpython-311.opt-1.pyc
Executable file
BIN
modules/account_de_skr03/tests/__pycache__/__init__.cpython-311.opt-1.pyc
Executable file
Binary file not shown.
BIN
modules/account_de_skr03/tests/__pycache__/__init__.cpython-311.pyc
Executable file
BIN
modules/account_de_skr03/tests/__pycache__/__init__.cpython-311.pyc
Executable file
Binary file not shown.
BIN
modules/account_de_skr03/tests/__pycache__/test_module.cpython-311.opt-1.pyc
Executable file
BIN
modules/account_de_skr03/tests/__pycache__/test_module.cpython-311.opt-1.pyc
Executable file
Binary file not shown.
BIN
modules/account_de_skr03/tests/__pycache__/test_module.cpython-311.pyc
Executable file
BIN
modules/account_de_skr03/tests/__pycache__/test_module.cpython-311.pyc
Executable file
Binary file not shown.
12
modules/account_de_skr03/tests/test_module.py
Executable file
12
modules/account_de_skr03/tests/test_module.py
Executable file
@@ -0,0 +1,12 @@
|
||||
# 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.tests.test_tryton import ModuleTestCase
|
||||
|
||||
|
||||
class AccountDESKR03TestCase(ModuleTestCase):
|
||||
'Test Account DE SKR03 module'
|
||||
module = 'account_de_skr03'
|
||||
|
||||
|
||||
del ModuleTestCase
|
||||
7
modules/account_de_skr03/tryton.cfg
Executable file
7
modules/account_de_skr03/tryton.cfg
Executable file
@@ -0,0 +1,7 @@
|
||||
[tryton]
|
||||
version=7.2.0
|
||||
depends:
|
||||
account
|
||||
xml:
|
||||
account_de.xml
|
||||
tax_de.xml
|
||||
Reference in New Issue
Block a user