Merge lp:~vxkikevx/addons-vauxoo/late_payments_report into lp:addons-vauxoo

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
Reviewer Review Type Date Requested Status
Gabriela Quilarque Pending
Review via email: mp+95282@code.launchpad.net

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
=== added directory 'late_payments_report'
=== added file 'late_payments_report/__init__.py'
--- late_payments_report/__init__.py 1970-01-01 00:00:00 +0000
+++ late_payments_report/__init__.py 2012-02-29 22:52:22 +0000
@@ -0,0 +1,26 @@
1# -*- encoding: utf-8 -*-
2###########################################################################
3# Module Writen to OpenERP, Open Source Management Solution
4# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
5# All Rights Reserved
6###############Credits######################################################
7# Coded by: Luis Escobar <luis@vauxoo.com>
8# Planified by: Nhomar Hernandez
9# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve
10# Audited by: Humberto Arocha humberto@openerp.com.ve
11#############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU 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 General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24##############################################################################
25
26import report
027
=== added file 'late_payments_report/__openerp__.py'
--- late_payments_report/__openerp__.py 1970-01-01 00:00:00 +0000
+++ late_payments_report/__openerp__.py 2012-02-29 22:52:22 +0000
@@ -0,0 +1,45 @@
1# -*- encoding: utf-8 -*-
2###########################################################################
3# Module Writen to OpenERP, Open Source Management Solution
4# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
5# All Rights Reserved
6###############Credits######################################################
7# Coded by: Luis Escobar <luis@vauxoo.com>
8# Planified by: Nhomar Hernandez
9# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve
10# Audited by: Humberto Arocha humberto@openerp.com.ve
11#############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU 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 General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24##############################################################################
25
26{
27 "name" : "Venezuelan Late Payments customisation",
28 "version" : "0.1",
29 "author" : "Vauxoo",
30 "category" : "Generic Modules/Others",
31 "website": "http://wiki.openerp.org.ve/",
32 "description": """
33
34 Modulo que realiza la personalizacion del reporte de pagos atrasados
35
36 """,
37 "depends" : ["base", "account"],
38 "init_xml" : [],
39 "update_xml" : [
40 "late_payments_report.xml",
41
42 ],
43 "active": False,
44 "installable": True
45}
046
=== added directory 'late_payments_report/i18n'
=== added file 'late_payments_report/i18n/es.po'
--- late_payments_report/i18n/es.po 1970-01-01 00:00:00 +0000
+++ late_payments_report/i18n/es.po 2012-02-29 22:52:22 +0000
@@ -0,0 +1,77 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * l10n_ve_late_payments_report
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.3\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2012-02-29 19:11+0000\n"
10"PO-Revision-Date: 2012-02-29 19:11+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: l10n_ve_late_payments_report
19#: report:account.late.payments.l10n.ve:0
20msgid "Total amount due:"
21msgstr "Monto total adeudado:"
22
23#. module: l10n_ve_late_payments_report
24#: model:ir.actions.report.xml,name:l10n_ve_late_payments_report.late_payments_l10n_ve
25msgid "Late Payments"
26msgstr "Pagos Atrasados"
27
28#. module: l10n_ve_late_payments_report
29#: report:account.late.payments.l10n.ve:0
30msgid "Description"
31msgstr "Descripcion"
32
33#. module: l10n_ve_late_payments_report
34#: report:account.late.payments.l10n.ve:0
35msgid "Due"
36msgstr "Debe"
37
38#. module: l10n_ve_late_payments_report
39#: report:account.late.payments.l10n.ve:0
40msgid "Paid"
41msgstr "Pagado"
42
43#. module: l10n_ve_late_payments_report
44#: report:account.late.payments.l10n.ve:0
45msgid "Balance :"
46msgstr "Balance :"
47
48#. module: l10n_ve_late_payments_report
49#: report:account.late.payments.l10n.ve:0
50msgid "Maturity"
51msgstr "Vencido"
52
53#. module: l10n_ve_late_payments_report
54#: report:account.late.payments.l10n.ve:0
55msgid "Maturity date"
56msgstr "Maturity date"
57
58#. module: l10n_ve_late_payments_report
59#: report:account.late.payments.l10n.ve:0
60msgid "Sub-Total :"
61msgstr "Sub-Total :"
62
63#. module: l10n_ve_late_payments_report
64#: report:account.late.payments.l10n.ve:0
65msgid "Date"
66msgstr "Fecha"
67
68#. module: l10n_ve_late_payments_report
69#: report:account.late.payments.l10n.ve:0
70msgid "."
71msgstr "."
72
73#. module: l10n_ve_late_payments_report
74#: report:account.late.payments.l10n.ve:0
75msgid "Ref"
76msgstr "Ref"
77
078
=== added file 'late_payments_report/i18n/es_VE.po'
--- late_payments_report/i18n/es_VE.po 1970-01-01 00:00:00 +0000
+++ late_payments_report/i18n/es_VE.po 2012-02-29 22:52:22 +0000
@@ -0,0 +1,77 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * l10n_ve_late_payments_report
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.3\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2012-02-29 19:11+0000\n"
10"PO-Revision-Date: 2012-02-29 19:11+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: l10n_ve_late_payments_report
19#: report:account.late.payments.l10n.ve:0
20msgid "Total amount due:"
21msgstr "Monto total adeudado:"
22
23#. module: l10n_ve_late_payments_report
24#: model:ir.actions.report.xml,name:l10n_ve_late_payments_report.late_payments_l10n_ve
25msgid "Late Payments"
26msgstr "Pagos Atrasados"
27
28#. module: l10n_ve_late_payments_report
29#: report:account.late.payments.l10n.ve:0
30msgid "Description"
31msgstr "Descripcion"
32
33#. module: l10n_ve_late_payments_report
34#: report:account.late.payments.l10n.ve:0
35msgid "Due"
36msgstr "Debe"
37
38#. module: l10n_ve_late_payments_report
39#: report:account.late.payments.l10n.ve:0
40msgid "Paid"
41msgstr "Pagado"
42
43#. module: l10n_ve_late_payments_report
44#: report:account.late.payments.l10n.ve:0
45msgid "Balance :"
46msgstr "Balance :"
47
48#. module: l10n_ve_late_payments_report
49#: report:account.late.payments.l10n.ve:0
50msgid "Maturity"
51msgstr "Vencido"
52
53#. module: l10n_ve_late_payments_report
54#: report:account.late.payments.l10n.ve:0
55msgid "Maturity date"
56msgstr "Fecha de Vencimiento"
57
58#. module: l10n_ve_late_payments_report
59#: report:account.late.payments.l10n.ve:0
60msgid "Sub-Total :"
61msgstr "Sub-Total :"
62
63#. module: l10n_ve_late_payments_report
64#: report:account.late.payments.l10n.ve:0
65msgid "Date"
66msgstr "Fecha"
67
68#. module: l10n_ve_late_payments_report
69#: report:account.late.payments.l10n.ve:0
70msgid "."
71msgstr "."
72
73#. module: l10n_ve_late_payments_report
74#: report:account.late.payments.l10n.ve:0
75msgid "Ref"
76msgstr "Ref"
77
078
=== added file 'late_payments_report/late_payments_report.xml'
--- late_payments_report/late_payments_report.xml 1970-01-01 00:00:00 +0000
+++ late_payments_report/late_payments_report.xml 2012-02-29 22:52:22 +0000
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <report
5 id="late_payments_report"
6 model="res.partner"
7 name="account.late.payments.l10n.ve"
8 rml="late_payments_report/report/late_payments.rml"
9 string="Late Payments"
10 auto="False"
11 header="False" />
12
13
14 </data>
15</openerp>
016
=== added directory 'late_payments_report/report'
=== added file 'late_payments_report/report/__init__.py'
--- late_payments_report/report/__init__.py 1970-01-01 00:00:00 +0000
+++ late_payments_report/report/__init__.py 2012-02-29 22:52:22 +0000
@@ -0,0 +1,27 @@
1# -*- encoding: utf-8 -*-
2###########################################################################
3# Module Writen to OpenERP, Open Source Management Solution
4# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
5# All Rights Reserved
6###############Credits######################################################
7# Coded by: Luis Escobar <luis@vauxoo.com>
8# Planified by: Nhomar Hernandez
9# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve
10# Audited by: Humberto Arocha humberto@openerp.com.ve
11#############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU 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 General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24##############################################################################
25
26
27import late_payments
028
=== added file 'late_payments_report/report/late_payments.py'
--- late_payments_report/report/late_payments.py 1970-01-01 00:00:00 +0000
+++ late_payments_report/report/late_payments.py 2012-02-29 22:52:22 +0000
@@ -0,0 +1,98 @@
1# -*- encoding: utf-8 -*-
2###########################################################################
3# Module Writen to OpenERP, Open Source Management Solution
4# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
5# All Rights Reserved
6###############Credits######################################################
7# Coded by: Luis Escobar <luis@vauxoo.com>
8# Planified by: Nhomar Hernandez
9# Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve
10# Audited by: Humberto Arocha humberto@openerp.com.ve
11#############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU 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 General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24##############################################################################
25
26import time
27
28import ir
29from osv import osv
30from report import report_sxw
31import pooler
32
33class Late_payments(report_sxw.rml_parse):
34 def __init__(self, cr, uid, name, context):
35 super(Late_payments, self).__init__(cr, uid, name, context=context)
36 self.localcontext.update( {
37 'time' : time,
38 'adr_get' : self._adr_get,
39 'getLines' : self._lines_get,
40 'tel_get' : self._tel_get,
41 'message' : self._message,
42 })
43 self.context = context
44 def _adr_get(self, partner, type):
45 res = []
46 res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
47 res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address')
48 addresses = res_partner.address_get(self.cr, self.uid, [partner.id], [type])
49 adr_id = addresses and addresses[type] or False
50 result = {
51 'name': False,
52 'street': False,
53 'city' : False,
54 'zip' : False,
55 'country_id' : False,
56 }
57 if adr_id:
58 result = res_partner_address.read(self.cr, self.uid, [adr_id],context=self.context.copy())
59 result[0]['country_id'] = result[0]['country_id'] and result[0]['country_id'][1] or False
60 return result
61
62 res.append(result)
63 return res
64
65 def _tel_get(self,partner):
66 if not partner:
67 return False
68 res_partner_address = pooler.get_pool(self.cr.dbname).get('res.partner.address')
69 res_partner = pooler.get_pool(self.cr.dbname).get('res.partner')
70 addresses = res_partner.address_get(self.cr, self.uid, [partner.id], ['invoice'])
71 adr_id = addresses and addresses['invoice'] or False
72 if adr_id:
73 adr=res_partner_address.read(self.cr, self.uid, [adr_id])[0]
74 return adr['phone']
75 else:
76 return partner.address and partner.address[0].phone or False
77 return False
78
79 def _lines_get(self, partner):
80 moveline_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
81 movelines = moveline_obj.search(self.cr, self.uid,
82 [('partner_id', '=', partner.id),
83 ('account_id.type', 'in', ['receivable', 'payable']),
84 ('state', '<>', 'draft'), ('reconcile_id', '=', False)])
85 movelines = moveline_obj.browse(self.cr, self.uid, movelines)
86 return movelines
87
88 def _message(self, obj, company):
89 company_pool = pooler.get_pool(self.cr.dbname).get('res.company')
90 message = company_pool.browse(self.cr, self.uid, company.id, {'lang':obj.lang}).overdue_msg
91 return message
92
93report_sxw.report_sxw('report.account.late.payments.l10n.ve', 'res.partner',
94 'addons/late_payments_report/report/late_payments.rml', parser=Late_payments)
95
96
97# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
98
099
=== added file 'late_payments_report/report/late_payments.rml'
--- late_payments_report/report/late_payments.rml 1970-01-01 00:00:00 +0000
+++ late_payments_report/report/late_payments.rml 2012-02-29 22:52:22 +0000
@@ -0,0 +1,201 @@
1<?xml version="1.0"?>
2<document filename="test.pdf">
3 <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="42.0" y1="28.0" width="511" height="786"/>
6 </pageTemplate>
7 </template>
8 <stylesheet>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
12 </blockTableStyle>
13 <blockTableStyle id="Tabla1">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
16 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
17 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
18 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
19 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
20 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
21 <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
22 <lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
23 <lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
24 </blockTableStyle>
25 <blockTableStyle id="Tabla2">
26 <blockAlignment value="LEFT"/>
27 <blockValign value="TOP"/>
28 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
29 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
30 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
31 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
32 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
33 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
34 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
35 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
36 </blockTableStyle>
37 <blockTableStyle id="Tabla4">
38 <blockAlignment value="LEFT"/>
39 <blockValign value="TOP"/>
40 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
41 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
42 <lineStyle kind="LINEABOVE" colorName="#000000" start="3,0" stop="3,0"/>
43 <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
44 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,1" stop="1,1"/>
45 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,1" stop="2,1"/>
46 <lineStyle kind="LINEABOVE" colorName="#000000" start="3,1" stop="3,1"/>
47 <lineStyle kind="LINEABOVE" colorName="#000000" start="4,1" stop="4,1"/>
48 </blockTableStyle>
49 <initialize>
50 <paraStyle name="all" alignment="justify"/>
51 </initialize>
52 <paraStyle name="Standard" fontName="Times-Roman"/>
53 <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
54 <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
55 <paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
56 <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
57 <paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
58 <paraStyle name="Index" fontName="Times-Roman"/>
59 <paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
60 <paraStyle name="Footer" fontName="Times-Roman"/>
61 <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
62 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
63 <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
64 <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
65 <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
66 <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
67 <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
68 <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
69 <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
70 <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
71 <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
72 <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
73 <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
74 <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
75 <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
76 <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
77 <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
78 <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
79 <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
80 <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
81 </stylesheet>
82 <images/>
83 <story>
84 <para style="terp_default_8">
85 <font color="white"> </font>
86 </para>
87 <section>
88 <para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
89 <para style="terp_default_8">[[ setLang(o.lang) ]]</para>
90 <para style="terp_default_9">[[ o.name ]]</para>
91 <para style="terp_default_9">[[ o.vat or removeParentNode('para') ]]</para>
92 <blockTable colWidths="56.0,137.0,52.0,72.0,62.0,59.0,58.0" style="Tabla1">
93 <tr>
94 <td>
95 <para style="terp_tblheader_Details">Date</para>
96 </td>
97 <td>
98 <para style="terp_tblheader_Details">Description</para>
99 </td>
100 <td>
101 <para style="terp_tblheader_Details_Centre">Ref</para>
102 </td>
103 <td>
104 <para style="terp_tblheader_Details_Centre">Maturity date</para>
105 </td>
106 <td>
107 <para style="terp_tblheader_Details_Right">Due</para>
108 </td>
109 <td>
110 <para style="terp_tblheader_Details_Right">Paid</para>
111 </td>
112 <td>
113 <para style="terp_tblheader_Details_Right">Maturity</para>
114 </td>
115 </tr>
116 </blockTable>
117 <para style="terp_default_8">
118 <font color="white"> </font>
119 </para>
120 <section>
121 <para style="terp_default_8">[[repeatIn(getLines(o), 'line') ]]</para>
122 <blockTable colWidths="56.0,138.0,52.0,73.0,62.0,59.0,58.0" style="Tabla2">
123 <tr>
124 <td>
125 <para style="terp_default_9">[[ formatLang(line['date'],date=True) ]]</para>
126 </td>
127 <td>
128 <para style="terp_default_9">[[ line['name'] ]]</para>
129 </td>
130 <td>
131 <para style="terp_default_Centre_9">[[ line['ref'] ]]</para>
132 </td>
133 <td>
134 <para style="terp_default_Centre_9">[[ line['date_maturity'] ]]</para>
135 </td>
136 <td>
137 <para style="terp_default_Right_9">[[ formatLang(line['debit']) and formatLang(line['debit'] * (line['account_id']['type'] == 'payable' and -1 or 1)) ]]</para>
138 </td>
139 <td>
140 <para style="terp_default_Right_9">[[ formatLang(line['credit']) and formatLang(line['credit'] * (line['account_id']['type'] == 'payable' and -1 or 1)) ]]</para>
141 </td>
142 <td>
143 <para style="terp_default_Right_9">[[ formatLang((line['date_maturity'] &lt; time.strftime('%Y-%m-%d')) and ((line['debit'] - line['credit']) * (line['account_id']['type'] == 'payable' and -1 or 1))) ]]</para>
144 </td>
145 </tr>
146 </blockTable>
147 </section>
148 <blockTable colWidths="244.0,75.0,62.0,59.0,58.0" style="Tabla4">
149 <tr>
150 <td>
151 <para style="terp_default_Bold_9"></para>
152 </td>
153 <td>
154 <para style="terp_default_Bold_9">Sub-Total : </para>
155 </td>
156 <td>
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>
158 </td>
159 <td>
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>
161 </td>
162 <td>
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'] &lt; time.strftime('%Y-%m-%d'), getLines(o)), 0))) ]]</para>
164 </td>
165 </tr>
166 <tr>
167 <td>
168 <para style="terp_default_Bold_9"></para>
169 </td>
170 <td>
171 <para style="terp_default_Bold_9">Balance : </para>
172 </td>
173 <td>
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>
175 </td>
176 <td>
177 </td>
178 <td>
179 </td>
180 </tr>
181 </blockTable>
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>
183 <spacer length="2mm"/>
184 </section>
185 <section>
186 <para style="terp_default_8">
187 <font color="white"> </font>
188 </para>
189 <para style="terp_default_9">
190 <font color="white"> </font>
191 </para>
192 </section>
193 <para style="terp_default_9">
194 <font color="white"> </font>
195 </para>
196 <para style="terp_default_8">
197 <font color="white"> </font>
198 </para>
199 </story>
200</document>
201