mirror of
https://gitlab.com/datalifeit/trytond-aeat_sii
synced 2023-12-13 20:30:37 +01:00
Backport to 3.8
This commit is contained in:
parent
ff6eaf353e
commit
308f3aa6cb
16 changed files with 49 additions and 58 deletions
2
aeat.py
2
aeat.py
|
@ -251,7 +251,7 @@ class SIIReport(Workflow, ModelSQL, ModelView):
|
|||
domain=[('fiscalyear', '=', Eval('fiscalyear'))],
|
||||
states={
|
||||
'readonly': Eval('state') != 'draft',
|
||||
}, depends=['state'])
|
||||
}, depends=['state', 'fiscalyear'])
|
||||
|
||||
operation_type = fields.Selection(COMMUNICATION_TYPE, 'Operation Type',
|
||||
required=True,
|
||||
|
|
2
aeat.xml
2
aeat.xml
|
@ -1,4 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#This file is part party_comment module for Tryton.
|
||||
#The COPYRIGHT file at the top level of this repository contains
|
||||
#the full copyright notices and license terms.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
|
||||
from logging import getLogger
|
||||
from contextlib import contextmanager
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ class Invoice:
|
|||
|
||||
table = SIILines.__table__()
|
||||
|
||||
cursor = Transaction().connection.cursor()
|
||||
cursor = Transaction().cursor
|
||||
cursor.execute(*table.select(Max(table.id), table.invoice,
|
||||
group_by=table.invoice))
|
||||
|
||||
|
@ -126,7 +126,7 @@ class Invoice:
|
|||
result[name] = dict((i.id, '') for i in invoices)
|
||||
|
||||
table = SIILines.__table__()
|
||||
cursor = Transaction().connection.cursor()
|
||||
cursor = Transaction().cursor
|
||||
cursor.execute(*table.select(Max(table.id), table.invoice,
|
||||
where=table.invoice.in_([x.id for x in invoices]),
|
||||
group_by=table.invoice))
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="aeat_sii_invoice_form_view">
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<data>
|
||||
|
||||
<record model="ir.ui.view" id="load_pkcs12_start_view">
|
||||
<field name="model">aeat.sii.load_pkcs12.start</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">load_pkcs12_start</field>
|
||||
</record>
|
||||
<record model="ir.action.wizard" id="act_aeat_sii_load_pkcs12">
|
||||
<field name="name">Load PKCS12</field>
|
||||
<field name="wiz_name">aeat.sii.load_pkcs12</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_aeat_sii_load_pkcs12_keyword1">
|
||||
<field name="action" ref="act_aeat_sii_load_pkcs12"/>
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">company.company,-1</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="load_pkcs12_start_view">
|
||||
<field name="model">aeat.sii.load_pkcs12.start</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">load_pkcs12_start</field>
|
||||
</record>
|
||||
<record model="ir.action.wizard" id="act_aeat_sii_load_pkcs12">
|
||||
<field name="name">Load PKCS12</field>
|
||||
<field name="wiz_name">aeat.sii.load_pkcs12</field>
|
||||
</record>
|
||||
<record model="ir.action.keyword" id="act_aeat_sii_load_pkcs12_keyword1">
|
||||
<field name="action" ref="act_aeat_sii_load_pkcs12"/>
|
||||
<field name="keyword">form_action</field>
|
||||
<field name="model">company.company,-1</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
|
@ -802,14 +802,13 @@ msgctxt "view:aeat.sii.report:"
|
|||
msgid "Load Invoices"
|
||||
msgstr "Cargar facturas"
|
||||
|
||||
#, fuzzy
|
||||
msgctxt "view:aeat.sii.report:"
|
||||
msgid "Send"
|
||||
msgstr "Enviar"
|
||||
|
||||
msgctxt "view:company.company:"
|
||||
msgid "Certificate"
|
||||
msgstr ""
|
||||
msgstr "Certificado"
|
||||
|
||||
msgctxt "wizard_button:aeat.sii.load_pkcs12,start,end:"
|
||||
msgid "Cancel"
|
||||
|
|
6
party.py
6
party.py
|
@ -1,12 +1,12 @@
|
|||
#This file is part party_comment module for Tryton.
|
||||
#The COPYRIGHT file at the top level of this repository contains
|
||||
#the full copyright notices and license terms.
|
||||
# The COPYRIGHT file at the top level of this repository contains
|
||||
# the full copyright notices and license terms.
|
||||
from trytond.model import fields
|
||||
from trytond.pool import PoolMeta
|
||||
from . import aeat
|
||||
|
||||
__all__ = ['Party']
|
||||
|
||||
|
||||
class Party:
|
||||
__name__ = 'party.party'
|
||||
__metaclass__ = PoolMeta
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part party_comment module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="party_view_form">
|
||||
|
|
|
@ -3,29 +3,20 @@
|
|||
import unittest
|
||||
# import doctest
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import test_view, test_depends
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
# TODO: Remove if no sceneario needed.
|
||||
# from trytond.tests.test_tryton import doctest_setup, doctest_teardown
|
||||
|
||||
|
||||
class TestCase(unittest.TestCase):
|
||||
'Test module'
|
||||
|
||||
def setUp(self):
|
||||
trytond.tests.test_tryton.install_module('aeat_sii')
|
||||
|
||||
def test0005views(self):
|
||||
'Test views'
|
||||
test_view('aeat_sii')
|
||||
|
||||
def test0006depends(self):
|
||||
'Test depends'
|
||||
test_depends()
|
||||
class AeatSIITestCase(ModuleTestCase):
|
||||
'Test AEAT SII module'
|
||||
module = 'aeat_sii'
|
||||
|
||||
|
||||
def suite():
|
||||
suite = trytond.tests.test_tryton.suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestCase))
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
AeatSIITestCase))
|
||||
# TODO: remove if no scenario needed.
|
||||
#suite.addTests(doctest.DocFileSuite('scenario_aeat_sii.rst',
|
||||
# setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=4.0
|
||||
version=3.8.0
|
||||
depends:
|
||||
account_invoice
|
||||
xml:
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of party_comment module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license types. -->
|
||||
|
||||
<data>
|
||||
<xpath expr="/form/notebook/page[@id='reports']" position="after">
|
||||
<page string="Certificate" col="2" id="certificate">
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of party_comment module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license types. -->
|
||||
|
||||
<form string="Load PKCS12" col="2">
|
||||
<label name="pfx"/>
|
||||
<field name="pfx"/>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of party_comment module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license types. -->
|
||||
|
||||
<data>
|
||||
<xpath expr="/form/notebook/page[@id='accounting']/field[@name='vat_number']"
|
||||
position="after">
|
||||
<xpath expr="/form/notebook/page[@name='identifiers']/field[@name='identifiers']"
|
||||
position="before">
|
||||
<label name="identifier_type"/>
|
||||
<field name="identifier_type"/>
|
||||
<newline/>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
<!-- The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form string="AEAT SII Data Reassigment Done" col="2">
|
||||
<image name="tryton-dialog-information" xexpand="0" xfill="0"/>
|
||||
|
|
Loading…
Reference in a new issue