Merge lp:~vauxoo/openerp-venezuela-localization/edgar_formato_libro_retencion into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk

Proposed by [SISB] Edgar Rivero
Status: Merged
Merged at revision: 668
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/edgar_formato_libro_retencion
Merge into: lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
Diff against target: 89 lines (+21/-6)
3 files modified
l10n_ve_fiscal_reports/report/wh_book.py (+13/-2)
l10n_ve_fiscal_reports/report/witholding_book.rml (+3/-3)
l10n_ve_withholding_iva/model/generate_txt.py (+5/-1)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/edgar_formato_libro_retencion
Reviewer Review Type Date Requested Status
OpenERP para localización Venezolana. Pending
Review via email: mp+105381@code.launchpad.net

This proposal supersedes a proposal from 2012-05-10.

Description of the change

[FIX] Corregido formato del libro de retencion y cambiado ordenamiento
por comprobante.

[FIX] Corregido error en la Base Imponible, en el libro de retención y retenciones de IVA
que se encuentra en "Generar txt".

[FIX] Corregido formato de las lineas, del "Generar txt" de retención de IVA.

To post a comment you must log in.
Revision history for this message
Javier Duran (javieredm) wrote : Posted in a previous version of this proposal

Unido a la rama principal de la localización en la revisión:

revno: 668 [merge]
revision-id: javier@squezee-vir-20120510203417-mrzh5rtwkdpb76f9

review: Approve
Revision history for this message
Javier Duran (javieredm) wrote : Posted in a previous version of this proposal

Unido a la rama principal de la localización en la revisión:

revno: 668 [merge]
revision-id: javier@squezee-vir-20120510203417-mrzh5rtwkdpb76f9

review: Approve
Revision history for this message
Javier Duran (javieredm) wrote : Posted in a previous version of this proposal

Unido a la rama principal de la localización en la revisión:

revno: 668 [merge]
revision-id: javier@squezee-vir-20120510203417-mrzh5rtwkdpb76f9

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ve_fiscal_reports/report/wh_book.py'
2--- l10n_ve_fiscal_reports/report/wh_book.py 2012-02-16 21:14:14 +0000
3+++ l10n_ve_fiscal_reports/report/wh_book.py 2012-05-10 19:22:19 +0000
4@@ -49,6 +49,7 @@
5 'get_totals':self._get_totals,
6 'get_total_excent':self._get_total_excent,
7 'get_total_wh':self._get_total_wh,
8+ 'get_totals_base': self.get_totals_base,
9 })
10
11 def _get_partner_addr(self, idp=None):
12@@ -100,7 +101,7 @@
13 book_type='fiscal.reports.whs'
14 data=[]
15 fr_obj = self.pool.get(book_type)
16- fr_ids = fr_obj.search(self.cr,self.uid,[('ar_date_ret', '<=', d2), ('ar_date_ret', '>=', d1)])
17+ fr_ids = fr_obj.search(self.cr,self.uid,[('ar_date_ret', '<=', d2), ('ar_date_ret', '>=', d1)], order='ar_number')
18 data = fr_obj.browse(self.cr,self.uid, fr_ids)
19 return data
20
21@@ -163,7 +164,17 @@
22 total_excent=total_excent+self._get_exc(d.ar_line_id)
23 return total_excent
24
25-
26+ def get_totals_base(self, form):
27+ data = self._get_data(form)
28+ total = 0
29+ for base in data:
30+ for line in base.ar_line_id.tax_line:
31+ if line.base:
32+ if base.ai_id.type == 'in_refund':
33+ total += line.base * (-1)
34+ else:
35+ total += line.base
36+ return total
37
38 report_sxw.report_sxw(
39 'report.fiscal.reports.whp.whp_seniat',
40
41=== modified file 'l10n_ve_fiscal_reports/report/witholding_book.rml'
42--- l10n_ve_fiscal_reports/report/witholding_book.rml 2012-02-16 21:14:14 +0000
43+++ l10n_ve_fiscal_reports/report/witholding_book.rml 2012-05-10 19:22:19 +0000
44@@ -106,10 +106,10 @@
45 <para style="ENCABEZADO">Factura Afectada</para>
46 </td>
47 <td>
48- <para style="ENCABEZADO">Total Ventas</para>
49+ <para style="ENCABEZADO">[[ (data['form']['model'] == 'wh_p') and "Total Compras" or "Total Ventas" ]]</para>
50 </td>
51 <td>
52- <para style="ENCABEZADO">Ventas Exentas</para>
53+ <para style="ENCABEZADO">[[ (data['form']['model'] == 'wh_p') and "Compras Exentas" or "Ventas Exentas" ]]</para>
54 </td>
55 <td>
56 <para style="ENCABEZADO">Impuesto</para>
57@@ -219,7 +219,7 @@
58 <td>
59 </td>
60 <td>
61- <para style="TOTALES">[[ formatLang(get_totals(data['form'])[1]) ]]</para>
62+ <para style="TOTALES">[[ formatLang(get_totals_base(data['form'])) ]]</para>
63 </td>
64 </tr>
65 </blockTable>
66
67=== modified file 'l10n_ve_withholding_iva/model/generate_txt.py'
68--- l10n_ve_withholding_iva/model/generate_txt.py 2012-02-16 19:12:15 +0000
69+++ l10n_ve_withholding_iva/model/generate_txt.py 2012-05-10 19:22:19 +0000
70@@ -54,7 +54,10 @@
71 for txt in self.browse(cr,uid,ids,context):
72 res[txt.id]= 0.0
73 for txt_line in txt.txt_ids:
74- res[txt.id] += txt_line.untaxed
75+ if txt_line.invoice_id.type in ['out_refund','in_refund']:
76+ res[txt.id] -= txt_line.untaxed
77+ else:
78+ res[txt.id] += txt_line.untaxed
79 return res
80
81 _columns = {
82@@ -125,6 +128,7 @@
83 for voucher_lines in voucher.wh_lines:
84
85 if voucher_lines.invoice_id.state in ['open','paid']:
86+
87 txt_iva_obj.create(cr,uid,
88 {'partner_id':voucher.partner_id.id,
89 'voucher_id':voucher.id,