Meld aeat_340_es module with aeat_340 module and add data for account_es_pyme

This commit is contained in:
jmartin 2015-04-15 09:03:11 +02:00
parent d8d914bd55
commit 9d7c782e02
3 changed files with 2049 additions and 15 deletions

2048
340.xml

File diff suppressed because it is too large Load diff

View file

@ -3,6 +3,7 @@ from trytond.wizard import Wizard, StateView, StateTransition, Button
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval
from trytond.transaction import Transaction
from sql import Literal
from sql.operators import In
from .aeat import BOOK_KEY, OPERATION_KEY, PARTY_IDENTIFIER_TYPE
@ -61,6 +62,18 @@ class TypeTemplateTax(ModelSQL):
tax = fields.Many2One('account.tax.template', 'Template Tax',
ondelete='CASCADE', select=True, required=True)
@classmethod
def __register__(cls, module_name):
ModelData = Pool().get('ir.model.data')
cursor = Transaction().cursor
sql_table = ModelData.__table__()
# Meld aeat_340_es into aeat_340
cursor.execute(*sql_table.update(
columns=[sql_table.module],
values=[module_name],
where=sql_table.module == Literal('aeat_340_es')))
super(TypeTemplateTax, cls).__register__(module_name)
class Record(ModelSQL, ModelView):
"""

View file

@ -2,6 +2,9 @@
version=3.4.0
depends:
account_invoice
extras_depend:
account_es
account_es_pyme
xml:
aeat.xml
invoice.xml