Backport to 3.8

This commit is contained in:
Sergio Morillo 2017-06-02 18:32:43 +02:00
parent ff6eaf353e
commit 308f3aa6cb
16 changed files with 49 additions and 58 deletions

View File

@ -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,

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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))

View File

@ -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">

View File

@ -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>

View File

@ -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"

View File

@ -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

View File

@ -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">

View File

@ -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',

View File

@ -1,5 +1,5 @@
[tryton]
version=4.0
version=3.8.0
depends:
account_invoice
xml:

View File

@ -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">

View File

@ -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"/>

View File

@ -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>

View File

@ -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"/>