changeset c2f6ab55740e in modules/account_es:default
details: 
https://hg.tryton.org/modules/account_es?cmd=changeset;node=c2f6ab55740e
description:
        Add missing Spanish VAT list and EC Operation List files

        issue7558
        review54281002
diffstat:

 aeat347.txt                                |   4 ++++
 aeat349.txt                                |   4 ++++
 party.py                                   |  23 +++++++++++++++++++++++
 party.xml                                  |  12 ++++++++++++
 tests/347.txt                              |   3 +++
 tests/349.txt                              |   2 ++
 view/es_ec_operation_list.xml              |  11 +++++++++++
 view/es_ec_operation_list_context_form.xml |  12 ++++++++++++
 view/party_form.xml                        |   9 +++++++++
 view/tax_form.xml                          |  15 +++++++++++++++
 view/tax_template_form.xml                 |  15 +++++++++++++++
 view/vat_list_context_form.xml             |   9 +++++++++
 view/vat_list_list.xml                     |  16 ++++++++++++++++
 13 files changed, 135 insertions(+), 0 deletions(-)

diffs (187 lines):

diff -r 6c2410dd2382 -r c2f6ab55740e aeat347.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/aeat347.txt       Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,4 @@
+1347${year}${company.party.tax_identifier.code[2:]}${justify(company.rec_name.upper(),
 40)}T000000000${justify('', 40)}347${year}000001${justify('', 
15)}${format_integer(len(records), 
9)}${format_decimal(records_amount)}${format_integer(0, 
9)}${format_decimal(0)}${justify('', 315)}
+{% for record in records %}\
+2347${year}${justify(identifier_code(record.company_tax_identifier), 
9)}${justify(identifier_code(record.party_tax_identifier), 9)}${justify('', 
9)}${justify(strip_accents(record.party.name.upper()), 
40)}D${justify(record.province_code, 2)}${justify(country_code(record), 2)} 
${record.code}${format_decimal(record.amount)}  
000000000000000${format_decimal(0)}0000${format_decimal(record.first_period_amount
 or 0)}${format_decimal(0)}${format_decimal(record.second_period_amount or 
0)}${format_decimal(0)}${format_decimal(record.third_period_amount or 
0)}${format_decimal(0)}${format_decimal(record.fourth_period_amount or 
0)}${format_decimal(0)}${justify('', 20)}${format_decimal(0)}${justify('', 201)}
+{% end %}\
diff -r 6c2410dd2382 -r c2f6ab55740e aeat349.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/aeat349.txt       Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,4 @@
+1349${year}${company.party.tax_identifier.code[2:]}${justify(company.rec_name.upper(),
 40)}T000000000${justify('', 40)}349${year}${period_number}0001  
0000000000000${period}${format_integer(len(records), 
9)}${format_decimal(records_amount, 15)}${format_integer(0, 
9)}${format_decimal(0), 15}${justify('', 315)}
+{% for record in records %}\
+2349${year}${justify(identifier_code(record.company_tax_identifier), 
9)}${justify('', 58)}${justify(record.party_tax_identifier.code if 
record.party_tax_identifier else '', 17)}${justify(record.party.name.upper(), 
40)}${record.code}${format_decimal(record.amount)}${justify('', 354)}
+{% end %}\
diff -r 6c2410dd2382 -r c2f6ab55740e party.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/party.py  Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,23 @@
+# 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.model import fields
+from trytond.pool import PoolMeta
+
+__all__ = ['Party']
+
+
+class Party(metaclass=PoolMeta):
+    __name__ = 'party.party'
+
+    es_province_code = fields.Char("Spanish Province Code", size=2,
+        help="Set 99 for non Spanish parties.")
+
+    @fields.depends('addresses', 'es_province_code')
+    def on_change_addresses(self):
+        if not self.es_province_code:
+            for address in self.addresses:
+                country = getattr(address, 'country', None)
+                zip_ = getattr(address, 'zip', None)
+                if country and zip_ and country.code == 'ES':
+                    self.es_province_code = zip_[:2]
+                    break
diff -r 6c2410dd2382 -r c2f6ab55740e party.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/party.xml Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  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">
+            <field name="model">party.party</field>
+            <field name="inherit" ref="party.party_view_form"/>
+            <field name="name">party_form</field>
+        </record>
+    </data>
+</tryton>
diff -r 6c2410dd2382 -r c2f6ab55740e tests/347.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/347.txt     Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,3 @@
+13472018B01000009DUNDER MIFFLIN                          T000000000            
                            3472018000001               000000002 
