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
=== modified file 'l10n_ve_withholding_src/__init__.py'
--- l10n_ve_withholding_src/__init__.py 2012-01-27 15:31:37 +0000
+++ l10n_ve_withholding_src/__init__.py 2012-02-20 20:16:18 +0000
@@ -24,4 +24,4 @@
24################################################################################24################################################################################
2525
26import model26import model
27#~ import report27import report
2828
=== added file 'l10n_ve_withholding_src/report/__init__.py'
--- l10n_ve_withholding_src/report/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_ve_withholding_src/report/__init__.py 2012-02-20 20:16:18 +0000
@@ -0,0 +1,26 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3###########################################################################
4# Module Writen to OpenERP, Open Source Management Solution
5# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
6# All Rights Reserved
7###############Credits######################################################
8# Coded by: Javier Duran <javier@vauxoo.com>
9# Planified by: Nhomar Hernandez
10# Audited by: Vauxoo C.A.
11#############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as published by
14# the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24################################################################################
25
26import wh_src_report
027
=== added file 'l10n_ve_withholding_src/report/wh_src_report.py'
--- l10n_ve_withholding_src/report/wh_src_report.py 1970-01-01 00:00:00 +0000
+++ l10n_ve_withholding_src/report/wh_src_report.py 2012-02-20 20:16:18 +0000
@@ -0,0 +1,42 @@
1#~ # -*- coding: utf-8 -*-
2from report import report_sxw
3import time
4from datetime import datetime, timedelta
5import datetime as dt
6
7
8class wh_src_report(report_sxw.rml_parse):
9
10 def __init__(self, cr, uid, name, context):
11
12 super(wh_src_report, self).__init__(cr, uid, name, context)
13 self.localcontext.update(
14 {
15 'get_empresa':self.get_empresa,
16
17 })
18 self.context= context
19
20
21 def get_empresa(self, partner_id):
22 obj_addr = self.pool.get('res.partner.address')
23 addr_id =obj_addr.search(self.cr, self.uid, [('type','=','invoice'),('partner_id','=',partner_id)])
24 res = {}
25 for row in obj_addr.browse(self.cr, self.uid, addr_id):
26 res = {
27 'street':row.street,
28 'phone':row.phone,
29 'fax':row.fax,
30 'email':row.email,
31 'city':row.city,
32 'name':row.name,
33 'country':row.country_id.name,
34 }
35 return res
36
37report_sxw.report_sxw('report.wh.src.report',
38 'account.wh.src',
39 parser= wh_src_report,
40 #~ header= 'internal',
41 rml= 'l10n_ve_withholding_src/report/wh_src_report.rml'
42 )
043
=== modified file 'l10n_ve_withholding_src/report/wh_src_report.rml'
--- l10n_ve_withholding_src/report/wh_src_report.rml 2012-01-30 10:41:45 +0000
+++ l10n_ve_withholding_src/report/wh_src_report.rml 2012-02-20 20:16:18 +0000
@@ -2,7 +2,28 @@
2<document filename="Voucher.pdf">2<document filename="Voucher.pdf">
3 <template pageSize="(595.0,842.0)" title="Voucher" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">3 <template pageSize="(595.0,842.0)" title="Voucher" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
4 <pageTemplate id="first">4 <pageTemplate id="first">
5 <frame id="first" x1="28.0" y1="42.0" width="525" height="772"/>5 <frame id="first" x1="25.0" y1="40.0" width="525" height="740"/>
6 <pageGraphics>
7 <drawCentredString x="700" y="550">Pag.<pageNumber style="estilo2" /></drawCentredString>
8 <drawCentredString x="700" y="550"></drawCentredString>
9 <image x="2,5" y="750" width="28.06mm" height="28.06mm">[[ company.logo or removeParentNode('image') ]]</image>
10 <setFont name="DejaVu Sans" size="8" />
11 <fill color="black" />
12 <stroke color="black" />
13 <drawString x="3.2cm" y="29cm" style="estilo2">[[ company.partner_id.name ]]</drawString>
14 <drawString x="3.7cm" y="28.7cm" style="estilo4">[[ company.partner_id.vat or '']]</drawString>
15 <drawString x="2.5cm" y="28.4cm" style="estilo4">[[ get_empresa(company.partner_id.id)['street'] or '']]</drawString>
16 <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>
17 <drawString x="2.7cm" y="27.8cm" style="estilo4">Email: [[ get_empresa(company.partner_id.id)['email'] or '']]</drawString>
18 <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>
19 <lines>1.2cm 2.15cm 19.9cm 2.15cm</lines>
20
21 <drawCentredString x="10.5cm" y="1.7cm">Elaborado por: SISB</drawCentredString>
22 <drawCentredString x="10.5cm" y="1.25cm">[[ get_empresa(company.partner_id.id)['email'] or '']]</drawCentredString>
23 <drawCentredString x="10.5cm" y="0.8cm">Diana La Soberana 100.5 FM<pageNumber/></drawCentredString>
24 <drawString x="680" y="535">[[get_final_date()]]</drawString>
25
26 </pageGraphics>
6 </pageTemplate>27 </pageTemplate>
7 </template>28 </template>
8 <stylesheet>29 <stylesheet>
@@ -194,62 +215,8 @@
194 </stylesheet>215 </stylesheet>
195 <story>216 <story>
196 <para style="P9">[[repeatIn(objects,'o')]]</para>217 <para style="P9">[[repeatIn(objects,'o')]]</para>
197 <blockTable colWidths="241.0,241.0">218
198 <tr>219 <spacer length='10mm'/>
199 <td>
200 <para style="P20">[[ repeatIn(objects,'voucher') ]]</para>
201 <para style="P20">[[ setLang(company.partner_id.lang) ]]</para>
202 <para style="P_a">[[ company.name ]]</para>
203 <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
204 <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>
205 <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para>
206 <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].email ]]</para>
207 </td>
208 <td>
209<!--
210 <para style="P11">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
211 <para style="P8">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
212 <para style="P11">Comprobante de Cobro Bancario [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
213 <para style="P8">Comprobante de Pago Bancario [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
214-->
215 <blockTable colWidths="118.0,118.0" >
216 <tr>
217 <td>
218 <para style="P24"></para>
219 </td>
220 <td>
221 <para style="P25"></para>
222 </td>
223 </tr>
224 <tr>
225 <td>
226 <para style="P24"></para>
227 </td>
228 <td>
229 <para style="P25"></para>
230 </td>
231 </tr>
232 <tr>
233 <td>
234 <para style="P24"></para>
235 </td>
236 <td>
237
238 <para style="P9"></para>
239 </td>
240 </tr>
241 </blockTable>
242 </td>
243 </tr>
244 </blockTable>
245<!--
246 <para style="P5">[[ repeatIn(objects,'voucher') ]]</para>
247-->
248
249<!--
250 <para style="P5">[[ repeatIn(voucher.line_ids,'l') ]]</para>
251-->
252 <spacer length='5mm'/>
253220
254 <blockTable colWidths="524.0" style="Table6">221 <blockTable colWidths="524.0" style="Table6">
255 <tr>222 <tr>
@@ -270,18 +237,18 @@
270 <blockTable colWidths="300.0,224.0" style="Table7">237 <blockTable colWidths="300.0,224.0" style="Table7">
271 <tr>238 <tr>
272 <td>239 <td>
273 <para style="P21_C">[[ company.name ]]</para>240 <para style="P21_C">[[ o.partner_id.name ]]</para>
274 </td>241 </td>
275 <td>242 <td>
276 <para style="P21_C">[[ company.partner_id.vat or '']]</para>243 <para style="P21_C">[[ o.partner_id.vat or '']]</para>
277 </td>244 </td>
278 </tr>245 </tr>
279 <tr>246 <tr>
280 <td>247 <td>
281 <para style="P21_b">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>248 <para style="P21_b">[[ o.partner_id.address and o.partner_id.address[0].street ]]</para>
282 </td>249 </td>
283 <td>250 <td>
284 <para style="P21_b">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para>251 <para style="P21_b">[[ o.partner_id.address and o.partner_id.address[0].phone ]]</para>
285 </td>252 </td>
286 </tr>253 </tr>
287 <tr>254 <tr>
@@ -313,7 +280,7 @@
313 <blockTable colWidths="524" style="Table8">280 <blockTable colWidths="524" style="Table8">
314 <tr>281 <tr>
315 <td>282 <td>
316 <para style="P21_b">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>283 <para style="P21_b">[[ get_empresa(company.partner_id.id)['street'] or '']]</para>
317 </td>284 </td>
318 </tr>285 </tr>
319 </blockTable>286 </blockTable>
@@ -349,9 +316,7 @@
349 </td>316 </td>
350 </tr>317 </tr>
351 </blockTable>318 </blockTable>
352<!--319
353 <spacer length='5mm'/>
354-->
355 <section>320 <section>
356 <para style="P9">[[repeatIn(o.line_ids,'l')]]</para>321 <para style="P9">[[repeatIn(o.line_ids,'l')]]</para>
357 <blockTable colWidths="87.3,87.3,87.3,87.3,87.3,87.3" style="Table11">322 <blockTable colWidths="87.3,87.3,87.3,87.3,87.3,87.3" style="Table11">
@@ -392,24 +357,24 @@
392 </blockTable>357 </blockTable>
393358
394 359
395 <spacer length='30mm'/>360 <spacer length='3mm'/>
396 <blockTable colWidths="174.0,174.0,174.0">361 <blockTable colWidths="174.0,174.0,174.0">
397 <tr>362 <tr>
398 <td>363 <td>
399 <para style="P27_a">Elaborado por: </para>364 <para style="P27_a">Elaborado por: </para>
400 <spacer length='15mm'/>365 <spacer length='10mm'/>
401 <para style="P27_a">Firma y Fecha: </para>366 <para style="P27_a">Firma y Fecha: </para>
402 </td>367 </td>
403 <spacer length='10mm'/>368 <spacer length='10mm'/>
404 <td>369 <td>
405 <para style="P27_a">Conforme por:</para>370 <para style="P27_a">Conforme por:</para>
406 <spacer length='15mm'/>371 <spacer length='10mm'/>
407 <para style="P27_a">Firma y Fecha: </para>372 <para style="P27_a">Firma y Fecha: </para>
408 </td>373 </td>
409 <spacer length='10mm'/>374 <spacer length='10mm'/>
410 <td>375 <td>
411 <para style="P27_a">Recibido por:</para>376 <para style="P27_a">Recibido por:</para>
412 <spacer length='15mm'/>377 <spacer length='10mm'/>
413 <para style="P27_a">Firma y Fecha: </para>378 <para style="P27_a">Firma y Fecha: </para>
414 </td>379 </td>
415 </tr>380 </tr>
416381
=== modified file 'l10n_ve_withholding_src/wh_src_report.xml'
--- l10n_ve_withholding_src/wh_src_report.xml 2012-01-27 15:31:37 +0000
+++ l10n_ve_withholding_src/wh_src_report.xml 2012-02-20 20:16:18 +0000
@@ -4,7 +4,7 @@
4 4
5 <report 5 <report
6 auto="True" 6 auto="True"
7 id="wh_src_report" 7 id="wh_src_report_1"
8 model="account.wh.src" 8 model="account.wh.src"
9 name="wh.src.report" 9 name="wh.src.report"
10 rml="l10n_ve_withholding_src/report/wh_src_report.rml" 10 rml="l10n_ve_withholding_src/report/wh_src_report.rml"