Merge lp:~vauxoo/openerp-venezuela-localization/marvi-src-reporte into lp:~openerp-venezuela/openerp-venezuela-localization/6.0-trunk
- marvi-src-reporte
- Merge into 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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
hbto [Vauxoo] http://www.vauxoo.com | Pending | ||
Review via email: mp+93896@code.launchpad.net |
Commit message
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 | 24 | ################################################################################ | 24 | ################################################################################ |
6 | 25 | 25 | ||
7 | 26 | import model | 26 | import model |
9 | 27 | #~ import report | 27 | import report |
10 | 28 | 28 | ||
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 | 1 | #!/usr/bin/python | ||
16 | 2 | # -*- encoding: utf-8 -*- | ||
17 | 3 | ########################################################################### | ||
18 | 4 | # Module Writen to OpenERP, Open Source Management Solution | ||
19 | 5 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). | ||
20 | 6 | # All Rights Reserved | ||
21 | 7 | ###############Credits###################################################### | ||
22 | 8 | # Coded by: Javier Duran <javier@vauxoo.com> | ||
23 | 9 | # Planified by: Nhomar Hernandez | ||
24 | 10 | # Audited by: Vauxoo C.A. | ||
25 | 11 | ############################################################################# | ||
26 | 12 | # This program is free software: you can redistribute it and/or modify | ||
27 | 13 | # it under the terms of the GNU Affero General Public License as published by | ||
28 | 14 | # the Free Software Foundation, either version 3 of the License, or | ||
29 | 15 | # (at your option) any later version. | ||
30 | 16 | # | ||
31 | 17 | # This program is distributed in the hope that it will be useful, | ||
32 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
33 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
34 | 20 | # GNU Affero General Public License for more details. | ||
35 | 21 | # | ||
36 | 22 | # You should have received a copy of the GNU Affero General Public License | ||
37 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
38 | 24 | ################################################################################ | ||
39 | 25 | |||
40 | 26 | import wh_src_report | ||
41 | 0 | 27 | ||
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 | 1 | #~ # -*- coding: utf-8 -*- | ||
47 | 2 | from report import report_sxw | ||
48 | 3 | import time | ||
49 | 4 | from datetime import datetime, timedelta | ||
50 | 5 | import datetime as dt | ||
51 | 6 | |||
52 | 7 | |||
53 | 8 | class wh_src_report(report_sxw.rml_parse): | ||
54 | 9 | |||
55 | 10 | def __init__(self, cr, uid, name, context): | ||
56 | 11 | |||
57 | 12 | super(wh_src_report, self).__init__(cr, uid, name, context) | ||
58 | 13 | self.localcontext.update( | ||
59 | 14 | { | ||
60 | 15 | 'get_empresa':self.get_empresa, | ||
61 | 16 | |||
62 | 17 | }) | ||
63 | 18 | self.context= context | ||
64 | 19 | |||
65 | 20 | |||
66 | 21 | def get_empresa(self, partner_id): | ||
67 | 22 | obj_addr = self.pool.get('res.partner.address') | ||
68 | 23 | addr_id =obj_addr.search(self.cr, self.uid, [('type','=','invoice'),('partner_id','=',partner_id)]) | ||
69 | 24 | res = {} | ||
70 | 25 | for row in obj_addr.browse(self.cr, self.uid, addr_id): | ||
71 | 26 | res = { | ||
72 | 27 | 'street':row.street, | ||
73 | 28 | 'phone':row.phone, | ||
74 | 29 | 'fax':row.fax, | ||
75 | 30 | 'email':row.email, | ||
76 | 31 | 'city':row.city, | ||
77 | 32 | 'name':row.name, | ||
78 | 33 | 'country':row.country_id.name, | ||
79 | 34 | } | ||
80 | 35 | return res | ||
81 | 36 | |||
82 | 37 | report_sxw.report_sxw('report.wh.src.report', | ||
83 | 38 | 'account.wh.src', | ||
84 | 39 | parser= wh_src_report, | ||
85 | 40 | #~ header= 'internal', | ||
86 | 41 | rml= 'l10n_ve_withholding_src/report/wh_src_report.rml' | ||
87 | 42 | ) | ||
88 | 0 | 43 | ||
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 | 2 | <document filename="Voucher.pdf"> | 2 | <document filename="Voucher.pdf"> |
94 | 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"> |
95 | 4 | <pageTemplate id="first"> | 4 | <pageTemplate id="first"> |
97 | 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"/> |
98 | 6 | <pageGraphics> | ||
99 | 7 | <drawCentredString x="700" y="550">Pag.<pageNumber style="estilo2" /></drawCentredString> | ||
100 | 8 | <drawCentredString x="700" y="550"></drawCentredString> | ||
101 | 9 | <image x="2,5" y="750" width="28.06mm" height="28.06mm">[[ company.logo or removeParentNode('image') ]]</image> | ||
102 | 10 | <setFont name="DejaVu Sans" size="8" /> | ||
103 | 11 | <fill color="black" /> | ||
104 | 12 | <stroke color="black" /> | ||
105 | 13 | <drawString x="3.2cm" y="29cm" style="estilo2">[[ company.partner_id.name ]]</drawString> | ||
106 | 14 | <drawString x="3.7cm" y="28.7cm" style="estilo4">[[ company.partner_id.vat or '']]</drawString> | ||
107 | 15 | <drawString x="2.5cm" y="28.4cm" style="estilo4">[[ get_empresa(company.partner_id.id)['street'] or '']]</drawString> | ||
108 | 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> | ||
109 | 17 | <drawString x="2.7cm" y="27.8cm" style="estilo4">Email: [[ get_empresa(company.partner_id.id)['email'] or '']]</drawString> | ||
110 | 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> | ||
111 | 19 | <lines>1.2cm 2.15cm 19.9cm 2.15cm</lines> | ||
112 | 20 | |||
113 | 21 | <drawCentredString x="10.5cm" y="1.7cm">Elaborado por: SISB</drawCentredString> | ||
114 | 22 | <drawCentredString x="10.5cm" y="1.25cm">[[ get_empresa(company.partner_id.id)['email'] or '']]</drawCentredString> | ||
115 | 23 | <drawCentredString x="10.5cm" y="0.8cm">Diana La Soberana 100.5 FM<pageNumber/></drawCentredString> | ||
116 | 24 | <drawString x="680" y="535">[[get_final_date()]]</drawString> | ||
117 | 25 | |||
118 | 26 | </pageGraphics> | ||
119 | 6 | </pageTemplate> | 27 | </pageTemplate> |
120 | 7 | </template> | 28 | </template> |
121 | 8 | <stylesheet> | 29 | <stylesheet> |
122 | @@ -194,62 +215,8 @@ | |||
123 | 194 | </stylesheet> | 215 | </stylesheet> |
124 | 195 | <story> | 216 | <story> |
125 | 196 | <para style="P9">[[repeatIn(objects,'o')]]</para> | 217 | <para style="P9">[[repeatIn(objects,'o')]]</para> |
182 | 197 | <blockTable colWidths="241.0,241.0"> | 218 | |
183 | 198 | <tr> | 219 | <spacer length='10mm'/> |
128 | 199 | <td> | ||
129 | 200 | <para style="P20">[[ repeatIn(objects,'voucher') ]]</para> | ||
130 | 201 | <para style="P20">[[ setLang(company.partner_id.lang) ]]</para> | ||
131 | 202 | <para style="P_a">[[ company.name ]]</para> | ||
132 | 203 | <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para> | ||
133 | 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> | ||
134 | 205 | <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para> | ||
135 | 206 | <para style="P_a">[[ company.partner_id.address and company.partner_id.address[0].email ]]</para> | ||
136 | 207 | </td> | ||
137 | 208 | <td> | ||
138 | 209 | <!-- | ||
139 | 210 | <para style="P11">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para> | ||
140 | 211 | <para style="P8">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para> | ||
141 | 212 | <para style="P11">Comprobante de Cobro Bancario [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para> | ||
142 | 213 | <para style="P8">Comprobante de Pago Bancario [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para> | ||
143 | 214 | --> | ||
144 | 215 | <blockTable colWidths="118.0,118.0" > | ||
145 | 216 | <tr> | ||
146 | 217 | <td> | ||
147 | 218 | <para style="P24"></para> | ||
148 | 219 | </td> | ||
149 | 220 | <td> | ||
150 | 221 | <para style="P25"></para> | ||
151 | 222 | </td> | ||
152 | 223 | </tr> | ||
153 | 224 | <tr> | ||
154 | 225 | <td> | ||
155 | 226 | <para style="P24"></para> | ||
156 | 227 | </td> | ||
157 | 228 | <td> | ||
158 | 229 | <para style="P25"></para> | ||
159 | 230 | </td> | ||
160 | 231 | </tr> | ||
161 | 232 | <tr> | ||
162 | 233 | <td> | ||
163 | 234 | <para style="P24"></para> | ||
164 | 235 | </td> | ||
165 | 236 | <td> | ||
166 | 237 | |||
167 | 238 | <para style="P9"></para> | ||
168 | 239 | </td> | ||
169 | 240 | </tr> | ||
170 | 241 | </blockTable> | ||
171 | 242 | </td> | ||
172 | 243 | </tr> | ||
173 | 244 | </blockTable> | ||
174 | 245 | <!-- | ||
175 | 246 | <para style="P5">[[ repeatIn(objects,'voucher') ]]</para> | ||
176 | 247 | --> | ||
177 | 248 | |||
178 | 249 | <!-- | ||
179 | 250 | <para style="P5">[[ repeatIn(voucher.line_ids,'l') ]]</para> | ||
180 | 251 | --> | ||
181 | 252 | <spacer length='5mm'/> | ||
184 | 253 | 220 | ||
185 | 254 | <blockTable colWidths="524.0" style="Table6"> | 221 | <blockTable colWidths="524.0" style="Table6"> |
186 | 255 | <tr> | 222 | <tr> |
187 | @@ -270,18 +237,18 @@ | |||
188 | 270 | <blockTable colWidths="300.0,224.0" style="Table7"> | 237 | <blockTable colWidths="300.0,224.0" style="Table7"> |
189 | 271 | <tr> | 238 | <tr> |
190 | 272 | <td> | 239 | <td> |
192 | 273 | <para style="P21_C">[[ company.name ]]</para> | 240 | <para style="P21_C">[[ o.partner_id.name ]]</para> |
193 | 274 | </td> | 241 | </td> |
194 | 275 | <td> | 242 | <td> |
196 | 276 | <para style="P21_C">[[ company.partner_id.vat or '']]</para> | 243 | <para style="P21_C">[[ o.partner_id.vat or '']]</para> |
197 | 277 | </td> | 244 | </td> |
198 | 278 | </tr> | 245 | </tr> |
199 | 279 | <tr> | 246 | <tr> |
200 | 280 | <td> | 247 | <td> |
202 | 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> |
203 | 282 | </td> | 249 | </td> |
204 | 283 | <td> | 250 | <td> |
206 | 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> |
207 | 285 | </td> | 252 | </td> |
208 | 286 | </tr> | 253 | </tr> |
209 | 287 | <tr> | 254 | <tr> |
210 | @@ -313,7 +280,7 @@ | |||
211 | 313 | <blockTable colWidths="524" style="Table8"> | 280 | <blockTable colWidths="524" style="Table8"> |
212 | 314 | <tr> | 281 | <tr> |
213 | 315 | <td> | 282 | <td> |
215 | 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> |
216 | 317 | </td> | 284 | </td> |
217 | 318 | </tr> | 285 | </tr> |
218 | 319 | </blockTable> | 286 | </blockTable> |
219 | @@ -349,9 +316,7 @@ | |||
220 | 349 | </td> | 316 | </td> |
221 | 350 | </tr> | 317 | </tr> |
222 | 351 | </blockTable> | 318 | </blockTable> |
226 | 352 | <!-- | 319 | |
224 | 353 | <spacer length='5mm'/> | ||
225 | 354 | --> | ||
227 | 355 | <section> | 320 | <section> |
228 | 356 | <para style="P9">[[repeatIn(o.line_ids,'l')]]</para> | 321 | <para style="P9">[[repeatIn(o.line_ids,'l')]]</para> |
229 | 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"> |
230 | @@ -392,24 +357,24 @@ | |||
231 | 392 | </blockTable> | 357 | </blockTable> |
232 | 393 | 358 | ||
233 | 394 | 359 | ||
235 | 395 | <spacer length='30mm'/> | 360 | <spacer length='3mm'/> |
236 | 396 | <blockTable colWidths="174.0,174.0,174.0"> | 361 | <blockTable colWidths="174.0,174.0,174.0"> |
237 | 397 | <tr> | 362 | <tr> |
238 | 398 | <td> | 363 | <td> |
239 | 399 | <para style="P27_a">Elaborado por: </para> | 364 | <para style="P27_a">Elaborado por: </para> |
241 | 400 | <spacer length='15mm'/> | 365 | <spacer length='10mm'/> |
242 | 401 | <para style="P27_a">Firma y Fecha: </para> | 366 | <para style="P27_a">Firma y Fecha: </para> |
243 | 402 | </td> | 367 | </td> |
244 | 403 | <spacer length='10mm'/> | 368 | <spacer length='10mm'/> |
245 | 404 | <td> | 369 | <td> |
246 | 405 | <para style="P27_a">Conforme por:</para> | 370 | <para style="P27_a">Conforme por:</para> |
248 | 406 | <spacer length='15mm'/> | 371 | <spacer length='10mm'/> |
249 | 407 | <para style="P27_a">Firma y Fecha: </para> | 372 | <para style="P27_a">Firma y Fecha: </para> |
250 | 408 | </td> | 373 | </td> |
251 | 409 | <spacer length='10mm'/> | 374 | <spacer length='10mm'/> |
252 | 410 | <td> | 375 | <td> |
253 | 411 | <para style="P27_a">Recibido por:</para> | 376 | <para style="P27_a">Recibido por:</para> |
255 | 412 | <spacer length='15mm'/> | 377 | <spacer length='10mm'/> |
256 | 413 | <para style="P27_a">Firma y Fecha: </para> | 378 | <para style="P27_a">Firma y Fecha: </para> |
257 | 414 | </td> | 379 | </td> |
258 | 415 | </tr> | 380 | </tr> |
259 | 416 | 381 | ||
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 | 4 | 4 | ||
265 | 5 | <report | 5 | <report |
266 | 6 | auto="True" | 6 | auto="True" |
268 | 7 | id="wh_src_report" | 7 | id="wh_src_report_1" |
269 | 8 | model="account.wh.src" | 8 | model="account.wh.src" |
270 | 9 | name="wh.src.report" | 9 | name="wh.src.report" |
271 | 10 | rml="l10n_ve_withholding_src/report/wh_src_report.rml" | 10 | rml="l10n_ve_withholding_src/report/wh_src_report.rml" |