000000000036300000000000 000000000000000                                        
                                                                                
                                                                                
                                                                                
                                   
+23472018B0100000900000000T         PARTY                                   D25 
  B 000000000024200  000000000000000 0000000000000000000 000000000024200 
000000000000000 000000000000000 000000000000000 000000000000000 000000000000000 
000000000000000 000000000000000                     000000000000000             
                                                                                
                                                                                
                            
+23472018B0100000900000001R         SUPPLIER                                D08 
  A 000000000012100  000000000000000 0000000000000000000 000000000012100 
000000000000000 000000000000000 000000000000000 000000000000000 000000000000000 
000000000000000 000000000000000                     000000000000000             
                                                                                
                                                                                
                            
diff -r 6c2410dd2382 -r c2f6ab55740e tests/349.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/349.txt     Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,2 @@
+13492018B01000009DUNDER MIFFLIN                          T000000000            
                            3492018990001  
00000000000000A000000001000000000010000000000000000000000000015                 
                                                                                
                                                                                
                                                                                
                                                          
+23492018B01000009                                                          
BE0897290877     INTRACOMUNITARY SUPPLIER                A0000000010000         
                                                                                
                                                                                
                                                                                
                                                                                
                         
diff -r 6c2410dd2382 -r c2f6ab55740e view/es_ec_operation_list.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/view/es_ec_operation_list.xml     Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tree>
+    <field name="company_tax_identifier" tree_invisible="1"/>
+    <field name="code"/>
+    <field name="party"/>
+    <field name="party_tax_identifier"/>
+    <field name="amount"/>
+    <field name="currency"/>
+</tree>
diff -r 6c2410dd2382 -r c2f6ab55740e view/es_ec_operation_list_context_form.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/view/es_ec_operation_list_context_form.xml        Sun Apr 14 14:34:42 
2019 +0200
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<form>
+    <label name="company"/>
+    <field name="company"/>
+    <newline/>
+    <label name="fiscalyear"/>
+    <field name="fiscalyear"/>
+    <label name="period"/>
+    <field name="period"/>
+</form>
diff -r 6c2410dd2382 -r c2f6ab55740e view/party_form.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/view/party_form.xml       Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+    <xpath expr="/form/notebook/page[@id='accounting']" position="inside">
+        <label name="es_province_code"/>
+        <field name="es_province_code"/>
+    </xpath>
+</data>
diff -r 6c2410dd2382 -r c2f6ab55740e view/tax_form.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/view/tax_form.xml Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+    <xpath expr="/form/notebook" position="inside">
+        <page id="es_vat_list" string="Spanish VAT List">
+            <label name="es_vat_list_code"/>
+            <field name="es_vat_list_code"/>
+        </page>
+    </xpath>
+    <xpath expr="/form//field[@name='ec_sales_list_code']" position="after">
+        <label name="es_ec_purchases_list_code"/>
+        <field name="es_ec_purchases_list_code"/>
+    </xpath>
+</data>
diff -r 6c2410dd2382 -r c2f6ab55740e view/tax_template_form.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/view/tax_template_form.xml        Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+    <xpath expr="/form/notebook" position="inside">
+        <page id="es_vat_list" string="Spanish VAT List">
+            <label name="es_vat_list_code"/>
+            <field name="es_vat_list_code"/>
+        </page>
+    </xpath>
+    <xpath expr="/form//field[@name='ec_sales_list_code']" position="after">
+        <label name="es_ec_purchases_list_code"/>
+        <field name="es_ec_purchases_list_code"/>
+    </xpath>
+</data>
diff -r 6c2410dd2382 -r c2f6ab55740e view/vat_list_context_form.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/view/vat_list_context_form.xml    Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<form>
+    <label name="company"/>
+    <field name="company"/>
+    <label name="date"/>
+    <field name="date"/>
+</form>
diff -r 6c2410dd2382 -r c2f6ab55740e view/vat_list_list.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/view/vat_list_list.xml    Sun Apr 14 14:34:42 2019 +0200
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tree>
+    <field name="company_tax_identifier" tree_invisible="1"/>
+    <field name="code"/>
+    <field name="party"/>
+    <field name="party_tax_identifier"/>
+    <field name="province_code"/>
+    <field name="amount"/>
+    <field name="first_period_amount"/>
+    <field name="second_period_amount"/>
+    <field name="third_period_amount"/>
+    <field name="fourth_period_amount"/>
+    <field name="currency"/>
+</tree>

Reply via email to