Merge lp:~vauxoo/openerp-venezuela-localization/marvi-src-reporte into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk

Proposed by [SISB] Marvi Diaz
Status: Merged
Merged at revision: 623
Proposed branch: lp:~vauxoo/openerp-venezuela-localization/marvi-src-reporte
Merge into: lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
Diff against target: 271 lines (+104/-71)
5 files modified
l10n_ve_withholding_src/__init__.py (+1/-1)
l10n_ve_withholding_src/report/__init__.py (+26/-0)
l10n_ve_withholding_src/report/wh_src_report.py (+42/-0)
l10n_ve_withholding_src/report/wh_src_report.rml (+34/-69)
l10n_ve_withholding_src/wh_src_report.xml (+1/-1)
To merge this branch: bzr merge lp:~vauxoo/openerp-venezuela-localization/marvi-src-reporte
Reviewer Review Type Date Requested Status
hbto [Vauxoo] http://www.vauxoo.com Pending
Review via email: mp+93896@code.launchpad.net

Description of the change

[IMP] modificacion sobre el reporte de responsabilidad social, muestra los datos de la empresa beneficiaria y del agente de retencion

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_ve_withholding_src/__init__.py'
2--- l10n_ve_withholding_src/__init__.py 2012-01-27 15:31:37 +0000
3+++ l10n_ve_withholding_src/__init__.py 2012-02-20 20:16:18 +0000
4@@ -24,4 +24,4 @@
5 ################################################################################
6
7 import model
8-#~ import report
9+import report
10
11=== added file 'l10n_ve_withholding_src/report/__init__.py'
12--- l10n_ve_withholding_src/report/__init__.py 1970-01-01 00:00:00 +0000
13+++ l10n_ve_withholding_src/report/__init__.py 2012-02-20 20:16:18 +0000
14@@ -0,0 +1,26 @@
15+#!/usr/bin/python
16+# -*- encoding: utf-8 -*-
17+###########################################################################
18+# Module Writen to OpenERP, Open Source Management Solution
19+# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
20+# All Rights Reserved
21+###############Credits######################################################
22+# Coded by: Javier Duran <javier@vauxoo.com>
23+# Planified by: Nhomar Hernandez
24+# Audited by: Vauxoo C.A.
25+#############################################################################
26+# This program is free software: you can redistribute it and/or modify
27+# it under the terms of the GNU Affero General Public License as published by
28+# the Free Software Foundation, either version 3 of the License, or
29+# (at your option) any later version.
30+#
31+# This program is distributed in the hope that it will be useful,
32+# but WITHOUT ANY WARRANTY; without even the implied warranty of
33+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34+# GNU Affero General Public License for more details.
35+#
36+# You should have received a copy of the GNU Affero General Public License
37+# along with this program. If not, see <http://www.gnu.org/licenses/>.
38+################################################################################
39+
40+import wh_src_report
41
42=== added file 'l10n_ve_withholding_src/report/wh_src_report.py'
43--- l10n_ve_withholding_src/report/wh_src_report.py 1970-01-01 00:00:00 +0000
44+++ l10n_ve_withholding_src/report/wh_src_report.py 2012-02-20 20:16:18 +0000
45@@ -0,0 +1,42 @@
46+#~ # -*- coding: utf-8 -*-
47+from report import report_sxw
48+import time
49+from datetime import datetime, timedelta
50+import datetime as dt
51+
52+
53+class wh_src_report(report_sxw.rml_parse):
54+
55+ def __init__(self, cr, uid, name, context):
56+
57+ super(wh_src_report, self).__init__(cr, uid, name, context)
58+ self.localcontext.update(
59+ {
60+ 'get_empresa':self.get_empresa,
61+
62+ })
63+ self.context= context
64+
65+
66+ def get_empresa(self, partner_id):
67+ obj_addr = self.pool.get('res.partner.address')
68+ addr_id =obj_addr.search(self.cr, self.uid, [('type','=','invoice'),('partner_id','=',partner_id)])
69+ res = {}
70+ for row in obj_addr.browse(self.cr, self.uid, addr_id):
71+ res = {
72+ 'street':row.street,
73+ 'phone':row.phone,
74+ 'fax':row.fax,
75+ 'email':row.email,
76+ 'city':row.city,
77+ 'name':row.name,
78+ 'country':row.country_id.name,
79+ }
80+ return res
81+
82+report_sxw.report_sxw('report.wh.src.report',
83+ 'account.wh.src',
84+ parser= wh_src_report,
85+ #~ header= 'internal',
86+ rml= 'l10n_ve_withholding_src/report/wh_src_report.rml'
87+ )
88
89=== modified file 'l10n_ve_withholding_src/report/wh_src_report.rml'
90--- l10n_ve_withholding_src/report/wh_src_report.rml 2012-01-30 10:41:45 +0000
91+++ l10n_ve_withholding_src/report/wh_src_report.rml 2012-02-20 20:16:18 +0000
92@@ -2,7 +2,28 @@
93 <document filename="Voucher.pdf">
94 <template pageSize="(595.0,842.0)" title="Voucher" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
95 <pageTemplate id="first">
96- <frame id="first" x1="28.0" y1="42.0" width="525" height="772"/>
97+ <frame id="first" x1="25.0" y1="40.0" width="525" height="740"/>
98+ <pageGraphics>
99+ <drawCentredString x="700" y="550">Pag.<pageNumber style="estilo2" /></drawCentredString>
100+ <drawCentredString x="700" y="550"></drawCentredString>
101+ <image x="2,5" y="750" width="28.06mm" height="28.06mm">[[ company.logo or removeParentNode('image') ]]</image>
102+ <setFont name="DejaVu Sans" size="8" />
103+ <fill color="black" />
104+ <stroke color="black" />
105+ <drawString x="3.2cm" y="29cm" style="estilo2">[[ company.partner_id.name ]]</drawString>
106+ <drawString x="3.7cm" y="28.7cm" style="estilo4">[[ company.partner_id.vat or '']]</drawString>
107+ <drawString x="2.5cm" y="28.4cm" style="estilo4">[[ get_empresa(company.partner_id.id)['street'] or '']]</drawString>
108+ <drawString x="2.4cm" y="28.1cm" style="estilo4">Telf.: [[ get_empresa(company.partner_id.id)['phone'] or '']] - Fax: [[ get_empresa(company.partner_id.id)['fax'] or '']]</drawString>
109+ <drawString x="2.7cm" y="27.8cm" style="estilo4">Email: [[ get_empresa(company.partner_id.id)['email'] or '']]</drawString>
110+ <drawString x="3.4cm" y="27.6cm" style="estilo4">[[ get_empresa(company.partner_id.id)['city'] or '']] - [[ get_empresa(company.partner_id.id)['country'] or '']]</drawString>
111+ <lines>1.2cm 2.15cm 19.9cm 2.15cm</lines>
112+
113+ <drawCentredString x="10.5cm" y="1.7cm">Elaborado por: SISB</drawCentredString>
114+ <drawCentredString x="10.5cm" y="1.25cm">[[ get_empresa(company.partner_id.id)['email'] or '']]</drawCentredString>
115+ <drawCentredString x="10.5cm" y="0.8cm">Diana La Soberana 100.5 FM<pageNumber/></drawCentredString>
116+ <drawString x="680" y="535">[[get_final_date()]]</drawString>
117+
118+ </pageGraphics>
119 </pageTemplate>
120 </template>
121 <stylesheet>
122@@ -194,62 +215,8 @@
123 </stylesheet>
124 <story>
125 <para style="P9">[[repeatIn(objects,'o')]]</para>
126- <blockTable colWidths="241.0,241.0">
127- <tr>
128- <td>
129- <para style="P20">[[ repeatIn(objects,'voucher') ]]</para>
130- <para style="P20">[[ setLang(company.partner_id.lang) ]]</para>
131- <para style="P_a">[[ company.name ]]</para>
132- <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
133- <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</para>
134- <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para>
135- <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].email ]]</para>
136- </td>
137- <td>
138-<!--
139- <para style="P11">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
140- <para style="P8">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
141- <para style="P11">Comprobante de Cobro Bancario [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
142- <para style="P8">Comprobante de Pago Bancario [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
143--->
144- <blockTable colWidths="118.0,118.0" >
145- <tr>
146- <td>
147- <para style="P24"></para>
148- </td>
149- <td>
150- <para style="P25"></para>
151- </td>
152- </tr>
153- <tr>
154- <td>
155- <para style="P24"></para>
156- </td>
157- <td>
158- <para style="P25"></para>
159- </td>
160- </tr>
161- <tr>
162- <td>
163- <para style="P24"></para>
164- </td>
165- <td>
166-
167- <para style="P9"></para>
168- </td>
169- </tr>
170- </blockTable>
171- </td>
172- </tr>
173- </blockTable>
174-<!--
175- <para style="P5">[[ repeatIn(objects,'voucher') ]]</para>
176--->
177-
178-<!--
179- <para style="P5">[[ repeatIn(voucher.line_ids,'l') ]]</para>
180--->
181- <spacer length='5mm'/>
182+
183+ <spacer length='10mm'/>
184
185 <blockTable colWidths="524.0" style="Table6">
186 <tr>
187@@ -270,18 +237,18 @@
188 <blockTable colWidths="300.0,224.0" style="Table7">
189 <tr>
190 <td>
191- <para style="P21_C">[[ company.name ]]</para>
192+ <para style="P21_C">[[ o.partner_id.name ]]</para>
193 </td>
194 <td>
195- <para style="P21_C">[[ company.partner_id.vat or '']]</para>
196+ <para style="P21_C">[[ o.partner_id.vat or '']]</para>
197 </td>
198 </tr>
199 <tr>
200 <td>
201- <para style="P21_b">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
202+ <para style="P21_b">[[ o.partner_id.address and o.partner_id.address[0].street ]]</para>
203 </td>
204 <td>
205- <para style="P21_b">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para>
206+ <para style="P21_b">[[ o.partner_id.address and o.partner_id.address[0].phone ]]</para>
207 </td>
208 </tr>
209 <tr>
210@@ -313,7 +280,7 @@
211 <blockTable colWidths="524" style="Table8">
212 <tr>
213 <td>
214- <para style="P21_b">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
215+ <para style="P21_b">[[ get_empresa(company.partner_id.id)['street'] or '']]</para>
216 </td>
217 </tr>
218 </blockTable>
219@@ -349,9 +316,7 @@
220 </td>
221 </tr>
222 </blockTable>
223-<!--
224- <spacer length='5mm'/>
225--->
226+
227 <section>
228 <para style="P9">[[repeatIn(o.line_ids,'l')]]</para>
229 <blockTable colWidths="87.3,87.3,87.3,87.3,87.3,87.3" style="Table11">
230@@ -392,24 +357,24 @@
231 </blockTable>
232
233
234- <spacer length='30mm'/>
235+ <spacer length='3mm'/>
236 <blockTable colWidths="174.0,174.0,174.0">
237 <tr>
238 <td>
239 <para style="P27_a">Elaborado por: </para>
240- <spacer length='15mm'/>
241+ <spacer length='10mm'/>
242 <para style="P27_a">Firma y Fecha: </para>
243 </td>
244 <spacer length='10mm'/>
245 <td>
246 <para style="P27_a">Conforme por:</para>
247- <spacer length='15mm'/>
248+ <spacer length='10mm'/>
249 <para style="P27_a">Firma y Fecha: </para>
250 </td>
251 <spacer length='10mm'/>
252 <td>
253 <para style="P27_a">Recibido por:</para>
254- <spacer length='15mm'/>
255+ <spacer length='10mm'/>
256 <para style="P27_a">Firma y Fecha: </para>
257 </td>
258 </tr>
259
260=== modified file 'l10n_ve_withholding_src/wh_src_report.xml'
261--- l10n_ve_withholding_src/wh_src_report.xml 2012-01-27 15:31:37 +0000
262+++ l10n_ve_withholding_src/wh_src_report.xml 2012-02-20 20:16:18 +0000
263@@ -4,7 +4,7 @@
264
265 <report
266 auto="True"
267- id="wh_src_report"
268+ id="wh_src_report_1"
269 model="account.wh.src"
270 name="wh.src.report"
271 rml="l10n_ve_withholding_src/report/wh_src_report.rml"