Merge lp:~matjaz-6/openerpsl/openerpsl_02_17 into lp:openerpsl/7.0

Proposed by Matjaz Kalic
Status: Merged
Merged at revision: 388
Proposed branch: lp:~matjaz-6/openerpsl/openerpsl_02_17
Merge into: lp:openerpsl/7.0
Diff against target: 460 lines (+405/-1)
7 files modified
pekarna_reports/__init__.py (+1/-0)
pekarna_reports/account.py (+45/-0)
pekarna_reports/pekarna_reports.xml (+8/-0)
pekarna_reports/report/__init__.py (+1/-0)
pekarna_reports/report/account_print_overdue.py (+75/-0)
pekarna_reports/report/account_print_overdue.rml (+274/-0)
pekarna_reports/res_partner.py (+1/-1)
To merge this branch: bzr merge lp:~matjaz-6/openerpsl/openerpsl_02_17
Reviewer Review Type Date Requested Status
Mentis Pending
Review via email: mp+216296@code.launchpad.net

Description of the change

[ADD] pekarna_reports (account_print_overdue report added)

To post a comment you must log in.
388. By Dušan Laznik (Mentis)

[ADD] pekarna_reports (account_print_overdue report added)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'pekarna_reports/__init__.py'
2--- pekarna_reports/__init__.py 2014-01-06 19:11:54 +0000
3+++ pekarna_reports/__init__.py 2014-04-17 11:42:33 +0000
4@@ -22,3 +22,4 @@
5 import report
6 import pekarna_reports
7 import res_partner
8+import account
9
10=== added file 'pekarna_reports/account.py'
11--- pekarna_reports/account.py 1970-01-01 00:00:00 +0000
12+++ pekarna_reports/account.py 2014-04-17 11:42:33 +0000
13@@ -0,0 +1,45 @@
14+# -*- coding: utf-8 -*-
15+##############################################################################
16+#
17+# OpenERP, Open Source Management Solution
18+# Copyright (C) 2014 Mentis d.o.o.
19+#
20+# This program is free software: you can redistribute it and/or modify
21+# it under the terms of the GNU Affero General Public License as
22+# published by the Free Software Foundation, either version 3 of the
23+# License, or (at your option) any later version.
24+#
25+# This program is distributed in the hope that it will be useful,
26+# but WITHOUT ANY WARRANTY; without even the implied warranty of
27+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+# GNU Affero General Public License for more details.
29+#
30+# You should have received a copy of the GNU Affero General Public License
31+# along with this program. If not, see <http://www.gnu.org/licenses/>.
32+#
33+##############################################################################
34+
35+from osv import fields, osv
36+from tools.translate import _
37+from datetime import datetime
38+
39+class account_move_line(osv.osv):
40+
41+ def _days_overdue(self, cr, uid, ids, name, args, context=None):
42+ result = {}
43+ for line in self.browse(cr, uid, ids):
44+ if line.date_maturity:
45+ razlika = datetime.today() - datetime.strptime(line.date_maturity, "%Y-%m-%d")
46+ result[line.id] = razlika.days
47+ else:
48+ result[line.id] = 0
49+ return result
50+
51+ _inherit = "account.move.line"
52+ _columns = {
53+ 'days_overdue': fields.function(_days_overdue, type='integer', string='Days overdue'),
54+ }
55+
56+account_move_line()
57+
58+
59
60=== modified file 'pekarna_reports/pekarna_reports.xml'
61--- pekarna_reports/pekarna_reports.xml 2013-09-05 08:42:43 +0000
62+++ pekarna_reports/pekarna_reports.xml 2014-04-17 11:42:33 +0000
63@@ -20,5 +20,13 @@
64 string="Delivery Slip"
65 rml="pekarna_reports/report/stock_picking.rml"
66 />
67+ <report
68+ auto="False"
69+ id="account.account_overdue_pekarna"
70+ model="res.partner"
71+ name="account.overdue.pekarna"
72+ rml="pekarna_reports/report/account_print_overdue.rml"
73+ string="Overdue Payments 2"
74+ />
75 </data>
76 </openerp>
77
78=== modified file 'pekarna_reports/report/__init__.py'
79--- pekarna_reports/report/__init__.py 2013-09-05 08:42:43 +0000
80+++ pekarna_reports/report/__init__.py 2014-04-17 11:42:33 +0000
81@@ -21,4 +21,5 @@
82
83 import account_print_invoice
84 import stock_picking
85+import account_print_overdue
86
87
88=== added file 'pekarna_reports/report/account_print_overdue.py'
89--- pekarna_reports/report/account_print_overdue.py 1970-01-01 00:00:00 +0000
90+++ pekarna_reports/report/account_print_overdue.py 2014-04-17 11:42:33 +0000
91@@ -0,0 +1,75 @@
92+# -*- coding: utf-8 -*-
93+##############################################################################
94+#
95+# OpenERP, Open Source Management Solution
96+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
97+#
98+# This program is free software: you can redistribute it and/or modify
99+# it under the terms of the GNU Affero General Public License as
100+# published by the Free Software Foundation, either version 3 of the
101+# License, or (at your option) any later version.
102+#
103+# This program is distributed in the hope that it will be useful,
104+# but WITHOUT ANY WARRANTY; without even the implied warranty of
105+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
106+# GNU Affero General Public License for more details.
107+#
108+# You should have received a copy of the GNU Affero General Public License
109+# along with this program. If not, see <http://www.gnu.org/licenses/>.
110+#
111+##############################################################################
112+
113+import time
114+
115+from openerp.report import report_sxw
116+from openerp import pooler
117+
118+class Overdue2(report_sxw.rml_parse):
119+ def __init__(self, cr, uid, name, context):
120+ super(Overdue2, self).__init__(cr, uid, name, context=context)
121+ self.localcontext.update( {
122+ 'time': time,
123+ 'getLines': self._lines_get,
124+ #'tel_get': self._tel_get,
125+ 'message': self._message,
126+ 'getDescription': self._get_description
127+ })
128+ self.context = context
129+
130+# def _tel_get(self,partner):
131+# if not partner:
132+# return False
133+# res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
134+# addresses = res_partner.address_get(self.cr, self.uid, [partner.id], ['invoice'])
135+# adr_id = addresses and addresses['invoice'] or False
136+# if adr_id:
137+# adr=res_partner_address.read(self.cr, self.uid, [adr_id])[0]
138+# return adr['phone']
139+# else:
140+# return partner.phone or False
141+# return False
142+
143+ def _lines_get(self, partner):
144+ moveline_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
145+ movelines = moveline_obj.search(self.cr, self.uid,
146+ [('partner_id', '=', partner.id),
147+ ('account_id.type', 'in', ['receivable']),#('account_id.code', 'in', ['120000','120200','121000']),
148+ ('state', '<>', 'draft'), ('reconcile_id', '=', False),
149+ '|', ('date_maturity','<=',time.strftime('%Y-%m-%d %H:%M:%S')), ('date_maturity', '=', False)
150+ ], order='date_maturity desc')
151+ movelines = moveline_obj.browse(self.cr, self.uid, movelines)
152+ return movelines
153+
154+ def _message(self, obj, company):
155+ company_pool = pooler.get_pool(self.cr.dbname).get('res.company')
156+ message = company_pool.browse(self.cr, self.uid, company.id, {'lang':obj.lang}).overdue_msg
157+ return message.split('\n')
158+
159+ def _get_description(self, line):
160+ return line.move_id.name
161+
162+report_sxw.report_sxw('report.account.overdue.pekarna', 'res.partner', 'pekarna_reports/report/account_print_overdue.rml', parser=Overdue2)
163+
164+
165+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
166+
167
168=== added file 'pekarna_reports/report/account_print_overdue.rml'
169--- pekarna_reports/report/account_print_overdue.rml 1970-01-01 00:00:00 +0000
170+++ pekarna_reports/report/account_print_overdue.rml 2014-04-17 11:42:33 +0000
171@@ -0,0 +1,274 @@
172+<?xml version="1.0"?>
173+<document filename="test.pdf">
174+ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
175+ <pageTemplate id="first">
176+ <frame id="first" x1="42.0" y1="28.0" width="511" height="786"/>
177+ </pageTemplate>
178+ </template>
179+ <stylesheet>
180+ <blockTableStyle id="Standard_Outline">
181+ <blockAlignment value="LEFT"/>
182+ <blockValign value="TOP"/>
183+ </blockTableStyle>
184+ <blockTableStyle id="Tableau2">
185+ <blockAlignment value="LEFT"/>
186+ <blockValign value="TOP"/>
187+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
188+ </blockTableStyle>
189+ <blockTableStyle id="Table_naslov">
190+ <blockAlignment value="LEFT"/>
191+ <blockValign value="TOP"/>
192+ </blockTableStyle>
193+ <blockTableStyle id="Table_ref">
194+ <blockAlignment value="LEFT"/>
195+ <blockValign value="TOP"/>
196+ </blockTableStyle>
197+ <blockTableStyle id="Table_message">
198+ <blockAlignment value="LEFT"/>
199+ <blockValign value="TOP"/>
200+ </blockTableStyle>
201+ <blockTableStyle id="Table1">
202+ <blockAlignment value="LEFT"/>
203+ <blockValign value="TOP"/>
204+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
205+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
206+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
207+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
208+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
209+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
210+ <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
211+ </blockTableStyle>
212+ <blockTableStyle id="Table3">
213+ <blockAlignment value="LEFT"/>
214+ <blockValign value="TOP"/>
215+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
216+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
217+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
218+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
219+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
220+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
221+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
222+ </blockTableStyle>
223+ <blockTableStyle id="Table2">
224+ <blockAlignment value="LEFT"/>
225+ <blockValign value="TOP"/>
226+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
227+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
228+ <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
229+ <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
230+ </blockTableStyle>
231+ <blockTableStyle id="Table_total_due">
232+ <blockAlignment value="LEFT"/>
233+ <blockValign value="TOP"/>
234+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
235+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
236+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
237+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
238+ </blockTableStyle>
239+ <initialize>
240+ <paraStyle name="all" alignment="justify"/>
241+ </initialize>
242+ <paraStyle name="P1" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
243+ <paraStyle name="P2" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
244+ <paraStyle name="P3" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
245+ <paraStyle name="P4" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
246+ <paraStyle name="P5" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
247+ <paraStyle name="P6" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
248+ <paraStyle name="Standard" fontName="Helvetica"/>
249+ <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
250+ <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
251+ <paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
252+ <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
253+ <paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
254+ <paraStyle name="Index" fontName="Helvetica"/>
255+ <paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
256+ <paraStyle name="Footer" fontName="Helvetica"/>
257+ <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
258+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
259+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
260+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
261+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
262+ <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
263+ <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
264+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
265+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
266+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
267+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
268+ <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
269+ <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
270+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
271+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
272+ <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
273+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
274+ <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
275+ <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
276+ <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
277+ <paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
278+ <images/>
279+ </stylesheet>
280+ <story>
281+ <para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
282+ <para style="terp_default_8">[[ setLang(o.lang) ]]</para>
283+ <blockTable colWidths="286.0,224.0" style="Tableau2">
284+ <tr>
285+ <td>
286+ <para style="terp_default_9">
287+ <font color="white"> </font>
288+ </para>
289+ </td>
290+ <td>
291+ <para style="P5">Customer account statement</para>
292+ </td>
293+ </tr>
294+ </blockTable>
295+ <blockTable colWidths="286.0,224.0" style="Table_naslov">
296+ <tr>
297+ <td>
298+ <para style="P6">[[ o.title.name or '' ]] [[ o.name ]]</para>
299+ <para style="P6">[[ display_address(o) ]]</para>
300+ <para style="terp_default_9">
301+ <font color="white"> </font>
302+ </para>
303+ <para style="P4">VAT: [[ o.vat or removeParentNode('para') ]]</para>
304+ </td>
305+ <td>
306+ <blockTable colWidths="80.0,139.0" style="Table_ref">
307+ <tr>
308+ <td>
309+ <para style="P3">Date:</para>
310+ </td>
311+ <td>
312+ <para style="P3">[[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para>
313+ </td>
314+ </tr>
315+ <tr>
316+ <td>
317+ <para style="P3">Customer Ref:</para>
318+ </td>
319+ <td>
320+ <para style="P3">[[ o.ref or ' ']]</para>
321+ </td>
322+ </tr>
323+ </blockTable>
324+ <para style="P2">
325+ <font color="white"> </font>
326+ </para>
327+ </td>
328+ </tr>
329+ </blockTable>
330+ <para style="terp_default_8">
331+ <font color="white"> </font>
332+ </para>
333+ <para style="terp_default_8">
334+ <font color="white"> </font>
335+ </para>
336+ <section>
337+ <para style="terp_default_9">[[ not getLines(o) and removeParentNode('section') ]]</para>
338+ <blockTable colWidths="510.0" style="Table_message">
339+ <tr>
340+ <td>
341+ <para style="terp_default_9">[[repeatIn(message(o, company), 'message_line') ]]</para>
342+ <para style="P1">[[ message_line ]]</para>
343+ </td>
344+ </tr>
345+ </blockTable>
346+ </section>
347+ <para style="terp_default_Bold_9">[[ getLines(o) and removeParentNode('para') or 'There is nothing due with this customer.']]</para>
348+ <para style="terp_default_Bold_9">
349+ <font color="white"> </font>
350+ </para>
351+ <para style="terp_default_Bold_9">
352+ <font color="white"> </font>
353+ </para>
354+ <blockTable colWidths="76.0,132.0,78.0,49.0,49.0,51.0,76.0" style="Table1">
355+ <tr>
356+ <td>
357+ <para style="terp_tblheader_Details">Date[[ not getLines(o) and removeParentNode('blockTable') ]]</para>
358+ </td>
359+ <td>
360+ <para style="terp_tblheader_Details">Description</para>
361+ </td>
362+ <td>
363+ <para style="terp_tblheader_Details_Centre">Maturity date</para>
364+ </td>
365+ <td>
366+ <para style="terp_tblheader_Details_Right">Days Overdue</para>
367+ </td>
368+ <td>
369+ <para style="terp_tblheader_Details_Right">Due</para>
370+ </td>
371+ <td>
372+ <para style="terp_tblheader_Details_Right">Paid</para>
373+ </td>
374+ <td>
375+ <para style="terp_tblheader_Details_Right">Maturity</para>
376+ </td>
377+ </tr>
378+ </blockTable>
379+ <section>
380+ <para style="terp_default_8">[[repeatIn(getLines(o), 'line') ]]</para>
381+ <blockTable colWidths="76.0,132.0,78.0,49.0,49.0,51.0,75.0" style="Table3">
382+ <tr>
383+ <td>
384+ <para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para>
385+ </td>
386+ <td>
387+ <para style="terp_default_9">[[ getDescription(line) ]]</para>
388+ </td>
389+ <td>
390+ <para style="terp_default_Centre_9">[[ line['date_maturity'] and formatLang(line['date_maturity'],date=True) or '' ]]</para>
391+ </td>
392+ <td>
393+ <para style="terp_default_Right_9">[[ line.days_overdue ]]</para>
394+ </td>
395+ <td>
396+ <para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['debit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['credit'] * -1) or ' ') ]] </para>
397+ </td>
398+ <td>
399+ <para style="terp_default_Right_9">[[ (line['account_id']['type'] == 'receivable' and formatLang(line['credit']) or 0) or (line['account_id']['type'] == 'payable' and formatLang(line['debit'] * -1) or 0) ]]</para>
400+ </td>
401+ <td>
402+ <para style="terp_default_Right_9">[[ (time.strftime('%Y-%m-%d') &gt;= line['date_maturity']) and formatLang(line['debit'] - line['credit'], currency_obj = company.currency_id) ]]</para>
403+ </td>
404+ </tr>
405+ </blockTable>
406+ </section>
407+ <blockTable colWidths="244.0,71.0,68.0,51.0,75.0" style="Table2">
408+ <tr>
409+ <td>
410+ <para style="terp_default_8">
411+ <font color="white"> </font>
412+ </para>
413+ </td>
414+ <td>
415+ <para style="terp_default_Bold_9">[[ not getLines(o) and removeParentNode('blockTable') or 'Total:']]</para>
416+ </td>
417+ <td>
418+ <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['debit'] or 0) or (y['account_id']['type'] == 'payable' and y['credit'] * -1 or 0)), getLines(o), 0))) ]] </para>
419+ </td>
420+ <td>
421+ <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + ((y['account_id']['type'] == 'receivable' and y['credit'] or 0) or (y['account_id']['type'] == 'payable' and y['debit'] * -1 or 0)), getLines(o), 0))) ]] </para>
422+ </td>
423+ <td>
424+ <para style="terp_default_Right_9">[[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] &lt;= time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]] [[ company.currency_id.symbol ]]</para>
425+ </td>
426+ </tr>
427+ </blockTable>
428+ <para style="terp_default_9">
429+ <font color="white"> </font>
430+ </para>
431+ <blockTable colWidths="510.0" style="Table_total_due">
432+ <tr>
433+ <td>
434+ <para style="P1">Total amount due: [[ formatLang((reduce(lambda x, y: x + (y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] &lt;= time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]] [[ company.currency_id.symbol ]]</para>
435+ </td>
436+ </tr>
437+ </blockTable>
438+ <para style="terp_default_9">
439+ <font color="white"> </font>
440+ </para>
441+ <para style="terp_default_9">
442+ <font color="white"> </font>
443+ </para>
444+ </story>
445+</document>
446
447=== added file 'pekarna_reports/report/account_print_overdue.sxw'
448Binary files pekarna_reports/report/account_print_overdue.sxw 1970-01-01 00:00:00 +0000 and pekarna_reports/report/account_print_overdue.sxw 2014-04-17 11:42:33 +0000 differ
449=== modified file 'pekarna_reports/res_partner.py'
450--- pekarna_reports/res_partner.py 2014-01-06 23:18:26 +0000
451+++ pekarna_reports/res_partner.py 2014-04-17 11:42:33 +0000
452@@ -23,7 +23,7 @@
453 from osv import fields, osv
454 from tools.translate import _
455
456-class res_partner(osv.Model):
457+class res_partner(osv.osv):
458 _inherit = 'res.partner'
459
460 _columns = {

Subscribers

People subscribed via source and target branches