← Back to team overview

openobject-italia-core-devs team mailing list archive

[Merge] lp:~icsergio/openobject-italia/61_fix_l10n_it_vat_registries into lp:openobject-italia/6.1

 

Sergio Corato has proposed merging lp:~icsergio/openobject-italia/61_fix_l10n_it_vat_registries into lp:openobject-italia/6.1.

Requested reviews:
  OpenERP Italia core devs (openobject-italia-core-devs)

For more details, see:
https://code.launchpad.net/~icsergio/openobject-italia/61_fix_l10n_it_vat_registries/+merge/196403

Re-implemented removed feature "exclude from registries", usually for withholding tax removal from vat registries.
-- 
https://code.launchpad.net/~icsergio/openobject-italia/61_fix_l10n_it_vat_registries/+merge/196403
Your team OpenERP Italia core devs is requested to review the proposed merge of lp:~icsergio/openobject-italia/61_fix_l10n_it_vat_registries into lp:openobject-italia/6.1.
=== modified file 'l10n_it_vat_registries/__openerp__.py'
--- l10n_it_vat_registries/__openerp__.py	2013-05-03 14:48:41 +0000
+++ l10n_it_vat_registries/__openerp__.py	2013-11-22 22:57:17 +0000
@@ -22,7 +22,7 @@
 ##############################################################################
 {
     'name': 'Italian Localisation - VAT Registries',
-    'version': '0.1',
+    'version': '0.2',
     'category': 'Localisation/Italy',
     'description': """Accounting reports for Italian localization - VAT Registries\nhttp://wiki.openerp-italia.org/doku.php/moduli/l10n_it_tax_journal""";,
     'author': 'OpenERP Italian Community',

=== modified file 'l10n_it_vat_registries/account.py'
--- l10n_it_vat_registries/account.py	2013-05-03 14:48:41 +0000
+++ l10n_it_vat_registries/account.py	2013-11-22 22:57:17 +0000
@@ -27,4 +27,5 @@
     
     _columns = {
         'is_base': fields.boolean('Is base', help="This tax code is used for base amounts (field used by VAT registries)"),
+        'exclude_from_registries': fields.boolean('Exclude from VAT registries'),
         }

=== modified file 'l10n_it_vat_registries/account_view.xml'
--- l10n_it_vat_registries/account_view.xml	2013-05-03 14:48:41 +0000
+++ l10n_it_vat_registries/account_view.xml	2013-11-22 22:57:17 +0000
@@ -8,6 +8,7 @@
             <field name="arch" type="xml">
                 <field name="sign" position="after">
                     <field name="is_base"/>
+                    <field name="exclude_from_registries"/>
                 </field>
             </field>
         </record>

=== modified file 'l10n_it_vat_registries/invoice.py'
--- l10n_it_vat_registries/invoice.py	2013-08-21 16:36:22 +0000
+++ l10n_it_vat_registries/invoice.py	2013-11-22 22:57:17 +0000
@@ -60,7 +60,8 @@
                 'index': index,
                 'invoice_date': (invoice and invoice.date_invoice
                     or move.date or ''),
-                'reference': (invoice and invoice.reference or '')
+                'reference': (invoice and invoice.reference or ''),
+                'exclude_from_registries': tax_code.exclude_from_registries,
                 }
             res.append(tax_item)
             index += 1
@@ -98,7 +99,8 @@
         for tax_code_id in res_dict:
             tax_code = tax_code_obj.browse(self.cr, self.uid, tax_code_id)
             if res_dict[tax_code_id]:
-                res.append((tax_code.name,res_dict[tax_code_id],tax_code.is_base))
+                res.append((tax_code.name,res_dict[tax_code_id],tax_code.is_base,
+                            tax_code.exclude_from_registries))
         return res
     
     def _get_tax_codes(self):

=== modified file 'l10n_it_vat_registries/templates/registro_iva_acquisti.mako'
--- l10n_it_vat_registries/templates/registro_iva_acquisti.mako	2013-08-22 11:10:17 +0000
+++ l10n_it_vat_registries/templates/registro_iva_acquisti.mako	2013-11-22 22:57:17 +0000
@@ -105,12 +105,16 @@
                     ${ formatLang(invoice_total(object)) | entity}
                 %endif
                 </td>
-                %if line['index']==0:
+                %if line['exclude_from_registries']:
+                    <td class="right_with_line"></td>
+                %elif line['index']==0:
                     <td class="right_with_line">${ (line['tax_code_name'])  or ''| entity}</td>
                 %else:
                     <td class="right_without_line">${ (line['tax_code_name'])  or ''| entity}</td>
                 %endif
-                %if line['index']==0:
+                %if line['exclude_from_registries']:
+                    <td class="right_with_line"></td>
+                %elif line['index']==0:
                     <td class="right_with_line">${ formatLang(line['amount'])| entity}</td>
                 %else:
                     <td class="right_without_line">${ formatLang(line['amount'])| entity}</td>
@@ -137,7 +141,7 @@
                             <th style="text-align:right">Importo</th>
                         </tr>
                         %for tax_code_tuple in tax_code_list :
-                            % if not tax_code_tuple[2]:
+                            % if not tax_code_tuple[2] and not tax_code_tuple[3]:
                                 <tr>
                                     <td>${tax_code_tuple[0]|entity}
                                     </td><td style="text-align:right">${formatLang(tax_code_tuple[1])|entity}
@@ -155,7 +159,7 @@
                             <th style="text-align:right">Importo</th>
                         </tr>
                         %for tax_code_tuple in tax_code_totals_list :
-                            % if not tax_code_tuple[2]:
+                            % if not tax_code_tuple[2] and not tax_code_tuple[3]:
                                 <tr>
                                     <td>${tax_code_tuple[0]|entity}
                                     </td><td style="text-align:right">${formatLang(tax_code_tuple[1])|entity}
@@ -175,7 +179,7 @@
                             <th style="text-align:right">Importo</th>
                         </tr>
                         %for tax_code_tuple in tax_code_list :
-                            % if tax_code_tuple[2]:
+                            % if tax_code_tuple[2] and not tax_code_tuple[3]:
                                 <tr>
                                     <td>${tax_code_tuple[0]|entity}
                                     </td><td style="text-align:right">${formatLang(tax_code_tuple[1])|entity}
@@ -193,7 +197,7 @@
                             <th style="text-align:right">Importo</th>
                         </tr>
                         %for tax_code_tuple in tax_code_totals_list :
-                            % if tax_code_tuple[2]:
+                            % if tax_code_tuple[2] and not tax_code_tuple[3]:
                                 <tr>
                                     <td>${tax_code_tuple[0]|entity}
                                     </td><td style="text-align:right">${formatLang(tax_code_tuple[1])|entity}


Follow ups