Merge lp:~vxkikevx/addons-vauxoo/late_payments_report into lp:addons-vauxoo
- late_payments_report
- Merge into 6.0-trunk
Proposed by
Luis Escobar V. (Vauxoo)
Status: | Merged |
---|---|
Merged at revision: | 131 |
Proposed branch: | lp:~vxkikevx/addons-vauxoo/late_payments_report |
Merge into: | lp:addons-vauxoo |
Diff against target: |
608 lines (+566/-0) 8 files modified
late_payments_report/__init__.py (+26/-0) late_payments_report/__openerp__.py (+45/-0) late_payments_report/i18n/es.po (+77/-0) late_payments_report/i18n/es_VE.po (+77/-0) late_payments_report/late_payments_report.xml (+15/-0) late_payments_report/report/__init__.py (+27/-0) late_payments_report/report/late_payments.py (+98/-0) late_payments_report/report/late_payments.rml (+201/-0) |
To merge this branch: | bzr merge lp:~vxkikevx/addons-vauxoo/late_payments_report |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gabriela Quilarque | Pending | ||
Review via email: mp+95282@code.launchpad.net |
Commit message
Description of the change
[ADD] Module Late Payment Reports
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 | === added directory 'late_payments_report' | |||
2 | === added file 'late_payments_report/__init__.py' | |||
3 | --- late_payments_report/__init__.py 1970-01-01 00:00:00 +0000 | |||
4 | +++ late_payments_report/__init__.py 2012-02-29 22:52:22 +0000 | |||
5 | @@ -0,0 +1,26 @@ | |||
6 | 1 | # -*- encoding: utf-8 -*- | ||
7 | 2 | ########################################################################### | ||
8 | 3 | # Module Writen to OpenERP, Open Source Management Solution | ||
9 | 4 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). | ||
10 | 5 | # All Rights Reserved | ||
11 | 6 | ###############Credits###################################################### | ||
12 | 7 | # Coded by: Luis Escobar <luis@vauxoo.com> | ||
13 | 8 | # Planified by: Nhomar Hernandez | ||
14 | 9 | # Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve | ||
15 | 10 | # Audited by: Humberto Arocha humberto@openerp.com.ve | ||
16 | 11 | ############################################################################# | ||
17 | 12 | # This program is free software: you can redistribute it and/or modify | ||
18 | 13 | # it under the terms of the GNU General Public License as published by | ||
19 | 14 | # the Free Software Foundation, either version 3 of the License, or | ||
20 | 15 | # (at your option) any later version. | ||
21 | 16 | # | ||
22 | 17 | # This program is distributed in the hope that it will be useful, | ||
23 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
24 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
25 | 20 | # GNU General Public License for more details. | ||
26 | 21 | # | ||
27 | 22 | # You should have received a copy of the GNU General Public License | ||
28 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
29 | 24 | ############################################################################## | ||
30 | 25 | |||
31 | 26 | import report | ||
32 | 0 | 27 | ||
33 | === added file 'late_payments_report/__openerp__.py' | |||
34 | --- late_payments_report/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
35 | +++ late_payments_report/__openerp__.py 2012-02-29 22:52:22 +0000 | |||
36 | @@ -0,0 +1,45 @@ | |||
37 | 1 | # -*- encoding: utf-8 -*- | ||
38 | 2 | ########################################################################### | ||
39 | 3 | # Module Writen to OpenERP, Open Source Management Solution | ||
40 | 4 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). | ||
41 | 5 | # All Rights Reserved | ||
42 | 6 | ###############Credits###################################################### | ||
43 | 7 | # Coded by: Luis Escobar <luis@vauxoo.com> | ||
44 | 8 | # Planified by: Nhomar Hernandez | ||
45 | 9 | # Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve | ||
46 | 10 | # Audited by: Humberto Arocha humberto@openerp.com.ve | ||
47 | 11 | ############################################################################# | ||
48 | 12 | # This program is free software: you can redistribute it and/or modify | ||
49 | 13 | # it under the terms of the GNU General Public License as published by | ||
50 | 14 | # the Free Software Foundation, either version 3 of the License, or | ||
51 | 15 | # (at your option) any later version. | ||
52 | 16 | # | ||
53 | 17 | # This program is distributed in the hope that it will be useful, | ||
54 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
55 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
56 | 20 | # GNU General Public License for more details. | ||
57 | 21 | # | ||
58 | 22 | # You should have received a copy of the GNU General Public License | ||
59 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
60 | 24 | ############################################################################## | ||
61 | 25 | |||
62 | 26 | { | ||
63 | 27 | "name" : "Venezuelan Late Payments customisation", | ||
64 | 28 | "version" : "0.1", | ||
65 | 29 | "author" : "Vauxoo", | ||
66 | 30 | "category" : "Generic Modules/Others", | ||
67 | 31 | "website": "http://wiki.openerp.org.ve/", | ||
68 | 32 | "description": """ | ||
69 | 33 | |||
70 | 34 | Modulo que realiza la personalizacion del reporte de pagos atrasados | ||
71 | 35 | |||
72 | 36 | """, | ||
73 | 37 | "depends" : ["base", "account"], | ||
74 | 38 | "init_xml" : [], | ||
75 | 39 | "update_xml" : [ | ||
76 | 40 | "late_payments_report.xml", | ||
77 | 41 | |||
78 | 42 | ], | ||
79 | 43 | "active": False, | ||
80 | 44 | "installable": True | ||
81 | 45 | } | ||
82 | 0 | 46 | ||
83 | === added directory 'late_payments_report/i18n' | |||
84 | === added file 'late_payments_report/i18n/es.po' | |||
85 | --- late_payments_report/i18n/es.po 1970-01-01 00:00:00 +0000 | |||
86 | +++ late_payments_report/i18n/es.po 2012-02-29 22:52:22 +0000 | |||
87 | @@ -0,0 +1,77 @@ | |||
88 | 1 | # Translation of OpenERP Server. | ||
89 | 2 | # This file contains the translation of the following modules: | ||
90 | 3 | # * l10n_ve_late_payments_report | ||
91 | 4 | # | ||
92 | 5 | msgid "" | ||
93 | 6 | msgstr "" | ||
94 | 7 | "Project-Id-Version: OpenERP Server 6.0.3\n" | ||
95 | 8 | "Report-Msgid-Bugs-To: support@openerp.com\n" | ||
96 | 9 | "POT-Creation-Date: 2012-02-29 19:11+0000\n" | ||
97 | 10 | "PO-Revision-Date: 2012-02-29 19:11+0000\n" | ||
98 | 11 | "Last-Translator: <>\n" | ||
99 | 12 | "Language-Team: \n" | ||
100 | 13 | "MIME-Version: 1.0\n" | ||
101 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
102 | 15 | "Content-Transfer-Encoding: \n" | ||
103 | 16 | "Plural-Forms: \n" | ||
104 | 17 | |||
105 | 18 | #. module: l10n_ve_late_payments_report | ||
106 | 19 | #: report:account.late.payments.l10n.ve:0 | ||
107 | 20 | msgid "Total amount due:" | ||
108 | 21 | msgstr "Monto total adeudado:" | ||
109 | 22 | |||
110 | 23 | #. module: l10n_ve_late_payments_report | ||
111 | 24 | #: model:ir.actions.report.xml,name:l10n_ve_late_payments_report.late_payments_l10n_ve | ||
112 | 25 | msgid "Late Payments" | ||
113 | 26 | msgstr "Pagos Atrasados" | ||
114 | 27 | |||
115 | 28 | #. module: l10n_ve_late_payments_report | ||
116 | 29 | #: report:account.late.payments.l10n.ve:0 | ||
117 | 30 | msgid "Description" | ||
118 | 31 | msgstr "Descripcion" | ||
119 | 32 | |||
120 | 33 | #. module: l10n_ve_late_payments_report | ||
121 | 34 | #: report:account.late.payments.l10n.ve:0 | ||
122 | 35 | msgid "Due" | ||
123 | 36 | msgstr "Debe" | ||
124 | 37 | |||
125 | 38 | #. module: l10n_ve_late_payments_report | ||
126 | 39 | #: report:account.late.payments.l10n.ve:0 | ||
127 | 40 | msgid "Paid" | ||
128 | 41 | msgstr "Pagado" | ||
129 | 42 | |||
130 | 43 | #. module: l10n_ve_late_payments_report | ||
131 | 44 | #: report:account.late.payments.l10n.ve:0 | ||
132 | 45 | msgid "Balance :" | ||
133 | 46 | msgstr "Balance :" | ||
134 | 47 | |||
135 | 48 | #. module: l10n_ve_late_payments_report | ||
136 | 49 | #: report:account.late.payments.l10n.ve:0 | ||
137 | 50 | msgid "Maturity" | ||
138 | 51 | msgstr "Vencido" | ||
139 | 52 | |||
140 | 53 | #. module: l10n_ve_late_payments_report | ||
141 | 54 | #: report:account.late.payments.l10n.ve:0 | ||
142 | 55 | msgid "Maturity date" | ||
143 | 56 | msgstr "Maturity date" | ||
144 | 57 | |||
145 | 58 | #. module: l10n_ve_late_payments_report | ||
146 | 59 | #: report:account.late.payments.l10n.ve:0 | ||
147 | 60 | msgid "Sub-Total :" | ||
148 | 61 | msgstr "Sub-Total :" | ||
149 | 62 | |||
150 | 63 | #. module: l10n_ve_late_payments_report | ||
151 | 64 | #: report:account.late.payments.l10n.ve:0 | ||
152 | 65 | msgid "Date" | ||
153 | 66 | msgstr "Fecha" | ||
154 | 67 | |||
155 | 68 | #. module: l10n_ve_late_payments_report | ||
156 | 69 | #: report:account.late.payments.l10n.ve:0 | ||
157 | 70 | msgid "." | ||
158 | 71 | msgstr "." | ||
159 | 72 | |||
160 | 73 | #. module: l10n_ve_late_payments_report | ||
161 | 74 | #: report:account.late.payments.l10n.ve:0 | ||
162 | 75 | msgid "Ref" | ||
163 | 76 | msgstr "Ref" | ||
164 | 77 | |||
165 | 0 | 78 | ||
166 | === added file 'late_payments_report/i18n/es_VE.po' | |||
167 | --- late_payments_report/i18n/es_VE.po 1970-01-01 00:00:00 +0000 | |||
168 | +++ late_payments_report/i18n/es_VE.po 2012-02-29 22:52:22 +0000 | |||
169 | @@ -0,0 +1,77 @@ | |||
170 | 1 | # Translation of OpenERP Server. | ||
171 | 2 | # This file contains the translation of the following modules: | ||
172 | 3 | # * l10n_ve_late_payments_report | ||
173 | 4 | # | ||
174 | 5 | msgid "" | ||
175 | 6 | msgstr "" | ||
176 | 7 | "Project-Id-Version: OpenERP Server 6.0.3\n" | ||
177 | 8 | "Report-Msgid-Bugs-To: support@openerp.com\n" | ||
178 | 9 | "POT-Creation-Date: 2012-02-29 19:11+0000\n" | ||
179 | 10 | "PO-Revision-Date: 2012-02-29 19:11+0000\n" | ||
180 | 11 | "Last-Translator: <>\n" | ||
181 | 12 | "Language-Team: \n" | ||
182 | 13 | "MIME-Version: 1.0\n" | ||
183 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
184 | 15 | "Content-Transfer-Encoding: \n" | ||
185 | 16 | "Plural-Forms: \n" | ||
186 | 17 | |||
187 | 18 | #. module: l10n_ve_late_payments_report | ||
188 | 19 | #: report:account.late.payments.l10n.ve:0 | ||
189 | 20 | msgid "Total amount due:" | ||
190 | 21 | msgstr "Monto total adeudado:" | ||
191 | 22 | |||
192 | 23 | #. module: l10n_ve_late_payments_report | ||
193 | 24 | #: model:ir.actions.report.xml,name:l10n_ve_late_payments_report.late_payments_l10n_ve | ||
194 | 25 | msgid "Late Payments" | ||
195 | 26 | msgstr "Pagos Atrasados" | ||
196 | 27 | |||
197 | 28 | #. module: l10n_ve_late_payments_report | ||
198 | 29 | #: report:account.late.payments.l10n.ve:0 | ||
199 | 30 | msgid "Description" | ||
200 | 31 | msgstr "Descripcion" | ||
201 | 32 | |||
202 | 33 | #. module: l10n_ve_late_payments_report | ||
203 | 34 | #: report:account.late.payments.l10n.ve:0 | ||
204 | 35 | msgid "Due" | ||
205 | 36 | msgstr "Debe" | ||
206 | 37 | |||
207 | 38 | #. module: l10n_ve_late_payments_report | ||
208 | 39 | #: report:account.late.payments.l10n.ve:0 | ||
209 | 40 | msgid "Paid" | ||
210 | 41 | msgstr "Pagado" | ||
211 | 42 | |||
212 | 43 | #. module: l10n_ve_late_payments_report | ||
213 | 44 | #: report:account.late.payments.l10n.ve:0 | ||
214 | 45 | msgid "Balance :" | ||
215 | 46 | msgstr "Balance :" | ||
216 | 47 | |||
217 | 48 | #. module: l10n_ve_late_payments_report | ||
218 | 49 | #: report:account.late.payments.l10n.ve:0 | ||
219 | 50 | msgid "Maturity" | ||
220 | 51 | msgstr "Vencido" | ||
221 | 52 | |||
222 | 53 | #. module: l10n_ve_late_payments_report | ||
223 | 54 | #: report:account.late.payments.l10n.ve:0 | ||
224 | 55 | msgid "Maturity date" | ||
225 | 56 | msgstr "Fecha de Vencimiento" | ||
226 | 57 | |||
227 | 58 | #. module: l10n_ve_late_payments_report | ||
228 | 59 | #: report:account.late.payments.l10n.ve:0 | ||
229 | 60 | msgid "Sub-Total :" | ||
230 | 61 | msgstr "Sub-Total :" | ||
231 | 62 | |||
232 | 63 | #. module: l10n_ve_late_payments_report | ||
233 | 64 | #: report:account.late.payments.l10n.ve:0 | ||
234 | 65 | msgid "Date" | ||
235 | 66 | msgstr "Fecha" | ||
236 | 67 | |||
237 | 68 | #. module: l10n_ve_late_payments_report | ||
238 | 69 | #: report:account.late.payments.l10n.ve:0 | ||
239 | 70 | msgid "." | ||
240 | 71 | msgstr "." | ||
241 | 72 | |||
242 | 73 | #. module: l10n_ve_late_payments_report | ||
243 | 74 | #: report:account.late.payments.l10n.ve:0 | ||
244 | 75 | msgid "Ref" | ||
245 | 76 | msgstr "Ref" | ||
246 | 77 | |||
247 | 0 | 78 | ||
248 | === added file 'late_payments_report/late_payments_report.xml' | |||
249 | --- late_payments_report/late_payments_report.xml 1970-01-01 00:00:00 +0000 | |||
250 | +++ late_payments_report/late_payments_report.xml 2012-02-29 22:52:22 +0000 | |||
251 | @@ -0,0 +1,15 @@ | |||
252 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
253 | 2 | <openerp> | ||
254 | 3 | <data> | ||
255 | 4 | <report | ||
256 | 5 | id="late_payments_report" | ||
257 | 6 | model="res.partner" | ||
258 | 7 | name="account.late.payments.l10n.ve" | ||
259 | 8 | rml="late_payments_report/report/late_payments.rml" | ||
260 | 9 | string="Late Payments" | ||
261 | 10 | auto="False" | ||
262 | 11 | header="False" /> | ||
263 | 12 | |||
264 | 13 | |||
265 | 14 | </data> | ||
266 | 15 | </openerp> | ||
267 | 0 | 16 | ||
268 | === added directory 'late_payments_report/report' | |||
269 | === added file 'late_payments_report/report/__init__.py' | |||
270 | --- late_payments_report/report/__init__.py 1970-01-01 00:00:00 +0000 | |||
271 | +++ late_payments_report/report/__init__.py 2012-02-29 22:52:22 +0000 | |||
272 | @@ -0,0 +1,27 @@ | |||
273 | 1 | # -*- encoding: utf-8 -*- | ||
274 | 2 | ########################################################################### | ||
275 | 3 | # Module Writen to OpenERP, Open Source Management Solution | ||
276 | 4 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). | ||
277 | 5 | # All Rights Reserved | ||
278 | 6 | ###############Credits###################################################### | ||
279 | 7 | # Coded by: Luis Escobar <luis@vauxoo.com> | ||
280 | 8 | # Planified by: Nhomar Hernandez | ||
281 | 9 | # Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve | ||
282 | 10 | # Audited by: Humberto Arocha humberto@openerp.com.ve | ||
283 | 11 | ############################################################################# | ||
284 | 12 | # This program is free software: you can redistribute it and/or modify | ||
285 | 13 | # it under the terms of the GNU General Public License as published by | ||
286 | 14 | # the Free Software Foundation, either version 3 of the License, or | ||
287 | 15 | # (at your option) any later version. | ||
288 | 16 | # | ||
289 | 17 | # This program is distributed in the hope that it will be useful, | ||
290 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
291 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
292 | 20 | # GNU General Public License for more details. | ||
293 | 21 | # | ||
294 | 22 | # You should have received a copy of the GNU General Public License | ||
295 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
296 | 24 | ############################################################################## | ||
297 | 25 | |||
298 | 26 | |||
299 | 27 | import late_payments | ||
300 | 0 | 28 | ||
301 | === added file 'late_payments_report/report/late_payments.py' | |||
302 | --- late_payments_report/report/late_payments.py 1970-01-01 00:00:00 +0000 | |||
303 | +++ late_payments_report/report/late_payments.py 2012-02-29 22:52:22 +0000 | |||
304 | @@ -0,0 +1,98 @@ | |||
305 | 1 | # -*- encoding: utf-8 -*- | ||
306 | 2 | ########################################################################### | ||
307 | 3 | # Module Writen to OpenERP, Open Source Management Solution | ||
308 | 4 | # Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>). | ||
309 | 5 | # All Rights Reserved | ||
310 | 6 | ###############Credits###################################################### | ||
311 | 7 | # Coded by: Luis Escobar <luis@vauxoo.com> | ||
312 | 8 | # Planified by: Nhomar Hernandez | ||
313 | 9 | # Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve | ||
314 | 10 | # Audited by: Humberto Arocha humberto@openerp.com.ve | ||
315 | 11 | ############################################################################# | ||
316 | 12 | # This program is free software: you can redistribute it and/or modify | ||
317 | 13 | # it under the terms of the GNU General Public License as published by | ||
318 | 14 | # the Free Software Foundation, either version 3 of the License, or | ||
319 | 15 | # (at your option) any later version. | ||
320 | 16 | # | ||
321 | 17 | # This program is distributed in the hope that it will be useful, | ||
322 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
323 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
324 | 20 | # GNU General Public License for more details. | ||
325 | 21 | # | ||
326 | 22 | # You should have received a copy of the GNU General Public License | ||
327 | 23 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
328 | 24 | ############################################################################## | ||
329 | 25 | |||
330 | 26 | import time | ||
331 | 27 | |||
332 | 28 | import ir | ||
333 | 29 | from osv import osv | ||
334 | 30 | from report import report_sxw | ||
335 | 31 | import pooler | ||
336 | 32 | |||
337 | 33 | class Late_payments(report_sxw.rml_parse): | ||
338 | 34 | def __init__(self, cr, uid, name, context): | ||
339 | 35 | super(Late_payments, self).__init__(cr, uid, name, context=context) | ||
340 | 36 | self.localcontext.update( { | ||
341 | 37 | 'time' : time, | ||
342 | 38 | 'adr_get' : self._adr_get, | ||
343 | 39 | 'getLines' : self._lines_get, | ||
344 | 40 | 'tel_get' : self._tel_get, | ||
345 | 41 | 'message' : self._message, | ||
346 | 42 | }) | ||
347 | 43 | self.context = context | ||
348 | 44 | def _adr_get(self, partner, type): | ||
349 | 45 | res = [] | ||
350 | 46 | res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') | ||
351 | 47 | res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address') | ||
352 | 48 | addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type]) | ||
353 | 49 | adr_id = addresses and addresses[type] or False | ||
354 | 50 | result = { | ||
355 | 51 | 'name': False, | ||
356 | 52 | 'street': False, | ||
357 | 53 | 'city' : False, | ||
358 | 54 | 'zip' : False, | ||
359 | 55 | 'country_id' : False, | ||
360 | 56 | } | ||
361 | 57 | if adr_id: | ||
362 | 58 | result = res_partner_address.read(self.cr, self.uid, [adr_id],context=self.context.copy()) | ||
363 | 59 | result[0]['country_id'] = result[0]['country_id'] and result[0]['country_id'][1] or False | ||
364 | 60 | return result | ||
365 | 61 | |||
366 | 62 | res.append(result) | ||
367 | 63 | return res | ||
368 | 64 | |||
369 | 65 | def _tel_get(self,partner): | ||
370 | 66 | if not partner: | ||
371 | 67 | return False | ||
372 | 68 | res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address') | ||
373 | 69 | res_partner = pooler.get_pool(self.cr.dbname).get('res.partner') | ||
374 | 70 | addresses = res_partner.address_get(self.cr, self.uid, [partner.id], ['invoice']) | ||
375 | 71 | adr_id = addresses and addresses['invoice'] or False | ||
376 | 72 | if adr_id: | ||
377 | 73 | adr=res_partner_address.read(self.cr, self.uid, [adr_id])[0] | ||
378 | 74 | return adr['phone'] | ||
379 | 75 | else: | ||
380 | 76 | return partner.address and partner.address[0].phone or False | ||
381 | 77 | return False | ||
382 | 78 | |||
383 | 79 | def _lines_get(self, partner): | ||
384 | 80 | moveline_obj = pooler.get_pool(self.cr.dbname).get('account.move.line') | ||
385 | 81 | movelines = moveline_obj.search(self.cr, self.uid, | ||
386 | 82 | [('partner_id', '=', partner.id), | ||
387 | 83 | ('account_id.type', 'in', ['receivable', 'payable']), | ||
388 | 84 | ('state', '<>', 'draft'), ('reconcile_id', '=', False)]) | ||
389 | 85 | movelines = moveline_obj.browse(self.cr, self.uid, movelines) | ||
390 | 86 | return movelines | ||
391 | 87 | |||
392 | 88 | def _message(self, obj, company): | ||
393 | 89 | company_pool = pooler.get_pool(self.cr.dbname).get('res.company') | ||
394 | 90 | message = company_pool.browse(self.cr, self.uid, company.id, {'lang':obj.lang}).overdue_msg | ||
395 | 91 | return message | ||
396 | 92 | |||
397 | 93 | report_sxw.report_sxw('report.account.late.payments.l10n.ve', 'res.partner', | ||
398 | 94 | 'addons/late_payments_report/report/late_payments.rml', parser=Late_payments) | ||
399 | 95 | |||
400 | 96 | |||
401 | 97 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
402 | 98 | |||
403 | 0 | 99 | ||
404 | === added file 'late_payments_report/report/late_payments.rml' | |||
405 | --- late_payments_report/report/late_payments.rml 1970-01-01 00:00:00 +0000 | |||
406 | +++ late_payments_report/report/late_payments.rml 2012-02-29 22:52:22 +0000 | |||
407 | @@ -0,0 +1,201 @@ | |||
408 | 1 | <?xml version="1.0"?> | ||
409 | 2 | <document filename="test.pdf"> | ||
410 | 3 | <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20"> | ||
411 | 4 | <pageTemplate id="first"> | ||
412 | 5 | <frame id="first" x1="42.0" y1="28.0" width="511" height="786"/> | ||
413 | 6 | </pageTemplate> | ||
414 | 7 | </template> | ||
415 | 8 | <stylesheet> | ||
416 | 9 | <blockTableStyle id="Standard_Outline"> | ||
417 | 10 | <blockAlignment value="LEFT"/> | ||
418 | 11 | <blockValign value="TOP"/> | ||
419 | 12 | </blockTableStyle> | ||
420 | 13 | <blockTableStyle id="Tabla1"> | ||
421 | 14 | <blockAlignment value="LEFT"/> | ||
422 | 15 | <blockValign value="TOP"/> | ||
423 | 16 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/> | ||
424 | 17 | <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/> | ||
425 | 18 | <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/> | ||
426 | 19 | <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/> | ||
427 | 20 | <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/> | ||
428 | 21 | <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/> | ||
429 | 22 | <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/> | ||
430 | 23 | <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/> | ||
431 | 24 | </blockTableStyle> | ||
432 | 25 | <blockTableStyle id="Tabla2"> | ||
433 | 26 | <blockAlignment value="LEFT"/> | ||
434 | 27 | <blockValign value="TOP"/> | ||
435 | 28 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/> | ||
436 | 29 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/> | ||
437 | 30 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/> | ||
438 | 31 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/> | ||
439 | 32 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/> | ||
440 | 33 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/> | ||
441 | 34 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/> | ||
442 | 35 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/> | ||
443 | 36 | </blockTableStyle> | ||
444 | 37 | <blockTableStyle id="Tabla4"> | ||
445 | 38 | <blockAlignment value="LEFT"/> | ||
446 | 39 | <blockValign value="TOP"/> | ||
447 | 40 | <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/> | ||
448 | 41 | <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/> | ||
449 | 42 | <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/> | ||
450 | 43 | <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/> | ||
451 | 44 | <lineStyle kind="LINEABOVE" colorName="#000000" start="1,1" stop="1,1"/> | ||
452 | 45 | <lineStyle kind="LINEABOVE" colorName="#000000" start="2,1" stop="2,1"/> | ||
453 | 46 | <lineStyle kind="LINEABOVE" colorName="#000000" start="3,1" stop="3,1"/> | ||
454 | 47 | <lineStyle kind="LINEABOVE" colorName="#000000" start="4,1" stop="4,1"/> | ||
455 | 48 | </blockTableStyle> | ||
456 | 49 | <initialize> | ||
457 | 50 | <paraStyle name="all" alignment="justify"/> | ||
458 | 51 | </initialize> | ||
459 | 52 | <paraStyle name="Standard" fontName="Times-Roman"/> | ||
460 | 53 | <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> | ||
461 | 54 | <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> | ||
462 | 55 | <paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/> | ||
463 | 56 | <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> | ||
464 | 57 | <paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/> | ||
465 | 58 | <paraStyle name="Index" fontName="Times-Roman"/> | ||
466 | 59 | <paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/> | ||
467 | 60 | <paraStyle name="Footer" fontName="Times-Roman"/> | ||
468 | 61 | <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/> | ||
469 | 62 | <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||
470 | 63 | <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/> | ||
471 | 64 | <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
472 | 65 | <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
473 | 66 | <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
474 | 67 | <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
475 | 68 | <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
476 | 69 | <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
477 | 70 | <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/> | ||
478 | 71 | <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/> | ||
479 | 72 | <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
480 | 73 | <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
481 | 74 | <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||
482 | 75 | <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/> | ||
483 | 76 | <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
484 | 77 | <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
485 | 78 | <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
486 | 79 | <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/> | ||
487 | 80 | <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||
488 | 81 | </stylesheet> | ||
489 | 82 | <images/> | ||
490 | 83 | <story> | ||
491 | 84 | <para style="terp_default_8"> | ||
492 | 85 | <font color="white"> </font> | ||
493 | 86 | </para> | ||
494 | 87 | <section> | ||
495 | 88 | <para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para> | ||
496 | 89 | <para style="terp_default_8">[[ setLang(o.lang) ]]</para> | ||
497 | 90 | <para style="terp_default_9">[[ o.name ]]</para> | ||
498 | 91 | <para style="terp_default_9">[[ o.vat or removeParentNode('para') ]]</para> | ||
499 | 92 | <blockTable colWidths="56.0,137.0,52.0,72.0,62.0,59.0,58.0" style="Tabla1"> | ||
500 | 93 | <tr> | ||
501 | 94 | <td> | ||
502 | 95 | <para style="terp_tblheader_Details">Date</para> | ||
503 | 96 | </td> | ||
504 | 97 | <td> | ||
505 | 98 | <para style="terp_tblheader_Details">Description</para> | ||
506 | 99 | </td> | ||
507 | 100 | <td> | ||
508 | 101 | <para style="terp_tblheader_Details_Centre">Ref</para> | ||
509 | 102 | </td> | ||
510 | 103 | <td> | ||
511 | 104 | <para style="terp_tblheader_Details_Centre">Maturity date</para> | ||
512 | 105 | </td> | ||
513 | 106 | <td> | ||
514 | 107 | <para style="terp_tblheader_Details_Right">Due</para> | ||
515 | 108 | </td> | ||
516 | 109 | <td> | ||
517 | 110 | <para style="terp_tblheader_Details_Right">Paid</para> | ||
518 | 111 | </td> | ||
519 | 112 | <td> | ||
520 | 113 | <para style="terp_tblheader_Details_Right">Maturity</para> | ||
521 | 114 | </td> | ||
522 | 115 | </tr> | ||
523 | 116 | </blockTable> | ||
524 | 117 | <para style="terp_default_8"> | ||
525 | 118 | <font color="white"> </font> | ||
526 | 119 | </para> | ||
527 | 120 | <section> | ||
528 | 121 | <para style="terp_default_8">[[repeatIn(getLines(o), 'line') ]]</para> | ||
529 | 122 | <blockTable colWidths="56.0,138.0,52.0,73.0,62.0,59.0,58.0" style="Tabla2"> | ||
530 | 123 | <tr> | ||
531 | 124 | <td> | ||
532 | 125 | <para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para> | ||
533 | 126 | </td> | ||
534 | 127 | <td> | ||
535 | 128 | <para style="terp_default_9">[[ line['name'] ]]</para> | ||
536 | 129 | </td> | ||
537 | 130 | <td> | ||
538 | 131 | <para style="terp_default_Centre_9">[[ line['ref'] ]]</para> | ||
539 | 132 | </td> | ||
540 | 133 | <td> | ||
541 | 134 | <para style="terp_default_Centre_9">[[ line['date_maturity'] ]]</para> | ||
542 | 135 | </td> | ||
543 | 136 | <td> | ||
544 | 137 | <para style="terp_default_Right_9">[[ formatLang(line['debit']) and formatLang(line['debit'] * (line['account_id']['type'] == 'payable' and -1 or 1)) ]]</para> | ||
545 | 138 | </td> | ||
546 | 139 | <td> | ||
547 | 140 | <para style="terp_default_Right_9">[[ formatLang(line['credit']) and formatLang(line['credit'] * (line['account_id']['type'] == 'payable' and -1 or 1)) ]]</para> | ||
548 | 141 | </td> | ||
549 | 142 | <td> | ||
550 | 143 | <para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] < time.strftime('%Y-%m-%d')) and ((line['debit'] - line['credit']) * (line['account_id']['type'] == 'payable' and -1 or 1))) ]]</para> | ||
551 | 144 | </td> | ||
552 | 145 | </tr> | ||
553 | 146 | </blockTable> | ||
554 | 147 | </section> | ||
555 | 148 | <blockTable colWidths="244.0,75.0,62.0,59.0,58.0" style="Tabla4"> | ||
556 | 149 | <tr> | ||
557 | 150 | <td> | ||
558 | 151 | <para style="terp_default_Bold_9"></para> | ||
559 | 152 | </td> | ||
560 | 153 | <td> | ||
561 | 154 | <para style="terp_default_Bold_9">Sub-Total : </para> | ||
562 | 155 | </td> | ||
563 | 156 | <td> | ||
564 | 157 | <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] * (y['account_id']['type'] == 'payable' and -1 or 1)), getLines(o), 0))) ]]</para> | ||
565 | 158 | </td> | ||
566 | 159 | <td> | ||
567 | 160 | <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x ,y: x + (y['credit'] * (y['account_id']['type'] == 'payable' and -1 or 1)), getLines(o), 0))) ]] </para> | ||
568 | 161 | </td> | ||
569 | 162 | <td> | ||
570 | 163 | <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['debit'] - y['credit']) * (y['account_id']['type'] == 'payable' and -1 or 1)), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]]</para> | ||
571 | 164 | </td> | ||
572 | 165 | </tr> | ||
573 | 166 | <tr> | ||
574 | 167 | <td> | ||
575 | 168 | <para style="terp_default_Bold_9"></para> | ||
576 | 169 | </td> | ||
577 | 170 | <td> | ||
578 | 171 | <para style="terp_default_Bold_9">Balance : </para> | ||
579 | 172 | </td> | ||
580 | 173 | <td> | ||
581 | 174 | <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x +((y['debit'] - y['credit']) * (y['account_id']['type'] == 'payable' and -1 or 1)), getLines(o), 0))) ]]</para> | ||
582 | 175 | </td> | ||
583 | 176 | <td> | ||
584 | 177 | </td> | ||
585 | 178 | <td> | ||
586 | 179 | </td> | ||
587 | 180 | </tr> | ||
588 | 181 | </blockTable> | ||
589 | 182 | <para style="terp_default_9">Total amount due: [[ formatLang((reduce(lambda x, y: x + ((y['debit'] - y['credit']) * (y['account_id']['type'] == 'payable' and -1 or 1)), getLines(o), 0))) ]] [[ company.currency_id.name ]].</para> | ||
590 | 183 | <spacer length="2mm"/> | ||
591 | 184 | </section> | ||
592 | 185 | <section> | ||
593 | 186 | <para style="terp_default_8"> | ||
594 | 187 | <font color="white"> </font> | ||
595 | 188 | </para> | ||
596 | 189 | <para style="terp_default_9"> | ||
597 | 190 | <font color="white"> </font> | ||
598 | 191 | </para> | ||
599 | 192 | </section> | ||
600 | 193 | <para style="terp_default_9"> | ||
601 | 194 | <font color="white"> </font> | ||
602 | 195 | </para> | ||
603 | 196 | <para style="terp_default_8"> | ||
604 | 197 | <font color="white"> </font> | ||
605 | 198 | </para> | ||
606 | 199 | </story> | ||
607 | 200 | </document> | ||
608 | 201 |