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: Superseded
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 (+23/-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 (+7/-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+104634@code.launchpad.net

This proposal has been superseded by a proposal from 2012-05-07.

Description of the change

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

To post a comment you must log in.
661. By [SISB] Edgar Rivero

[FIX] COrregido error en la Base Imponible, en el libro de
retencion.

662. By [SISB] Edgar Rivero

[FIX] Corregido formato de las lineas, al generar txt de retencion.
Para corregir error en la base imponible

663. By [SISB] Edgar Rivero

[IMP] Modificacion en generar_txt, para el formato del monto retenido
y la funcion que calcular el total del monto retenido.

664. By [SISB] Edgar Rivero

[FIX] En generar txt se coloca el monto en positivo y en el momento
de calcular el total del monto retenido y base imponible, se calcula
tomando en cuenta si es factura, nota de credito o de debito.

Unmerged revisions

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-07 21:02:18 +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-07 21:02:18 +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-07 21:02:18 +0000
70@@ -125,12 +125,18 @@
71 for voucher_lines in voucher.wh_lines:
72
73 if voucher_lines.invoice_id.state in ['open','paid']:
74+
75+ if voucher_lines.invoice_id.type in ['in_refund', 'out_refund']:
76+ untaxed = voucher_lines.base_ret * (-1)
77+ else:
78+ untaxed = voucher_lines.base_ret
79+
80 txt_iva_obj.create(cr,uid,
81 {'partner_id':voucher.partner_id.id,
82 'voucher_id':voucher.id,
83 'invoice_id':voucher_lines.invoice_id.id,
84 'txt_id': txt_brw.id,
85- 'untaxed': voucher_lines.base_ret,
86+ 'untaxed': untaxed,
87 'amount_withheld': voucher_lines.amount_tax_ret,
88 })
89 return True