Merge lp:~cci-team/openobject-addons/cci_crm_fix-invoice_id-redundacy into lp:openobject-addons

Proposed by Philmer
Status: Superseded
Proposed branch: lp:~cci-team/openobject-addons/cci_crm_fix-invoice_id-redundacy
Merge into: lp:openobject-addons
Diff against target: 79891 lines (has conflicts)
Conflict adding file .bzrignore.  Moved existing file to .bzrignore.moved.
Conflict adding file account_coda.  Moved existing file to account_coda.moved.
To merge this branch: bzr merge lp:~cci-team/openobject-addons/cci_crm_fix-invoice_id-redundacy
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+112563@code.launchpad.net

This proposal has been superseded by a proposal from 2012-08-21.

Description of the change

Fix an ambiguous name on crm.case.

n cci_crm, we add an 'invoice_id'. Or in 'event', the object 'event.registration' inherits from crm.case but had already an 'invoice_id' name. This 'event.registration' has two fields 'invoice_id' : one on crm.case and one on 'event.registration'. This ambuguity causes some problems to show or use this field.

To correct this, I've changed the 'invoice_id' on cci_crm to 'sponsor_invoice_id' because this is the real usage of this field : to link a case to the invoice of a sponsor and only for this (on screen it appears in 'sponsor' part of view).

To post a comment you must log in.
Revision history for this message
qdp (OpenERP) (qdp) wrote :

Hello Philmer,

mmh i think you wrongly choose the branch aimed by your proposal: this is for addons trunk. Let me choose the right target.

See you soon,
Quentin

Unmerged revisions

150. By Philippe Vandermeer <philmer@philmer-laptop2>

[FIX] ambiguous invoice_id name with module cci_event renamed to sponsor_invoice_id

149. By Olivier Laurent (Open ERP)

[FIX] temporary fix for ccih install: bug in account.invoice 'name_get' method: it receives a list of tuples instead of a list of ids

148. By nel

[FIX] cci_account: reconcile

147. By nel

[FIX] reconciliation

146. By Olivier Laurent (Open ERP)

[FIX] opw 381817

145. By nel

[FIX] reconciliation

144. By Olivier Laurent (Open ERP)

[ADD] added certificate numbers

143. By Olivier Laurent (Open ERP)

[FIX] bad indentation

142. By Olivier Laurent (Open ERP)

[FIX] tabs2spaces

141. By Philippe Vandermeer <philmer@philmer-laptop2>

FIX: doesn't block all invoices if one partner has no address

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2012-06-28 13:21:29 +0000
4@@ -0,0 +1,1 @@
5+*.pyc
6
7=== renamed file '.bzrignore' => '.bzrignore.moved'
8=== added directory 'account_analytic_package'
9=== added file 'account_analytic_package/__init__.py'
10--- account_analytic_package/__init__.py 1970-01-01 00:00:00 +0000
11+++ account_analytic_package/__init__.py 2012-06-28 13:21:29 +0000
12@@ -0,0 +1,23 @@
13+##############################################################################
14+#
15+# OpenERP, Open Source Management Solution
16+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
17+#
18+# This program is free software: you can redistribute it and/or modify
19+# it under the terms of the GNU Affero General Public License as
20+# published by the Free Software Foundation, either version 3 of the
21+# License, or (at your option) any later version.
22+#
23+# This program is distributed in the hope that it will be useful,
24+# but WITHOUT ANY WARRANTY; without even the implied warranty of
25+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26+# GNU Affero General Public License for more details.
27+#
28+# You should have received a copy of the GNU Affero General Public License
29+# along with this program. If not, see <http://www.gnu.org/licenses/>.
30+#
31+##############################################################################
32+
33+import account_analytic_package
34+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
35+
36
37=== added file 'account_analytic_package/__terp__.py'
38--- account_analytic_package/__terp__.py 1970-01-01 00:00:00 +0000
39+++ account_analytic_package/__terp__.py 2012-06-28 13:21:29 +0000
40@@ -0,0 +1,43 @@
41+##############################################################################
42+#
43+# OpenERP, Open Source Management Solution
44+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
45+#
46+# This program is free software: you can redistribute it and/or modify
47+# it under the terms of the GNU Affero General Public License as
48+# published by the Free Software Foundation, either version 3 of the
49+# License, or (at your option) any later version.
50+#
51+# This program is distributed in the hope that it will be useful,
52+# but WITHOUT ANY WARRANTY; without even the implied warranty of
53+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
54+# GNU Affero General Public License for more details.
55+#
56+# You should have received a copy of the GNU Affero General Public License
57+# along with this program. If not, see <http://www.gnu.org/licenses/>.
58+#
59+##############################################################################
60+
61+{
62+ "name" : "Account Analytic Package - To configure Analytic Account for product packages",
63+ "description": """The Module allows to configure analytic account for product packages.
64+ Views for total and monthly product packages weight, Amount analysis.""",
65+ "version" : "1.0",
66+ "author" : "Tiny",
67+ "category" : "Generic Modules/Accounting",
68+ "module": "",
69+ "website": "http://www.openerp.com",
70+ "depends" : ["account","product","crm"],
71+ "init_xml" : [],
72+ "update_xml" : [
73+ "security/ir.model.access.csv",
74+ "account_analytic_package_view.xml"
75+ ],
76+ "demo_xml" : [],
77+ "active": False,
78+ "installable": True,
79+
80+'certificate': '00181681485805',
81+}
82+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
83+
84
85=== added file 'account_analytic_package/account_analytic_package.py'
86--- account_analytic_package/account_analytic_package.py 1970-01-01 00:00:00 +0000
87+++ account_analytic_package/account_analytic_package.py 2012-06-28 13:21:29 +0000
88@@ -0,0 +1,160 @@
89+##############################################################################
90+#
91+# OpenERP, Open Source Management Solution
92+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
93+#
94+# This program is free software: you can redistribute it and/or modify
95+# it under the terms of the GNU Affero General Public License as
96+# published by the Free Software Foundation, either version 3 of the
97+# License, or (at your option) any later version.
98+#
99+# This program is distributed in the hope that it will be useful,
100+# but WITHOUT ANY WARRANTY; without even the implied warranty of
101+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
102+# GNU Affero General Public License for more details.
103+#
104+# You should have received a copy of the GNU Affero General Public License
105+# along with this program. If not, see <http://www.gnu.org/licenses/>.
106+#
107+##############################################################################
108+
109+import operator
110+from osv import osv, fields
111+
112+
113+class account_analytic_account(osv.osv):
114+ _inherit = "account.analytic.account"
115+ _columns = {
116+ 'package_ok': fields.boolean('Used in Package'),
117+ }
118+account_analytic_account()
119+
120+
121+class product_product(osv.osv):
122+ _inherit = "product.product"
123+ _columns = {
124+ 'package_weight': fields.float('Package Weight', digits=(16,2)),
125+ }
126+ _defaults = {
127+ 'package_weight': lambda *args: 0.0
128+ }
129+product_product()
130+
131+class crm_case_section(osv.osv):
132+ _inherit = "crm.case.section"
133+ _columns = {
134+ 'package_product_id': fields.many2one('product.product', 'Package Product'),
135+ 'analytic_account_id': fields.many2one('account.analytic.account', 'Main Analytic Account'),
136+ 'analytic_journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'),
137+ }
138+crm_case_section()
139+
140+class crm_case(osv.osv):
141+ _inherit = "crm.case"
142+ def case_open(self, cr, uid, ids, *args):
143+ res = super(crm_case, self).case_open(cr, uid, ids, *args)
144+ for case in self.browse(cr,uid, ids):
145+ section = case.section_id
146+ if section.package_product_id and section.analytic_account_id and section.analytic_journal_id:
147+ partner = self.pool.get('res.users').browse(cr, uid, uid).address_id.partner_id.id
148+ aids = self.pool.get('account.analytic.account').search(cr, uid, [('partner_id','=',partner),('state','in',('open','draft','pending')),('parent_id','child_of',[section.analytic_account_id.id])])
149+ if not aids:
150+ raise osv.except_osv('You can not open this case !', 'No valid analytic account defined for your user.\nPlease contact the administrator.')
151+ self.pool.get('account.analytic.line').create(cr, uid, {
152+ 'name': case.name,
153+ 'amount': 0.0,
154+ 'unit_amount': 1,
155+ 'product_uom_id': section.package_product_id.uom_id.id,
156+ 'product_id': section.package_product_id.id,
157+ 'account_id': aids[0],
158+ 'general_account_id': section.package_product_id.property_account_income.id or section.package_product_id.categ_id.property_account_income_categ.id,
159+ 'journal_id': section.analytic_journal_id.id,
160+ 'user_id': uid,
161+ 'ref': 'CASE'+str(case.id)
162+ })
163+ return res
164+crm_case()
165+
166+
167+class account_analytic_line_package(osv.osv):
168+ _name = "account.analytic.line.package"
169+ _auto = False
170+ _order = 'date desc'
171+ def init(self, cr):
172+ cr.execute("""
173+ CREATE OR REPLACE VIEW account_analytic_line_package AS (
174+ select
175+ l.id,
176+ l.name,
177+ l.date,
178+ a.partner_id,
179+ a.id as account_id,
180+ l.product_id,
181+ p.package_weight as unit_weight,
182+ p.package_weight*l.unit_amount as total_weight,
183+ l.unit_amount
184+ from
185+ account_analytic_line l
186+ left join
187+ account_analytic_account a on (l.account_id=a.id)
188+ left join
189+ product_product p on (p.id=l.product_id)
190+ where
191+ l.product_id is not null and
192+ p.package_weight<>0 and
193+ a.package_ok
194+ )
195+ """)
196+ _columns = {
197+ 'name': fields.char('Name', size=128, readonly=True, select=1),
198+ 'date': fields.date('Date', readonly=True, select=1),
199+ 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
200+ 'account_id': fields.many2one('account.analytic.account', 'Account', readonly=True),
201+ 'product_id': fields.many2one('product.product', 'Product', select=2, readonly=True),
202+ 'unit_amount': fields.float('Quantity', readonly=True),
203+ 'unit_weight': fields.float('Unit Weight', readonly=True),
204+ 'total_weight': fields.float('Total Weight', readonly=True),
205+ }
206+account_analytic_line_package()
207+
208+class account_analytic_line_package_month(osv.osv):
209+ _name = "account.analytic.line.package.month"
210+ _auto = False
211+ def init(self, cr):
212+ cr.execute("""
213+ CREATE OR REPLACE VIEW account_analytic_line_package_month AS (
214+ select
215+ min(l.id) as id,
216+ to_char(l.date, 'YYYY-MM-01') as name,
217+ a.partner_id,
218+ l.product_id,
219+ sum(p.package_weight*l.unit_amount) as total_weight,
220+ sum(case when p.package_weight>0 then p.package_weight*l.unit_amount else 0 end) as total_activity,
221+ sum(case when p.package_weight<0 then -p.package_weight*l.unit_amount else 0 end) as total_service
222+ from
223+ account_analytic_line l
224+ left join
225+ account_analytic_account a on (l.account_id=a.id)
226+ left join
227+ product_product p on (p.id=l.product_id)
228+ where
229+ l.product_id is not null and
230+ p.package_weight<>0 and
231+ a.package_ok
232+ group by
233+ l.product_id,
234+ a.partner_id,
235+ to_char(l.date, 'YYYY-MM-01')
236+ )
237+ """)
238+ _columns ={
239+ 'name': fields.date('Date', readonly=True, select=1),
240+ 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
241+ 'product_id': fields.many2one('product.product', 'Product', select=2, readonly=True),
242+ 'total_weight': fields.float('Total Weight', readonly=True),
243+ 'total_activity': fields.float('Total Activity', readonly=True),
244+ 'total_service': fields.float('Total Service', readonly=True),
245+ }
246+account_analytic_line_package_month()
247+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
248+
249
250=== added file 'account_analytic_package/account_analytic_package_view.xml'
251--- account_analytic_package/account_analytic_package_view.xml 1970-01-01 00:00:00 +0000
252+++ account_analytic_package/account_analytic_package_view.xml 2012-06-28 13:21:29 +0000
253@@ -0,0 +1,235 @@
254+<?xml version="1.0" ?>
255+<openerp>
256+ <data>
257+
258+ <record model="ir.ui.view" id="view_account_analytic_package">
259+ <field name="name">account.analytic.account.package.form</field>
260+ <field name="model">account.analytic.account</field>
261+ <field name="inherit_id" ref="account.view_account_analytic_account_form" />
262+ <field name="type">form</field>
263+ <field name="arch" type="xml">
264+ <notebook position="inside">
265+ <page string="Package Weight">
266+ <field name="package_ok"/>
267+ </page>
268+ </notebook>
269+ </field>
270+ </record>
271+
272+
273+ <record model="ir.ui.view" id="view_crm_section_form_package">
274+ <field name="name">crm.case.section.package.form</field>
275+ <field name="model">crm.case.section</field>
276+ <field name="inherit_id" ref="crm.crm_case_section_view_form" />
277+ <field name="type">form</field>
278+ <field name="arch" type="xml">
279+ <notebook position="inside">
280+ <page string="Package Weight">
281+ <separator string="Analytic Package" colspan="4"/>
282+ <field name="package_product_id" colspan="4" />
283+ <field name="analytic_journal_id" colspan="4" />
284+ <field name="analytic_account_id" colspan="4" />
285+ <label string="The parent account of all package account" colspan="4"/>
286+ </page>
287+ </notebook>
288+ </field>
289+ </record>
290+
291+
292+ <record model="ir.ui.view" id="view_product_form_package">
293+ <field name="name">product.normal.package.form</field>
294+ <field name="model">product.product</field>
295+ <field name="inherit_id" ref="product.product_normal_form_view" />
296+ <field name="type">form</field>
297+ <field name="arch" type="xml">
298+ <notebook position="inside">
299+ <page string="Package Units">
300+ <separator string="Analytic Package" colspan="4"/>
301+ <field name="package_weight" colspan="4" />
302+ <label string="Zero if not part of a package" colspan="4"/>
303+ <label string="&lt;0 if it's a service unit" colspan="4"/>
304+ <label string="&gt;0 if it's a activity unit" colspan="4"/>
305+ </page>
306+ </notebook>
307+ </field>
308+ </record>
309+
310+ <record model="ir.ui.view" id="view_account_analytic_line_package_tree_simplified">
311+ <field name="name">account.analytic.line.package.simplified.tree</field>
312+ <field name="model">account.analytic.line.package</field>
313+ <field name="type">tree</field>
314+ <field name="priority">32</field>
315+ <field name="arch" type="xml">
316+ <tree string="Service &amp; Activity Units">
317+ <field name="date"/>
318+ <field name="name"/>
319+ <field name="product_id"/>
320+ <field name="unit_amount"/>
321+ <field name="unit_weight"/>
322+ <field name="total_weight" sum="Units"/>
323+ </tree>
324+ </field>
325+ </record>
326+ <record model="ir.actions.act_window" id="action_account_analytic_line_package_tree_simplified">
327+ <field name="name">Service &amp; Activity Units (no partner and account)</field>
328+ <field name="res_model">account.analytic.line.package</field>
329+ <field name="view_type">form</field>
330+ <field name="view_mode">tree</field>
331+ <field name="view_id" ref="view_account_analytic_line_package_tree_simplified"/>
332+ </record>
333+
334+
335+ <record model="ir.ui.view" id="view_account_analytic_line_package_form">
336+ <field name="name">account.analytic.line.package.form</field>
337+ <field name="model">account.analytic.line.package</field>
338+ <field name="type">form</field>
339+ <field name="arch" type="xml">
340+ <form string="Service &amp; Activity Units">
341+ <field name="date" select="1"/>
342+ <field name="name" select="2"/>
343+ <field name="partner_id" select="1"/>
344+ <field name="account_id" select="1"/>
345+ <field name="product_id" select="2"/>
346+ <field name="unit_amount"/>
347+ <field name="unit_weight"/>
348+ <field name="total_weight" sum="Units"/>
349+ </form>
350+ </field>
351+ </record>
352+ <record model="ir.ui.view" id="view_account_analytic_line_package_tree">
353+ <field name="name">account.analytic.line.package.tree</field>
354+ <field name="model">account.analytic.line.package</field>
355+ <field name="type">tree</field>
356+ <field name="arch" type="xml">
357+ <tree string="Service &amp; Activity Units">
358+ <field name="date"/>
359+ <field name="name"/>
360+ <field name="partner_id"/>
361+ <field name="account_id"/>
362+ <field name="product_id"/>
363+ <field name="unit_amount"/>
364+ <field name="unit_weight"/>
365+ <field name="total_weight" sum="Units"/>
366+ </tree>
367+ </field>
368+ </record>
369+ <record model="ir.actions.act_window" id="action_account_analytic_line_package_tree">
370+ <field name="name">Service &amp; Activity Units</field>
371+ <field name="res_model">account.analytic.line.package</field>
372+ <field name="view_type">form</field>
373+ <field name="view_mode">tree</field>
374+ <field name="view_id" ref="view_account_analytic_line_package_tree"/>
375+ </record>
376+ <menuitem name="Packages" id="menu_account_analytic_line_package" parent="account.menu_finance_reporting"/>
377+ <menuitem name="Service &amp; Activity Units" parent="menu_account_analytic_line_package"
378+ id="menu_account_analytic_line_package_tree"
379+ action="action_account_analytic_line_package_tree"/>
380+
381+ <record model="ir.actions.act_window" id="action_account_analytic_line_package_service_tree">
382+ <field name="name">Service Units</field>
383+ <field name="res_model">account.analytic.line.package</field>
384+ <field name="view_type">form</field>
385+ <field name="view_mode">tree</field>
386+ <field name="domain">[('total_weight','&lt;=',0.0)]</field>
387+ <field name="view_id" ref="view_account_analytic_line_package_tree"/>
388+ </record>
389+ <menuitem parent="menu_account_analytic_line_package_tree"
390+ id="menu_account_analytic_line_package_service_tree"
391+ action="action_account_analytic_line_package_service_tree"/>
392+ <record model="ir.actions.act_window" id="action_account_analytic_line_package_activity_tree">
393+ <field name="name">Activity Units</field>
394+ <field name="res_model">account.analytic.line.package</field>
395+ <field name="view_type">form</field>
396+ <field name="view_mode">tree</field>
397+ <field name="domain">[('total_weight','&gt;=',0.0)]</field>
398+ <field name="view_id" ref="view_account_analytic_line_package_tree"/>
399+ </record>
400+ <menuitem parent="menu_account_analytic_line_package_tree"
401+ id="menu_account_analytic_line_package_activity_tree"
402+ action="action_account_analytic_line_package_activity_tree"/>
403+
404+
405+ <record model="ir.ui.view" id="view_account_analytic_line_package_month_graph">
406+ <field name="name">account.analytic.line.package.month.graph</field>
407+ <field name="model">account.analytic.line.package.month</field>
408+ <field name="type">graph</field>
409+ <field name="arch" type="xml">
410+ <graph string="Analytic Package" type="bar">
411+ <field name="name"/>
412+ <field name="total_activity" operator="+"/>
413+ <field name="total_service" operator="+"/>
414+ </graph>
415+ </field>
416+ </record>
417+ <record model="ir.ui.view" id="view_account_analytic_line_package_month_form">
418+ <field name="name">account.analytic.line.package.month.form</field>
419+ <field name="model">account.analytic.line.package.month</field>
420+ <field name="type">form</field>
421+ <field name="arch" type="xml">
422+ <form string="Analytic Package">
423+ <field name="name" select="1"/>
424+ <field name="partner_id" select="1"/>
425+ <field name="product_id" select="2"/>
426+ <field name="total_weight" sum="Signed Units" select="2"/>
427+ <field name="total_activity" sum="Activity Units" select="2"/>
428+ <field name="total_service" sum="Service Units" select="2"/>
429+ </form>
430+ </field>
431+ </record>
432+ <record model="ir.ui.view" id="view_account_analytic_line_package_month_tree">
433+ <field name="name">account.analytic.line.package.month.tree</field>
434+ <field name="model">account.analytic.line.package.month</field>
435+ <field name="type">tree</field>
436+ <field name="arch" type="xml">
437+ <tree string="Analytic Package">
438+ <field name="name"/>
439+ <field name="partner_id"/>
440+ <field name="product_id"/>
441+ <field name="total_weight" sum="Signed Units"/>
442+ <field name="total_activity" sum="Activity Units"/>
443+ <field name="total_service" sum="Service Units"/>
444+ </tree>
445+ </field>
446+ </record>
447+ <record model="ir.actions.act_window" id="action_account_analytic_line_package_month_tree">
448+ <field name="name">Monthly Services &amp; Activity Units</field>
449+ <field name="res_model">account.analytic.line.package.month</field>
450+ <field name="view_type">form</field>
451+ <field name="view_mode">graph,tree</field>
452+ <field name="view_id" eval="False"/>
453+ </record>
454+ <menuitem parent="menu_account_analytic_line_package"
455+ id="menu_account_analytic_line_package_month_tree"
456+ action="action_account_analytic_line_package_month_tree"/>
457+
458+ <record model="ir.ui.view" id="package_product_tree">
459+ <field name="name">Products List</field>
460+ <field name="model">product.product</field>
461+ <field name="type">tree</field>
462+ <field name="priority">64</field>
463+ <field name="arch" type="xml">
464+ <tree string="Products Units" link="0">
465+ <field name="name"/>
466+ <field name="package_weight"/>
467+ </tree>
468+ </field>
469+ </record>
470+ <record model="ir.actions.act_window" id="action_package_product_tree">
471+ <field name="name">Products Units</field>
472+ <field name="res_model">product.product</field>
473+ <field name="view_type">form</field>
474+ <field name="view_mode">tree</field>
475+ <field name="view_id" eval="package_product_tree"/>
476+ <field name="domain">[('package_weight','&lt;&gt;',0)]</field>
477+ </record>
478+ <menuitem parent="menu_account_analytic_line_package"
479+ id="menu_action_package_product_tree"
480+ action="action_package_product_tree"/>
481+
482+
483+
484+
485+
486+
487+ </data>
488+</openerp>
489
490=== added directory 'account_analytic_package/i18n'
491=== added file 'account_analytic_package/i18n/account_analytic_package.pot'
492--- account_analytic_package/i18n/account_analytic_package.pot 1970-01-01 00:00:00 +0000
493+++ account_analytic_package/i18n/account_analytic_package.pot 2012-06-28 13:21:29 +0000
494@@ -0,0 +1,220 @@
495+# Translation of OpenERP Server.
496+# This file contains the translation of the following modules:
497+# * account_analytic_package
498+#
499+msgid ""
500+msgstr ""
501+"Project-Id-Version: OpenERP Server 5.0.6\n"
502+"Report-Msgid-Bugs-To: support@openerp.com\n"
503+"POT-Creation-Date: 2009-11-24 12:16:03+0000\n"
504+"PO-Revision-Date: 2009-11-24 12:16:03+0000\n"
505+"Last-Translator: <>\n"
506+"Language-Team: \n"
507+"MIME-Version: 1.0\n"
508+"Content-Type: text/plain; charset=UTF-8\n"
509+"Content-Transfer-Encoding: \n"
510+"Plural-Forms: \n"
511+
512+#. module: account_analytic_package
513+#: constraint:ir.model:0
514+msgid "The Object name must start with x_ and not contain any special character !"
515+msgstr ""
516+
517+#. module: account_analytic_package
518+#: view:account.analytic.line.package.month:0
519+msgid "Signed Units"
520+msgstr ""
521+
522+#. module: account_analytic_package
523+#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package
524+msgid "account.analytic.line.package"
525+msgstr ""
526+
527+#. module: account_analytic_package
528+#: constraint:ir.ui.view:0
529+msgid "Invalid XML for View Architecture!"
530+msgstr ""
531+
532+#. module: account_analytic_package
533+#: view:account.analytic.account:0
534+#: view:crm.case.section:0
535+#: field:product.product,package_weight:0
536+msgid "Package Weight"
537+msgstr ""
538+
539+#. module: account_analytic_package
540+#: view:account.analytic.line.package:0
541+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree
542+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_tree
543+msgid "Service & Activity Units"
544+msgstr ""
545+
546+#. module: account_analytic_package
547+#: constraint:ir.actions.act_window:0
548+msgid "Invalid model name in the action definition."
549+msgstr ""
550+
551+#. module: account_analytic_package
552+#: view:account.analytic.line.package:0
553+msgid "Units"
554+msgstr ""
555+
556+#. module: account_analytic_package
557+#: view:product.product:0
558+msgid "<0 if it's a service unit"
559+msgstr ""
560+
561+#. module: account_analytic_package
562+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree_simplified
563+msgid "Service & Activity Units (no partner and account)"
564+msgstr ""
565+
566+#. module: account_analytic_package
567+#: field:account.analytic.line.package,product_id:0
568+#: field:account.analytic.line.package.month,product_id:0
569+msgid "Product"
570+msgstr ""
571+
572+#. module: account_analytic_package
573+#: field:crm.case.section,analytic_journal_id:0
574+msgid "Analytic Journal"
575+msgstr ""
576+
577+#. module: account_analytic_package
578+#: view:account.analytic.line.package.month:0
579+#: view:crm.case.section:0
580+#: view:product.product:0
581+msgid "Analytic Package"
582+msgstr ""
583+
584+#. module: account_analytic_package
585+#: view:product.product:0
586+msgid "Zero if not part of a package"
587+msgstr ""
588+
589+#. module: account_analytic_package
590+#: field:account.analytic.line.package.month,total_service:0
591+msgid "Total Service"
592+msgstr ""
593+
594+#. module: account_analytic_package
595+#: field:account.analytic.line.package,unit_weight:0
596+msgid "Unit Weight"
597+msgstr ""
598+
599+#. module: account_analytic_package
600+#: view:product.product:0
601+msgid "Package Units"
602+msgstr ""
603+
604+#. module: account_analytic_package
605+#: field:account.analytic.line.package,date:0
606+#: field:account.analytic.line.package.month,name:0
607+msgid "Date"
608+msgstr ""
609+
610+#. module: account_analytic_package
611+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package
612+msgid "Packages"
613+msgstr ""
614+
615+#. module: account_analytic_package
616+#: view:account.analytic.line.package.month:0
617+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_service_tree
618+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_service_tree
619+msgid "Service Units"
620+msgstr ""
621+
622+#. module: account_analytic_package
623+#: field:account.analytic.line.package,total_weight:0
624+#: field:account.analytic.line.package.month,total_weight:0
625+msgid "Total Weight"
626+msgstr ""
627+
628+#. module: account_analytic_package
629+#: model:ir.actions.act_window,name:account_analytic_package.action_package_product_tree
630+#: model:ir.ui.menu,name:account_analytic_package.menu_action_package_product_tree
631+#: view:product.product:0
632+msgid "Products Units"
633+msgstr ""
634+
635+#. module: account_analytic_package
636+#: model:ir.module.module,description:account_analytic_package.module_meta_information
637+msgid "The Module allows to configure analytic account for product packages.\n"
638+" Views for total and monthly product packages weight, Amount analysis."
639+msgstr ""
640+
641+#. module: account_analytic_package
642+#: field:account.analytic.line.package,account_id:0
643+msgid "Account"
644+msgstr ""
645+
646+#. module: account_analytic_package
647+#: model:ir.module.module,shortdesc:account_analytic_package.module_meta_information
648+msgid "account_analytic_package"
649+msgstr ""
650+
651+#. module: account_analytic_package
652+#: field:account.analytic.line.package,name:0
653+msgid "Name"
654+msgstr ""
655+
656+#. module: account_analytic_package
657+#: view:account.analytic.line.package.month:0
658+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_activity_tree
659+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_activity_tree
660+msgid "Activity Units"
661+msgstr ""
662+
663+#. module: account_analytic_package
664+#: view:crm.case.section:0
665+msgid "The parent account of all package account"
666+msgstr ""
667+
668+#. module: account_analytic_package
669+#: field:crm.case.section,package_product_id:0
670+msgid "Package Product"
671+msgstr ""
672+
673+#. module: account_analytic_package
674+#: view:product.product:0
675+msgid ">0 if it's a activity unit"
676+msgstr ""
677+
678+#. module: account_analytic_package
679+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_month_tree
680+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_month_tree
681+msgid "Monthly Services & Activity Units"
682+msgstr ""
683+
684+#. module: account_analytic_package
685+#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package_month
686+msgid "account.analytic.line.package.month"
687+msgstr ""
688+
689+#. module: account_analytic_package
690+#: field:account.analytic.line.package,unit_amount:0
691+msgid "Quantity"
692+msgstr ""
693+
694+#. module: account_analytic_package
695+#: field:crm.case.section,analytic_account_id:0
696+msgid "Main Analytic Account"
697+msgstr ""
698+
699+#. module: account_analytic_package
700+#: field:account.analytic.account,package_ok:0
701+msgid "Used in Package"
702+msgstr ""
703+
704+#. module: account_analytic_package
705+#: field:account.analytic.line.package,partner_id:0
706+#: field:account.analytic.line.package.month,partner_id:0
707+msgid "Partner"
708+msgstr ""
709+
710+#. module: account_analytic_package
711+#: field:account.analytic.line.package.month,total_activity:0
712+msgid "Total Activity"
713+msgstr ""
714+
715
716=== added file 'account_analytic_package/i18n/fr_BE.po'
717--- account_analytic_package/i18n/fr_BE.po 1970-01-01 00:00:00 +0000
718+++ account_analytic_package/i18n/fr_BE.po 2012-06-28 13:21:29 +0000
719@@ -0,0 +1,220 @@
720+# Translation of OpenERP Server.
721+# This file contains the translation of the following modules:
722+# * account_analytic_package
723+#
724+msgid ""
725+msgstr ""
726+"Project-Id-Version: OpenERP Server 5.0.6\n"
727+"Report-Msgid-Bugs-To: support@openerp.com\n"
728+"POT-Creation-Date: 2009-11-24 12:16:03+0000\n"
729+"PO-Revision-Date: 2009-11-24 12:16:03+0000\n"
730+"Last-Translator: <>\n"
731+"Language-Team: \n"
732+"MIME-Version: 1.0\n"
733+"Content-Type: text/plain; charset=UTF-8\n"
734+"Content-Transfer-Encoding: \n"
735+"Plural-Forms: \n"
736+
737+#. module: account_analytic_package
738+#: constraint:ir.model:0
739+msgid "The Object name must start with x_ and not contain any special character !"
740+msgstr ""
741+
742+#. module: account_analytic_package
743+#: view:account.analytic.line.package.month:0
744+msgid "Signed Units"
745+msgstr ""
746+
747+#. module: account_analytic_package
748+#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package
749+msgid "account.analytic.line.package"
750+msgstr ""
751+
752+#. module: account_analytic_package
753+#: constraint:ir.ui.view:0
754+msgid "Invalid XML for View Architecture!"
755+msgstr ""
756+
757+#. module: account_analytic_package
758+#: view:account.analytic.account:0
759+#: view:crm.case.section:0
760+#: field:product.product,package_weight:0
761+msgid "Package Weight"
762+msgstr ""
763+
764+#. module: account_analytic_package
765+#: view:account.analytic.line.package:0
766+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree
767+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_tree
768+msgid "Service & Activity Units"
769+msgstr ""
770+
771+#. module: account_analytic_package
772+#: constraint:ir.actions.act_window:0
773+msgid "Invalid model name in the action definition."
774+msgstr ""
775+
776+#. module: account_analytic_package
777+#: view:account.analytic.line.package:0
778+msgid "Units"
779+msgstr ""
780+
781+#. module: account_analytic_package
782+#: view:product.product:0
783+msgid "<0 if it's a service unit"
784+msgstr ""
785+
786+#. module: account_analytic_package
787+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree_simplified
788+msgid "Service & Activity Units (no partner and account)"
789+msgstr ""
790+
791+#. module: account_analytic_package
792+#: field:account.analytic.line.package,product_id:0
793+#: field:account.analytic.line.package.month,product_id:0
794+msgid "Product"
795+msgstr ""
796+
797+#. module: account_analytic_package
798+#: field:crm.case.section,analytic_journal_id:0
799+msgid "Analytic Journal"
800+msgstr ""
801+
802+#. module: account_analytic_package
803+#: view:account.analytic.line.package.month:0
804+#: view:crm.case.section:0
805+#: view:product.product:0
806+msgid "Analytic Package"
807+msgstr ""
808+
809+#. module: account_analytic_package
810+#: view:product.product:0
811+msgid "Zero if not part of a package"
812+msgstr ""
813+
814+#. module: account_analytic_package
815+#: field:account.analytic.line.package.month,total_service:0
816+msgid "Total Service"
817+msgstr ""
818+
819+#. module: account_analytic_package
820+#: field:account.analytic.line.package,unit_weight:0
821+msgid "Unit Weight"
822+msgstr ""
823+
824+#. module: account_analytic_package
825+#: view:product.product:0
826+msgid "Package Units"
827+msgstr ""
828+
829+#. module: account_analytic_package
830+#: field:account.analytic.line.package,date:0
831+#: field:account.analytic.line.package.month,name:0
832+msgid "Date"
833+msgstr ""
834+
835+#. module: account_analytic_package
836+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package
837+msgid "Packages"
838+msgstr ""
839+
840+#. module: account_analytic_package
841+#: view:account.analytic.line.package.month:0
842+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_service_tree
843+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_service_tree
844+msgid "Service Units"
845+msgstr ""
846+
847+#. module: account_analytic_package
848+#: field:account.analytic.line.package,total_weight:0
849+#: field:account.analytic.line.package.month,total_weight:0
850+msgid "Total Weight"
851+msgstr ""
852+
853+#. module: account_analytic_package
854+#: model:ir.actions.act_window,name:account_analytic_package.action_package_product_tree
855+#: model:ir.ui.menu,name:account_analytic_package.menu_action_package_product_tree
856+#: view:product.product:0
857+msgid "Products Units"
858+msgstr ""
859+
860+#. module: account_analytic_package
861+#: model:ir.module.module,description:account_analytic_package.module_meta_information
862+msgid "The Module allows to configure analytic account for product packages.\n"
863+" Views for total and monthly product packages weight, Amount analysis."
864+msgstr ""
865+
866+#. module: account_analytic_package
867+#: field:account.analytic.line.package,account_id:0
868+msgid "Account"
869+msgstr "Compte"
870+
871+#. module: account_analytic_package
872+#: model:ir.module.module,shortdesc:account_analytic_package.module_meta_information
873+msgid "account_analytic_package"
874+msgstr ""
875+
876+#. module: account_analytic_package
877+#: field:account.analytic.line.package,name:0
878+msgid "Name"
879+msgstr "Nom"
880+
881+#. module: account_analytic_package
882+#: view:account.analytic.line.package.month:0
883+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_activity_tree
884+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_activity_tree
885+msgid "Activity Units"
886+msgstr ""
887+
888+#. module: account_analytic_package
889+#: view:crm.case.section:0
890+msgid "The parent account of all package account"
891+msgstr ""
892+
893+#. module: account_analytic_package
894+#: field:crm.case.section,package_product_id:0
895+msgid "Package Product"
896+msgstr ""
897+
898+#. module: account_analytic_package
899+#: view:product.product:0
900+msgid ">0 if it's a activity unit"
901+msgstr ""
902+
903+#. module: account_analytic_package
904+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_month_tree
905+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_month_tree
906+msgid "Monthly Services & Activity Units"
907+msgstr ""
908+
909+#. module: account_analytic_package
910+#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package_month
911+msgid "account.analytic.line.package.month"
912+msgstr ""
913+
914+#. module: account_analytic_package
915+#: field:account.analytic.line.package,unit_amount:0
916+msgid "Quantity"
917+msgstr "Quantité"
918+
919+#. module: account_analytic_package
920+#: field:crm.case.section,analytic_account_id:0
921+msgid "Main Analytic Account"
922+msgstr "Compte analytique principal"
923+
924+#. module: account_analytic_package
925+#: field:account.analytic.account,package_ok:0
926+msgid "Used in Package"
927+msgstr ""
928+
929+#. module: account_analytic_package
930+#: field:account.analytic.line.package,partner_id:0
931+#: field:account.analytic.line.package.month,partner_id:0
932+msgid "Partner"
933+msgstr "Partenaire"
934+
935+#. module: account_analytic_package
936+#: field:account.analytic.line.package.month,total_activity:0
937+msgid "Total Activity"
938+msgstr ""
939+
940
941=== added file 'account_analytic_package/i18n/pl.po'
942--- account_analytic_package/i18n/pl.po 1970-01-01 00:00:00 +0000
943+++ account_analytic_package/i18n/pl.po 2012-06-28 13:21:29 +0000
944@@ -0,0 +1,227 @@
945+# Polish translation for openobject-addons
946+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
947+# This file is distributed under the same license as the openobject-addons package.
948+# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
949+#
950+msgid ""
951+msgstr ""
952+"Project-Id-Version: openobject-addons\n"
953+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
954+"POT-Creation-Date: 2009-11-24 12:16+0000\n"
955+"PO-Revision-Date: 2010-05-31 04:43+0000\n"
956+"Last-Translator: OpenERP Administrators <Unknown>\n"
957+"Language-Team: Polish <pl@li.org>\n"
958+"MIME-Version: 1.0\n"
959+"Content-Type: text/plain; charset=UTF-8\n"
960+"Content-Transfer-Encoding: 8bit\n"
961+"X-Launchpad-Export-Date: 2010-08-26 04:05+0000\n"
962+"X-Generator: Launchpad (build Unknown)\n"
963+
964+#. module: account_analytic_package
965+#: constraint:ir.model:0
966+msgid ""
967+"The Object name must start with x_ and not contain any special character !"
968+msgstr ""
969+"Nazwa obiektu musi zaczynać się od x_ oraz nie może zawierać znaków "
970+"specjalnych !"
971+
972+#. module: account_analytic_package
973+#: view:account.analytic.line.package.month:0
974+msgid "Signed Units"
975+msgstr "Uzgodnione jednostki"
976+
977+#. module: account_analytic_package
978+#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package
979+msgid "account.analytic.line.package"
980+msgstr ""
981+
982+#. module: account_analytic_package
983+#: constraint:ir.ui.view:0
984+msgid "Invalid XML for View Architecture!"
985+msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
986+
987+#. module: account_analytic_package
988+#: view:account.analytic.account:0
989+#: view:crm.case.section:0
990+#: field:product.product,package_weight:0
991+msgid "Package Weight"
992+msgstr "Waga opakowania"
993+
994+#. module: account_analytic_package
995+#: view:account.analytic.line.package:0
996+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree
997+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_tree
998+msgid "Service & Activity Units"
999+msgstr "Jednostki usług i aktywności"
1000+
1001+#. module: account_analytic_package
1002+#: constraint:ir.actions.act_window:0
1003+msgid "Invalid model name in the action definition."
1004+msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
1005+
1006+#. module: account_analytic_package
1007+#: view:account.analytic.line.package:0
1008+msgid "Units"
1009+msgstr "Jednostki"
1010+
1011+#. module: account_analytic_package
1012+#: view:product.product:0
1013+msgid "<0 if it's a service unit"
1014+msgstr "<0 jeśli jednostka usługi"
1015+
1016+#. module: account_analytic_package
1017+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree_simplified
1018+msgid "Service & Activity Units (no partner and account)"
1019+msgstr "Jednostki usług i aktywności (bez partnerów i kont)"
1020+
1021+#. module: account_analytic_package
1022+#: field:account.analytic.line.package,product_id:0
1023+#: field:account.analytic.line.package.month,product_id:0
1024+msgid "Product"
1025+msgstr "Produkt"
1026+
1027+#. module: account_analytic_package
1028+#: field:crm.case.section,analytic_journal_id:0
1029+msgid "Analytic Journal"
1030+msgstr "Dziennik analityczny"
1031+
1032+#. module: account_analytic_package
1033+#: view:account.analytic.line.package.month:0
1034+#: view:crm.case.section:0
1035+#: view:product.product:0
1036+msgid "Analytic Package"
1037+msgstr "Analityka opakowania"
1038+
1039+#. module: account_analytic_package
1040+#: view:product.product:0
1041+msgid "Zero if not part of a package"
1042+msgstr "Zero , jeśli nie jest częścią opakowania"
1043+
1044+#. module: account_analytic_package
1045+#: field:account.analytic.line.package.month,total_service:0
1046+msgid "Total Service"
1047+msgstr "Suma usług"
1048+
1049+#. module: account_analytic_package
1050+#: field:account.analytic.line.package,unit_weight:0
1051+msgid "Unit Weight"
1052+msgstr "Waga jednostkowa"
1053+
1054+#. module: account_analytic_package
1055+#: view:product.product:0
1056+msgid "Package Units"
1057+msgstr "Jednostki opakowania"
1058+
1059+#. module: account_analytic_package
1060+#: field:account.analytic.line.package,date:0
1061+#: field:account.analytic.line.package.month,name:0
1062+msgid "Date"
1063+msgstr "Data"
1064+
1065+#. module: account_analytic_package
1066+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package
1067+msgid "Packages"
1068+msgstr "Opakowania"
1069+
1070+#. module: account_analytic_package
1071+#: view:account.analytic.line.package.month:0
1072+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_service_tree
1073+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_service_tree
1074+msgid "Service Units"
1075+msgstr "Jednostki usług"
1076+
1077+#. module: account_analytic_package
1078+#: field:account.analytic.line.package,total_weight:0
1079+#: field:account.analytic.line.package.month,total_weight:0
1080+msgid "Total Weight"
1081+msgstr "Suma wag"
1082+
1083+#. module: account_analytic_package
1084+#: model:ir.actions.act_window,name:account_analytic_package.action_package_product_tree
1085+#: model:ir.ui.menu,name:account_analytic_package.menu_action_package_product_tree
1086+#: view:product.product:0
1087+msgid "Products Units"
1088+msgstr "Jednostki produktów"
1089+
1090+#. module: account_analytic_package
1091+#: model:ir.module.module,description:account_analytic_package.module_meta_information
1092+msgid ""
1093+"The Module allows to configure analytic account for product packages.\n"
1094+" Views for total and monthly product packages weight, Amount analysis."
1095+msgstr ""
1096+"Moduł pozwala konfigurować konto analityczne dla opakowań produktu.\n"
1097+" Widoki dla sum i miesięcznych wag opakowań, Analiza wartościowa."
1098+
1099+#. module: account_analytic_package
1100+#: field:account.analytic.line.package,account_id:0
1101+msgid "Account"
1102+msgstr "Konto"
1103+
1104+#. module: account_analytic_package
1105+#: model:ir.module.module,shortdesc:account_analytic_package.module_meta_information
1106+msgid "account_analytic_package"
1107+msgstr ""
1108+
1109+#. module: account_analytic_package
1110+#: field:account.analytic.line.package,name:0
1111+msgid "Name"
1112+msgstr "Nazwa"
1113+
1114+#. module: account_analytic_package
1115+#: view:account.analytic.line.package.month:0
1116+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_activity_tree
1117+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_activity_tree
1118+msgid "Activity Units"
1119+msgstr "Jednostki aktywności"
1120+
1121+#. module: account_analytic_package
1122+#: view:crm.case.section:0
1123+msgid "The parent account of all package account"
1124+msgstr "Konto nadrzędne dla wszystkich kont opakowań"
1125+
1126+#. module: account_analytic_package
1127+#: field:crm.case.section,package_product_id:0
1128+msgid "Package Product"
1129+msgstr "Opakowanie produktu"
1130+
1131+#. module: account_analytic_package
1132+#: view:product.product:0
1133+msgid ">0 if it's a activity unit"
1134+msgstr ">0 jeśli jednostka aktywności"
1135+
1136+#. module: account_analytic_package
1137+#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_month_tree
1138+#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_month_tree
1139+msgid "Monthly Services & Activity Units"
1140+msgstr "Jednostki miesięcznych usług i aktywności"
1141+
1142+#. module: account_analytic_package
1143+#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package_month
1144+msgid "account.analytic.line.package.month"
1145+msgstr ""
1146+
1147+#. module: account_analytic_package
1148+#: field:account.analytic.line.package,unit_amount:0
1149+msgid "Quantity"
1150+msgstr "Ilość"
1151+
1152+#. module: account_analytic_package
1153+#: field:crm.case.section,analytic_account_id:0
1154+msgid "Main Analytic Account"
1155+msgstr "Główne konto analityczne"
1156+
1157+#. module: account_analytic_package
1158+#: field:account.analytic.account,package_ok:0
1159+msgid "Used in Package"
1160+msgstr "Stosowane w opakowaniach"
1161+
1162+#. module: account_analytic_package
1163+#: field:account.analytic.line.package,partner_id:0
1164+#: field:account.analytic.line.package.month,partner_id:0
1165+msgid "Partner"
1166+msgstr "Partner"
1167+
1168+#. module: account_analytic_package
1169+#: field:account.analytic.line.package.month,total_activity:0
1170+msgid "Total Activity"
1171+msgstr "Suma aktywności"
1172
1173=== added directory 'account_analytic_package/security'
1174=== added file 'account_analytic_package/security/ir.model.access.csv'
1175--- account_analytic_package/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
1176+++ account_analytic_package/security/ir.model.access.csv 2012-06-28 13:21:29 +0000
1177@@ -0,0 +1,3 @@
1178+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
1179+"access_account_analytic_line_package","account.analytic.line.package","model_account_analytic_line_package","account.group_account_user",1,1,1,1
1180+"access_account_analytic_line_package_month","account.analytic.line.package.month","model_account_analytic_line_package_month","account.group_account_user",1,1,1,1
1181\ No newline at end of file
1182
1183=== added directory 'account_coda'
1184=== renamed directory 'account_coda' => 'account_coda.moved'
1185=== added file 'account_coda/__init__.py'
1186--- account_coda/__init__.py 1970-01-01 00:00:00 +0000
1187+++ account_coda/__init__.py 2012-06-28 13:21:29 +0000
1188@@ -0,0 +1,26 @@
1189+# -*- encoding: utf-8 -*-
1190+##############################################################################
1191+#
1192+# OpenERP, Open Source Management Solution
1193+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
1194+#
1195+# This program is free software: you can redistribute it and/or modify
1196+# it under the terms of the GNU Affero General Public License as
1197+# published by the Free Software Foundation, either version 3 of the
1198+# License, or (at your option) any later version.
1199+#
1200+# This program is distributed in the hope that it will be useful,
1201+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1202+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1203+# GNU Affero General Public License for more details.
1204+#
1205+# You should have received a copy of the GNU Affero General Public License
1206+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1207+#
1208+##############################################################################
1209+
1210+import account_coda
1211+import wizard
1212+
1213+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1214+
1215
1216=== added file 'account_coda/__terp__.py'
1217--- account_coda/__terp__.py 1970-01-01 00:00:00 +0000
1218+++ account_coda/__terp__.py 2012-06-28 13:21:29 +0000
1219@@ -0,0 +1,44 @@
1220+# -*- encoding: utf-8 -*-
1221+##############################################################################
1222+#
1223+# OpenERP, Open Source Management Solution
1224+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
1225+#
1226+# This program is free software: you can redistribute it and/or modify
1227+# it under the terms of the GNU Affero General Public License as
1228+# published by the Free Software Foundation, either version 3 of the
1229+# License, or (at your option) any later version.
1230+#
1231+# This program is distributed in the hope that it will be useful,
1232+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1233+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1234+# GNU Affero General Public License for more details.
1235+#
1236+# You should have received a copy of the GNU Affero General Public License
1237+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1238+#
1239+##############################################################################
1240+
1241+{
1242+ "name" : "Account CODA - import bank statements from coda file",
1243+ "version" : "1.0",
1244+ "author" : "OpenERP SA",
1245+ "category" : "Account CODA",
1246+ "description": """
1247+ Module provides functionality to import
1248+ bank statements from coda files.
1249+ """,
1250+ "depends" : ["account"],
1251+ "demo_xml" : [],
1252+ "init_xml" : [],
1253+ "update_xml": ["security/ir.model.access.csv",
1254+ "wizard/account_coda_import.xml",
1255+ "account_coda_view.xml"],
1256+ "active" : False,
1257+ "installable" : True,
1258+
1259+'certificate': '001319613245022826189',
1260+}
1261+
1262+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1263+
1264
1265=== added file 'account_coda/account_coda.py'
1266--- account_coda/account_coda.py 1970-01-01 00:00:00 +0000
1267+++ account_coda/account_coda.py 2012-06-28 13:21:29 +0000
1268@@ -0,0 +1,51 @@
1269+# -*- encoding: utf-8 -*-
1270+##############################################################################
1271+#
1272+# OpenERP, Open Source Management Solution
1273+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
1274+#
1275+# This program is free software: you can redistribute it and/or modify
1276+# it under the terms of the GNU Affero General Public License as
1277+# published by the Free Software Foundation, either version 3 of the
1278+# License, or (at your option) any later version.
1279+#
1280+# This program is distributed in the hope that it will be useful,
1281+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1282+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1283+# GNU Affero General Public License for more details.
1284+#
1285+# You should have received a copy of the GNU Affero General Public License
1286+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1287+#
1288+##############################################################################
1289+
1290+import time
1291+from osv import osv,fields
1292+
1293+class account_coda(osv.osv):
1294+ _name = "account.coda"
1295+ _description = "coda for an Account"
1296+ _columns = {
1297+ 'name': fields.binary('Coda file', readonly=True, help="Store the detail of bank statements"),
1298+ 'statement_ids': fields.one2many('account.bank.statement', 'coda_id', 'Generated Bank Statements', readonly=True),
1299+ 'note': fields.text('Import log', readonly=True),
1300+ 'journal_id': fields.many2one('account.journal', 'Journal', readonly=True, select=True, help="Bank Journal"),
1301+ 'date': fields.date('Date', readonly=True, select=True, help="Import Date"),
1302+ 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
1303+ }
1304+ _defaults = {
1305+ 'date': time.strftime('%Y-%m-%d'),
1306+ 'user_id': lambda self,cr,uid,context: uid,
1307+ }
1308+
1309+account_coda()
1310+
1311+class account_bank_statement(osv.osv):
1312+ _inherit = "account.bank.statement"
1313+ _columns = {
1314+ 'coda_id':fields.many2one('account.coda', 'Coda'),
1315+ }
1316+
1317+account_bank_statement()
1318+
1319+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1320\ No newline at end of file
1321
1322=== added file 'account_coda/account_coda_demo.xml'
1323--- account_coda/account_coda_demo.xml 1970-01-01 00:00:00 +0000
1324+++ account_coda/account_coda_demo.xml 2012-06-28 13:21:29 +0000
1325@@ -0,0 +1,5 @@
1326+<?xml version="1.0"?>
1327+<openerp>
1328+<data noupdate="1">
1329+</data>
1330+</openerp>
1331
1332=== added file 'account_coda/account_coda_view.xml'
1333--- account_coda/account_coda_view.xml 1970-01-01 00:00:00 +0000
1334+++ account_coda/account_coda_view.xml 2012-06-28 13:21:29 +0000
1335@@ -0,0 +1,64 @@
1336+<?xml version="1.0" ?>
1337+<openerp>
1338+<data>
1339+
1340+ <record model="ir.ui.view" id="view_account_coda_form">
1341+ <field name="name">account.coda.form</field>
1342+ <field name="model">account.coda</field>
1343+ <field name="type">form</field>
1344+ <field name="arch" type="xml">
1345+ <form string="Coda import">
1346+ <field name="name" />
1347+ <field name="journal_id" />
1348+ <field name="date" />
1349+ <field name="user_id" />
1350+ <notebook colspan="4">
1351+ <page string="Log">
1352+ <field name="note" colspan="4" nolabel="1"/>
1353+ </page>
1354+ <page string="Statements">
1355+ <field name="statement_ids" colspan="4" nolabel="1"/>
1356+ </page>
1357+ </notebook>
1358+ </form>
1359+ </field>
1360+ </record>
1361+
1362+ <record model="ir.ui.view" id="view_account_coda_tree">
1363+ <field name="name">account.coda.tree</field>
1364+ <field name="model">account.coda</field>
1365+ <field name="type">tree</field>
1366+ <field name="arch" type="xml">
1367+ <tree string="Coda import">
1368+ <field name="journal_id" />
1369+ <field name="date" />
1370+ <field name="user_id" />
1371+ <field name="statement_ids"/>
1372+ </tree>
1373+ </field>
1374+ </record>
1375+
1376+
1377+ <record model="ir.actions.act_window" id="action_account_coda">
1378+ <field name="name">Coda Statements</field>
1379+ <field name="type">ir.actions.act_window</field>
1380+ <field name="res_model">account.coda</field>
1381+ <field name="view_type">form</field>
1382+ <field name="view_mode">tree,form</field>
1383+ </record>
1384+
1385+
1386+ <menuitem name="Financial Management/Reporting/Coda Statements" id="menu_account_coda_statement" action="action_account_coda" sequence="15"/>
1387+
1388+ <menuitem name="Financial Management/Periodical Processing/Import Coda Statements" action="action_account_coda_import" id="menu_account_coda_import" sequence="13"/>
1389+
1390+ <act_window name="Coda File"
1391+ domain="[('statement_ids', 'in', [active_id])]"
1392+ res_model="account.coda"
1393+ src_model="account.bank.statement"
1394+ view_type="form"
1395+ view_mode="tree,form"
1396+ id="act_account_payment_account_bank_statement"/>
1397+
1398+ </data>
1399+</openerp>
1400
1401=== added directory 'account_coda/i18n'
1402=== added directory 'account_coda/security'
1403=== added file 'account_coda/security/ir.model.access.csv'
1404--- account_coda/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
1405+++ account_coda/security/ir.model.access.csv 2012-06-28 13:21:29 +0000
1406@@ -0,0 +1,6 @@
1407+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
1408+"access_account_coda","account.coda","model_account_coda","account.group_account_user",1,0,0,0
1409+"access_account_coda_manager","account.coda","model_account_coda","account.group_account_manager",1,1,1,1
1410+"access_account_coda_import_manager","account.coda.import","model_account_coda_import","account.group_account_manager",1,1,1,1
1411+"access_account_coda_import_user","account.coda","model_account_coda","account.group_account_user",1,0,0,0
1412+"access_account_coda_system","account.coda system","model_account_coda","base.group_system",1,0,0,0
1413
1414=== added directory 'account_coda/test_coda_file'
1415=== added file 'account_coda/test_coda_file/statement_coda.txt'
1416--- account_coda/test_coda_file/statement_coda.txt 1970-01-01 00:00:00 +0000
1417+++ account_coda/test_coda_file/statement_coda.txt 2012-06-28 13:21:29 +0000
1418@@ -0,0 +1,10 @@
1419+0000006060712505 00000CPH CODA TINY 0047747270100477472701 00000 1
1420+1 049126201326907 EUR0BE 0000000015632900050607TINY COMPTE COURANT ORDINAIRE 049
1421+2100010000 0000000001150000060607001500000INVOICE OF 2006-12-19 0606070020100
1422+2200010000 EUR000000001150000 100
1423+2300010000301915554082 PROLIBRE SARL CAROUGE GE 000
1424+2100020000 0000000000500000060607001500000CONTRACT PARTNER ERREUR ECART YEA 0606070030100
1425+2200020000RTY CONTRACT PARTNER EUR000000000500000 100
1426+2300020000050000000017 SEDNACOM 43 ALLEE DES FOUGERES 9522 0 HERBLAY 000
1427+8049126201326907 0000000017282900060607
1428+9 000008000000000000000000000001650000 2
1429
1430=== added directory 'account_coda/wizard'
1431=== added file 'account_coda/wizard/__init__.py'
1432--- account_coda/wizard/__init__.py 1970-01-01 00:00:00 +0000
1433+++ account_coda/wizard/__init__.py 2012-06-28 13:21:29 +0000
1434@@ -0,0 +1,25 @@
1435+# -*- encoding: utf-8 -*-
1436+##############################################################################
1437+#
1438+# OpenERP, Open Source Management Solution
1439+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
1440+#
1441+# This program is free software: you can redistribute it and/or modify
1442+# it under the terms of the GNU Affero General Public License as
1443+# published by the Free Software Foundation, either version 3 of the
1444+# License, or (at your option) any later version.
1445+#
1446+# This program is distributed in the hope that it will be useful,
1447+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1448+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1449+# GNU Affero General Public License for more details.
1450+#
1451+# You should have received a copy of the GNU Affero General Public License
1452+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1453+#
1454+##############################################################################
1455+
1456+import account_coda_import
1457+
1458+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1459+
1460
1461=== added file 'account_coda/wizard/account_coda_import.py'
1462--- account_coda/wizard/account_coda_import.py 1970-01-01 00:00:00 +0000
1463+++ account_coda/wizard/account_coda_import.py 2012-06-28 13:21:29 +0000
1464@@ -0,0 +1,309 @@
1465+# -*- encoding: utf-8 -*-
1466+##############################################################################
1467+#
1468+# OpenERP, Open Source Management Solution
1469+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
1470+# $Id$
1471+#
1472+# This program is free software: you can redistribute it and/or modify
1473+# it under the terms of the GNU General Public License as published by
1474+# the Free Software Foundation, either version 3 of the License, or
1475+# (at your option) any later version.
1476+#
1477+# This program is distributed in the hope that it will be useful,
1478+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1479+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1480+# GNU General Public License for more details.
1481+#
1482+# You should have received a copy of the GNU General Public License
1483+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1484+#
1485+##############################################################################
1486+
1487+import time
1488+import base64
1489+
1490+from osv import fields
1491+from osv import osv
1492+from tools.translate import _
1493+
1494+def str2date(date_str):
1495+ return time.strftime("%y/%m/%d", time.strptime(date_str, "%d%m%y"))
1496+
1497+def str2float(str):
1498+ try:
1499+ return float(str)
1500+ except:
1501+ return 0.0
1502+
1503+def list2float(lst):
1504+ try:
1505+ return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
1506+ except:
1507+ return 0.0
1508+
1509+class account_coda_import(osv.osv_memory):
1510+ _name = 'account.coda.import'
1511+ _description = 'Account Coda Import'
1512+ _columns = {
1513+ 'journal_id': fields.many2one('account.journal', 'Bank Journal', required=True),
1514+ 'def_payable': fields.many2one('account.account', 'Default Payable Account', domain=[('type', '=', 'payable')], required=True, help= 'Set here the payable account that will be used, by default, if the partner is not found'),
1515+ 'def_receivable': fields.many2one('account.account', 'Default Receivable Account', domain=[('type', '=', 'receivable')], required=True, help= 'Set here the receivable account that will be used, by default, if the partner is not found',),
1516+ 'awaiting_account': fields.many2one('account.account', 'Default Account for Unrecognized Movement', required=True, help= 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',),
1517+ 'coda': fields.binary('Coda File', required=True),
1518+ 'note':fields.text('Log'),
1519+ }
1520+
1521+ def coda_parsing(self, cr, uid, ids, context=None):
1522+
1523+ journal_obj=self.pool.get('account.journal')
1524+ account_period_obj = self.pool.get('account.period')
1525+ partner_bank_obj = self.pool.get('res.partner.bank')
1526+ bank_statement_obj = self.pool.get('account.bank.statement')
1527+ move_line_obj = self.pool.get('account.move.line')
1528+ bank_statement_line_obj = self.pool.get('account.bank.statement.line')
1529+ statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile')
1530+ account_coda_obj = self.pool.get('account.coda')
1531+ mod_obj = self.pool.get('ir.model.data')
1532+
1533+ if not context:
1534+ context = {}
1535+
1536+ data = self.read(cr, uid, ids)[0]
1537+
1538+ codafile = data['coda']
1539+ journal_code = journal_obj.browse(cr, uid, data['journal_id'], context).code
1540+
1541+ period = account_period_obj.find(cr, uid, context=context)[0]
1542+ def_pay_acc = data['def_payable']
1543+ def_rec_acc = data['def_receivable']
1544+
1545+ str_log = ""
1546+ err_log = "Errors:\n------\n"
1547+ nb_err=0
1548+ std_log=''
1549+ str_log1 = "Coda File is Imported : "
1550+ str_not=''
1551+ str_not1=''
1552+
1553+ bank_statements=[]
1554+ bank_statement = {}
1555+ recordlist = base64.decodestring(codafile).split('\n')
1556+ recordlist.pop()
1557+ i=0
1558+ bkst_list=[]
1559+ for line in recordlist:
1560+ if line[0] == '0':
1561+ # header data
1562+
1563+ bank_statement["bank_statement_line"]={}
1564+ bank_statement_lines = {}
1565+ bank_statement['date'] = str2date(line[5:11])
1566+ bank_statement['journal_id']=data['journal_id']
1567+ period_id = account_period_obj.search(cr, uid, [('date_start', '<=', time.strftime('%Y-%m-%d', time.strptime(bank_statement['date'], "%y/%m/%d"))), ('date_stop', '>=', time.strftime('%Y-%m-%d', time.strptime(bank_statement['date'], "%y/%m/%d")))])
1568+ bank_statement['period_id'] = period_id and period_id[0] or False
1569+ bank_statement['state']='draft'
1570+ elif line[0] == '1':
1571+ # old balance data
1572+ bal_start = list2float(line[43:58])
1573+ if line[42] == '1':
1574+ bal_start = - bal_start
1575+ bank_statement["balance_start"]= bal_start
1576+ bank_statement["acc_number"]=line[5:17]
1577+ bank_statement["acc_holder"]=line[64:90]
1578+ bank_statement['name'] = journal_code + ' ' + str(line[2:5])
1579+
1580+ elif line[0]=='2':
1581+ # movement data record 2
1582+ if line[1]=='1':
1583+ # movement data record 2.1
1584+ if bank_statement_lines.has_key(line[2:6]):
1585+ continue
1586+ st_line = {}
1587+ st_line['extra_note'] = ''
1588+ st_line['statement_id']=0
1589+ st_line['ref'] = line[2:10]
1590+ st_line['date'] = time.strftime('%Y-%m-%d', time.strptime(str2date(line[115:121]), "%y/%m/%d")),
1591+ st_line_amt = list2float(line[32:47])
1592+
1593+ if line[61]=='1':
1594+ st_line['toreconcile'] = True
1595+ st_line['name']=line[65:77]
1596+ else:
1597+ st_line['toreconcile'] = False
1598+ st_line['name']=line[62:115]
1599+
1600+ st_line['free_comm'] = st_line['name']
1601+ st_line['val_date']=time.strftime('%Y-%m-%d', time.strptime(str2date(line[47:53]), "%y/%m/%d")),
1602+ st_line['entry_date']=time.strftime('%Y-%m-%d', time.strptime(str2date(line[115:121]), "%y/%m/%d")),
1603+ st_line['partner_id']=0
1604+ if line[31] == '1':
1605+ st_line_amt = - st_line_amt
1606+ st_line['account_id'] = def_pay_acc
1607+ else:
1608+ st_line['account_id'] = def_rec_acc
1609+ st_line['amount'] = st_line_amt
1610+ bank_statement_lines[line[2:6]]=st_line
1611+ bank_statement["bank_statement_line"]=bank_statement_lines
1612+ elif line[1] == '2':
1613+ st_line_name = line[2:6]
1614+ bank_statement_lines[st_line_name].update({'account_id': data['awaiting_account']})
1615+
1616+ elif line[1] == '3':
1617+ # movement data record 3.1
1618+ st_line_name = line[2:6]
1619+ st_line_partner_acc = str(line[10:47]).strip()
1620+ cntry_number=line[10:47].strip()
1621+ contry_name=line[47:125].strip()
1622+ bank_ids = partner_bank_obj.search(cr, uid, [('acc_number', '=', st_line_partner_acc)])
1623+ bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
1624+ if bank_ids:
1625+ bank = partner_bank_obj.browse(cr, uid, bank_ids[0], context)
1626+ if line and bank.partner_id:
1627+ bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
1628+ if bank_statement_lines[st_line_name]['amount'] < 0 :
1629+ bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
1630+ else :
1631+ bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
1632+ else:
1633+ nb_err += 1
1634+ err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number, contry_name)
1635+ bank_statement_lines[st_line_name].update({'account_id': data['awaiting_account']})
1636+
1637+ bank_statement["bank_statement_line"]=bank_statement_lines
1638+ elif line[0]=='3':
1639+ if line[1] == '1':
1640+ st_line_name = line[2:6]
1641+ bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113].decode('utf-8','replace').encode('utf-8')
1642+ elif line[1] == '2':
1643+ st_line_name = line[2:6]
1644+ bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115].decode('utf-8','replace').encode('utf-8')
1645+ elif line[1] == '3':
1646+ st_line_name = line[2:6]
1647+ bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100].decode('utf-8','replace').encode('utf-8')
1648+ elif line[0]=='8':
1649+ # new balance record
1650+ bal_end = list2float(line[42:57])
1651+ if line[41] == '1':
1652+ bal_end = - bal_end
1653+ bank_statement["balance_end_real"]= bal_end
1654+
1655+ elif line[0]=='9':
1656+ # footer record
1657+ bank_statement['id%d'%i] = i
1658+ i+=1
1659+ bank_statements.append(bank_statement)
1660+ statement = bank_statement
1661+ try:
1662+ bk_st_id =bank_statement_obj.create(cr, uid, {
1663+ 'journal_id': statement['journal_id'],
1664+ 'date':time.strftime('%Y-%m-%d', time.strptime(statement['date'], "%y/%m/%d")),
1665+ 'period_id':statement['period_id'] or period,
1666+ 'balance_start': statement["balance_start"],
1667+ 'balance_end_real': statement["balance_end_real"],
1668+ 'state': 'draft',
1669+ 'name': statement['name'],
1670+ })
1671+ lines=statement["bank_statement_line"]
1672+ for value in lines:
1673+ line=lines[value]
1674+ reconcile_id = False
1675+ if line['toreconcile']:
1676+ name = line['name'][:3] + '/' + line['name'][3:7] + '/' + line['name'][7:]
1677+ rec_id = self.pool.get('account.move.line').search(cr, uid, [('name','=', name),('reconcile_id','=',False),('account_id.reconcile','=',True)])
1678+ if rec_id:
1679+ reconcile_id = statement_reconcile_obj.create(cr, uid, {
1680+ 'line_ids': [(6, 0, rec_id)]
1681+ }, context=context)
1682+ mv = self.pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context)
1683+ if mv.partner_id:
1684+ line['partner_id'] = mv.partner_id.id
1685+ if line['amount'] < 0 :
1686+ line['account_id'] = mv.partner_id.property_account_payable.id
1687+ else :
1688+ line['account_id'] = mv.partner_id.property_account_receivable.id
1689+ str_not1 = ''
1690+ if line.has_key('contry_name') and line.has_key('cntry_number'):
1691+ str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"], line["cntry_number"], line["free_comm"]+line['extra_note'].decode('utf-8','replace').encode('utf-8'), line["val_date"][0], line["entry_date"][0])
1692+ id=bank_statement_line_obj.create(cr, uid, {
1693+ 'name':line['name'],
1694+ 'date': line['date'],
1695+ 'type': (line['amount']>0 and 'customer') or (line['amount']<0 and 'supplier') or 'general',
1696+ 'amount': line['amount'],
1697+ 'partner_id':line['partner_id'] or 0,
1698+ 'account_id':line['account_id'],
1699+ 'statement_id': bk_st_id,
1700+ 'reconcile_id': reconcile_id,
1701+ 'note':str_not1,
1702+ 'ref':line['ref'],
1703+ })
1704+
1705+ str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"], statement["acc_holder"])
1706+ std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
1707+ %(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
1708+ bkst_list.append(bk_st_id)
1709+
1710+ except osv.except_osv, e:
1711+ cr.rollback()
1712+ nb_err+=1
1713+ err_log += '\n Application Error : ' + str(e)
1714+ raise # REMOVEME
1715+
1716+ except Exception, e:
1717+ cr.rollback()
1718+ nb_err+=1
1719+ err_log += '\n System Error : '+str(e)
1720+ raise # REMOVEME
1721+ except :
1722+ cr.rollback()
1723+ nb_err+=1
1724+ err_log += '\n Unknown Error'
1725+ raise
1726+ err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
1727+ err_log += '\nNumber of error :'+ str(nb_err) +'\n'
1728+
1729+ account_coda_obj.create(cr, uid, {
1730+ 'name':codafile,
1731+ 'statement_ids': [(6, 0, bkst_list,)],
1732+ 'note':str_log1+str_not+std_log+err_log,
1733+ 'journal_id':data['journal_id'],
1734+ 'date':time.strftime("%Y-%m-%d"),
1735+ 'user_id':uid,
1736+ })
1737+ test=''
1738+ test=str_log1 + std_log + err_log
1739+ self.write(cr, uid, ids, {'note':test}, context=context)
1740+ extraction= { 'statment_ids':bkst_list}
1741+ context.update({ 'statment_ids':bkst_list})
1742+ model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'), ('name', '=', 'account_coda_note_view')], context=context)
1743+ resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
1744+
1745+ return {
1746+ 'name': _('Result'),
1747+ 'res_id': ids[0],
1748+ 'view_type': 'form',
1749+ 'view_mode': 'form',
1750+ 'res_model': 'account.coda.import',
1751+ 'view_id': False,
1752+ 'target':'new',
1753+ 'views': [(resource_id, 'form')],
1754+ 'context': context,
1755+ 'type': 'ir.actions.act_window',
1756+ }
1757+
1758+ def action_open_window(self, cr, uid, data, context=None):
1759+ if not context:
1760+ cotext = {}
1761+ return {
1762+ 'domain':"[('id','in',%s)]"%(context.get('statment_ids', False)),
1763+ 'name': 'Statement',
1764+ 'view_type': 'form',
1765+ 'view_mode': 'tree,form',
1766+ 'res_model': 'account.bank.statement',
1767+ 'view_id': False,
1768+ 'type': 'ir.actions.act_window',
1769+ }
1770+
1771+account_coda_import()
1772+
1773+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1774
1775=== added file 'account_coda/wizard/account_coda_import.xml'
1776--- account_coda/wizard/account_coda_import.xml 1970-01-01 00:00:00 +0000
1777+++ account_coda/wizard/account_coda_import.xml 2012-06-28 13:21:29 +0000
1778@@ -0,0 +1,59 @@
1779+<?xml version="1.0" ?>
1780+<openerp>
1781+<data>
1782+ <record id="account_coda_import_view" model="ir.ui.view">
1783+ <field name="name">Import Coda Statement</field>
1784+ <field name="model">account.coda.import</field>
1785+ <field name="type">form</field>
1786+ <field name="arch" type="xml">
1787+ <form string="Import Coda Statement">
1788+ <separator colspan="4" string="Configure Your Journal and Account :" />
1789+ <field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
1790+ <newline />
1791+ <field name="def_payable" />
1792+ <newline />
1793+ <field name="def_receivable" />
1794+ <newline />
1795+ <field name="awaiting_account" />
1796+ <separator string="Click on 'New' to select your file :" colspan="4"/>
1797+ <field name="coda"/>
1798+ <newline/>
1799+ <group colspan="4" col="6">
1800+ <separator colspan="6"/>
1801+ <button special="cancel" string="Cancel" icon="gtk-cancel"/>
1802+ <button name="coda_parsing" string="Import" type="object" icon="gtk-ok"/>
1803+ </group>
1804+ </form>
1805+ </field>
1806+ </record>
1807+
1808+ <record id="account_coda_note_view" model="ir.ui.view">
1809+ <field name="name">Import Coda Statement</field>
1810+ <field name="model">account.coda.import</field>
1811+ <field name="type">form</field>
1812+ <field name="arch" type="xml">
1813+ <form string="Result of Imported Coda Statements">
1814+ <group height="420">
1815+ <separator colspan="4" string="Results :" />
1816+ <field name="note" colspan="4" nolabel="1"/>
1817+ <newline/>
1818+ <separator colspan="6"/>
1819+ <button special="cancel" string="Close" icon="gtk-cancel"/>
1820+ <button name="action_open_window" string="Open Statements" type="object" icon="gtk-apply"/>
1821+ </group>
1822+ </form>
1823+ </field>
1824+ </record>
1825+
1826+ <record id="action_account_coda_import" model="ir.actions.act_window">
1827+ <field name="name">Import Coda Statement</field>
1828+ <field name="type">ir.actions.act_window</field>
1829+ <field name="res_model">account.coda.import</field>
1830+ <field name="view_type">form</field>
1831+ <field name="view_mode">form</field>
1832+ <field name="target">new</field>
1833+ <field name="view_id" ref="account_coda_import_view"/>
1834+ </record>
1835+
1836+</data>
1837+</openerp>
1838
1839=== added directory 'account_l10nbe_domiciliation'
1840=== added file 'account_l10nbe_domiciliation/__init__.py'
1841--- account_l10nbe_domiciliation/__init__.py 1970-01-01 00:00:00 +0000
1842+++ account_l10nbe_domiciliation/__init__.py 2012-06-28 13:21:29 +0000
1843@@ -0,0 +1,27 @@
1844+# -*- encoding: utf-8 -*-
1845+##############################################################################
1846+#
1847+# OpenERP, Open Source Management Solution
1848+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
1849+#
1850+# This program is free software: you can redistribute it and/or modify
1851+# it under the terms of the GNU Affero General Public License as
1852+# published by the Free Software Foundation, either version 3 of the
1853+# License, or (at your option) any later version.
1854+#
1855+# This program is distributed in the hope that it will be useful,
1856+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1857+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1858+# GNU Affero General Public License for more details.
1859+#
1860+# You should have received a copy of the GNU Affero General Public License
1861+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1862+#
1863+##############################################################################
1864+
1865+import l10nbe_domiciliation
1866+import report
1867+import wizard
1868+
1869+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1870+
1871
1872=== added file 'account_l10nbe_domiciliation/__terp__.py'
1873--- account_l10nbe_domiciliation/__terp__.py 1970-01-01 00:00:00 +0000
1874+++ account_l10nbe_domiciliation/__terp__.py 2012-06-28 13:21:29 +0000
1875@@ -0,0 +1,46 @@
1876+# -*- encoding: utf-8 -*-
1877+##############################################################################
1878+#
1879+# OpenERP, Open Source Management Solution
1880+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
1881+#
1882+# This program is free software: you can redistribute it and/or modify
1883+# it under the terms of the GNU Affero General Public License as
1884+# published by the Free Software Foundation, either version 3 of the
1885+# License, or (at your option) any later version.
1886+#
1887+# This program is distributed in the hope that it will be useful,
1888+# but WITHOUT ANY WARRANTY; without even the implied warranty of
1889+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1890+# GNU Affero General Public License for more details.
1891+#
1892+# You should have received a copy of the GNU Affero General Public License
1893+# along with this program. If not, see <http://www.gnu.org/licenses/>.
1894+#
1895+##############################################################################
1896+{
1897+ "name" : "Account l10nbe Domiciliation",
1898+ "version" : "1.0",
1899+ "author" : "Tiny",
1900+ "website" : "http://www.openerp.com",
1901+ "category" : "Generic Modules/Account l10nbe Domiciliation",
1902+ "description": """
1903+ Related with l10n_be module.
1904+ Adds Domiciled and Domiciled send date fields on invoice.
1905+ Domiciliation and Domiciliation Number fields on partner.
1906+ """,
1907+ "depends" : ["base","account","l10n_be"],
1908+ "init_xml" : [],
1909+ "demo_xml" : [],
1910+
1911+ "update_xml" : ["l10nbe_domiciliation_view.xml",
1912+ "l10nbe_domiciliation_report.xml",
1913+ "l10nbe_domiciliation_wizard.xml"
1914+ ],
1915+ "active": False,
1916+ "installable": True,
1917+
1918+'certificate': '00405683612189',
1919+}
1920+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1921+
1922
1923=== added directory 'account_l10nbe_domiciliation/i18n'
1924=== added file 'account_l10nbe_domiciliation/i18n/account_l10nbe_domiciliation.pot'
1925--- account_l10nbe_domiciliation/i18n/account_l10nbe_domiciliation.pot 1970-01-01 00:00:00 +0000
1926+++ account_l10nbe_domiciliation/i18n/account_l10nbe_domiciliation.pot 2012-06-28 13:21:29 +0000
1927@@ -0,0 +1,237 @@
1928+# Translation of OpenERP Server.
1929+# This file contains the translation of the following modules:
1930+# * account_l10nbe_domiciliation
1931+#
1932+msgid ""
1933+msgstr ""
1934+"Project-Id-Version: OpenERP Server 5.0.6\n"
1935+"Report-Msgid-Bugs-To: support@openerp.com\n"
1936+"POT-Creation-Date: 2009-11-24 13:07:05+0000\n"
1937+"PO-Revision-Date: 2009-11-24 13:07:05+0000\n"
1938+"Last-Translator: <>\n"
1939+"Language-Team: \n"
1940+"MIME-Version: 1.0\n"
1941+"Content-Type: text/plain; charset=UTF-8\n"
1942+"Content-Transfer-Encoding: \n"
1943+"Plural-Forms: \n"
1944+
1945+#. module: account_l10nbe_domiciliation
1946+#: view:res.company:0
1947+msgid "Dom80 Export"
1948+msgstr ""
1949+
1950+#. module: account_l10nbe_domiciliation
1951+#: model:ir.module.module,shortdesc:account_l10nbe_domiciliation.module_meta_information
1952+msgid "Account l10nbe Domiciliation"
1953+msgstr ""
1954+
1955+#. module: account_l10nbe_domiciliation
1956+#: wizard_field:invoice.export.dom,export,note:0
1957+msgid "Log"
1958+msgstr ""
1959+
1960+#. module: account_l10nbe_domiciliation
1961+#: field:invoice.export.log,file:0
1962+msgid "Saved File"
1963+msgstr ""
1964+
1965+#. module: account_l10nbe_domiciliation
1966+#: field:account.invoice,domiciled_send_date:0
1967+msgid "Domiciliation Sending Date"
1968+msgstr ""
1969+
1970+#. module: account_l10nbe_domiciliation
1971+#: constraint:ir.model:0
1972+msgid "The Object name must start with x_ and not contain any special character !"
1973+msgstr ""
1974+
1975+#. module: account_l10nbe_domiciliation
1976+#: wizard_field:invoice.export.dom,init,msg2:0
1977+msgid "Message to the payer, part 2."
1978+msgstr ""
1979+
1980+#. module: account_l10nbe_domiciliation
1981+#: wizard_field:invoice.export.dom,init,collection_date:0
1982+msgid "Collection Date"
1983+msgstr ""
1984+
1985+#. module: account_l10nbe_domiciliation
1986+#: wizard_view:invoice.export.dom,export:0
1987+msgid "Note"
1988+msgstr ""
1989+
1990+#. module: account_l10nbe_domiciliation
1991+#: selection:invoice.export.log,state:0
1992+msgid "Failed"
1993+msgstr ""
1994+
1995+#. module: account_l10nbe_domiciliation
1996+#: wizard_view:invoice.export.dom,export:0
1997+msgid "Save File..."
1998+msgstr ""
1999+
2000+#. module: account_l10nbe_domiciliation
2001+#: field:invoice.export.log,note:0
2002+msgid "Creation Log"
2003+msgstr ""
2004+
2005+#. module: account_l10nbe_domiciliation
2006+#: constraint:ir.actions.act_window:0
2007+msgid "Invalid model name in the action definition."
2008+msgstr ""
2009+
2010+#. module: account_l10nbe_domiciliation
2011+#: model:ir.actions.act_window,name:account_l10nbe_domiciliation.action_account_invoice_log_tree
2012+#: model:ir.ui.menu,name:account_l10nbe_domiciliation.menu_action_action_invoice_export_tree
2013+msgid "Invoice Export Logs"
2014+msgstr ""
2015+
2016+#. module: account_l10nbe_domiciliation
2017+#: field:res.company,id_sender:0
2018+msgid "Identification number of the Sender"
2019+msgstr ""
2020+
2021+#. module: account_l10nbe_domiciliation
2022+#: field:invoice.export.log,state:0
2023+msgid "Status"
2024+msgstr ""
2025+
2026+#. module: account_l10nbe_domiciliation
2027+#: help:res.company,id_creditor:0
2028+msgid "Creditor Id for Dom80 export header"
2029+msgstr ""
2030+
2031+#. module: account_l10nbe_domiciliation
2032+#: field:invoice.export.log,create_date:0
2033+msgid "Creation Date"
2034+msgstr ""
2035+
2036+#. module: account_l10nbe_domiciliation
2037+#: view:invoice.export.log:0
2038+msgid "Payment Export Logs"
2039+msgstr ""
2040+
2041+#. module: account_l10nbe_domiciliation
2042+#: wizard_field:invoice.export.dom,init,msg1:0
2043+msgid "Message to the payer, part 1."
2044+msgstr ""
2045+
2046+#. module: account_l10nbe_domiciliation
2047+#: field:invoice.export.log,create_uid:0
2048+msgid "Creation User"
2049+msgstr ""
2050+
2051+#. module: account_l10nbe_domiciliation
2052+#: field:res.partner.bank,institution_code:0
2053+msgid "Institution Code"
2054+msgstr ""
2055+
2056+#. module: account_l10nbe_domiciliation
2057+#: help:res.company,id_sender:0
2058+msgid "Sender Id for Dom80 export header"
2059+msgstr ""
2060+
2061+#. module: account_l10nbe_domiciliation
2062+#: model:ir.ui.menu,name:account_l10nbe_domiciliation.menu_action_action_invoice_export
2063+msgid "Invoice Export"
2064+msgstr ""
2065+
2066+#. module: account_l10nbe_domiciliation
2067+#: wizard_view:invoice.export.dom,init:0
2068+msgid "Export invoice to DOM80 format"
2069+msgstr ""
2070+
2071+#. module: account_l10nbe_domiciliation
2072+#: field:res.partner,domiciliation:0
2073+msgid "Domiciliation Number"
2074+msgstr ""
2075+
2076+#. module: account_l10nbe_domiciliation
2077+#: constraint:ir.ui.view:0
2078+msgid "Invalid XML for View Architecture!"
2079+msgstr ""
2080+
2081+#. module: account_l10nbe_domiciliation
2082+#: wizard_button:invoice.export.dom,export,close:0
2083+msgid "Ok"
2084+msgstr ""
2085+
2086+#. module: account_l10nbe_domiciliation
2087+#: model:ir.actions.wizard,name:account_l10nbe_domiciliation.wizard_invoice_export_dom
2088+msgid "Export Invoice"
2089+msgstr ""
2090+
2091+#. module: account_l10nbe_domiciliation
2092+#: selection:invoice.export.log,state:0
2093+msgid "Succeeded"
2094+msgstr ""
2095+
2096+#. module: account_l10nbe_domiciliation
2097+#: wizard_field:invoice.export.dom,export,invoice_file:0
2098+msgid "Export File"
2099+msgstr ""
2100+
2101+#. module: account_l10nbe_domiciliation
2102+#: field:res.company,id_creditor:0
2103+msgid "Identification number of the Creditor"
2104+msgstr ""
2105+
2106+#. module: account_l10nbe_domiciliation
2107+#: help:invoice.export.dom,init,collection_date:0
2108+msgid "Requested collection date"
2109+msgstr ""
2110+
2111+#. module: account_l10nbe_domiciliation
2112+#: wizard_view:invoice.export.dom,init:0
2113+msgid "Export Invoices"
2114+msgstr ""
2115+
2116+#. module: account_l10nbe_domiciliation
2117+#: wizard_field:invoice.export.dom,init,ref_file:0
2118+msgid "Reference of the file"
2119+msgstr ""
2120+
2121+#. module: account_l10nbe_domiciliation
2122+#: field:account.invoice,domiciled:0
2123+msgid "Domiciled"
2124+msgstr ""
2125+
2126+#. module: account_l10nbe_domiciliation
2127+#: help:invoice.export.dom,init,ref_file:0
2128+msgid "Reference of the file, Used for Dom80 header"
2129+msgstr ""
2130+
2131+#. module: account_l10nbe_domiciliation
2132+#: model:ir.module.module,description:account_l10nbe_domiciliation.module_meta_information
2133+msgid "\n"
2134+" Related with l10n_be module.\n"
2135+" Adds Domiciled and Domiciled send date fields on invoice.\n"
2136+" Domiciliation and Domiciliation Number fields on partner.\n"
2137+" "
2138+msgstr ""
2139+
2140+#. module: account_l10nbe_domiciliation
2141+#: wizard_button:invoice.export.dom,init,export:0
2142+msgid "Export"
2143+msgstr ""
2144+
2145+#. module: account_l10nbe_domiciliation
2146+#: help:res.partner.bank,institution_code:0
2147+msgid "Code of the financial institution used for Dom80 Export"
2148+msgstr ""
2149+
2150+#. module: account_l10nbe_domiciliation
2151+#: wizard_button:invoice.export.dom,init,end:0
2152+msgid "Cancel"
2153+msgstr ""
2154+
2155+#. module: account_l10nbe_domiciliation
2156+#: field:res.partner,domiciliation_bool:0
2157+msgid "Domiciliation"
2158+msgstr ""
2159+
2160+#. module: account_l10nbe_domiciliation
2161+#: model:ir.model,name:account_l10nbe_domiciliation.model_invoice_export_log
2162+msgid "Invoice Export History"
2163+msgstr ""
2164+
2165
2166=== added file 'account_l10nbe_domiciliation/i18n/fr_BE.po'
2167--- account_l10nbe_domiciliation/i18n/fr_BE.po 1970-01-01 00:00:00 +0000
2168+++ account_l10nbe_domiciliation/i18n/fr_BE.po 2012-06-28 13:21:29 +0000
2169@@ -0,0 +1,241 @@
2170+# Translation of OpenERP Server.
2171+# This file contains the translation of the following modules:
2172+# * account_l10nbe_domiciliation
2173+#
2174+msgid ""
2175+msgstr ""
2176+"Project-Id-Version: OpenERP Server 5.0.6\n"
2177+"Report-Msgid-Bugs-To: support@openerp.com\n"
2178+"POT-Creation-Date: 2009-11-24 13:07:05+0000\n"
2179+"PO-Revision-Date: 2009-11-24 13:07:05+0000\n"
2180+"Last-Translator: <>\n"
2181+"Language-Team: \n"
2182+"MIME-Version: 1.0\n"
2183+"Content-Type: text/plain; charset=UTF-8\n"
2184+"Content-Transfer-Encoding: \n"
2185+"Plural-Forms: \n"
2186+
2187+#. module: account_l10nbe_domiciliation
2188+#: view:res.company:0
2189+msgid "Dom80 Export"
2190+msgstr "Export DOM80"
2191+
2192+#. module: account_l10nbe_domiciliation
2193+#: model:ir.module.module,shortdesc:account_l10nbe_domiciliation.module_meta_information
2194+msgid "Account l10nbe Domiciliation"
2195+msgstr "Account l10nbe Domiciliation"
2196+
2197+#. module: account_l10nbe_domiciliation
2198+#: wizard_field:invoice.export.dom,export,note:0
2199+msgid "Log"
2200+msgstr "Log"
2201+
2202+#. module: account_l10nbe_domiciliation
2203+#: field:invoice.export.log,file:0
2204+msgid "Saved File"
2205+msgstr "Fichier enregistré"
2206+
2207+#. module: account_l10nbe_domiciliation
2208+#: field:account.invoice,domiciled_send_date:0
2209+msgid "Domiciliation Sending Date"
2210+msgstr "Date d'envoi de la domiciliation"
2211+
2212+#. module: account_l10nbe_domiciliation
2213+#: constraint:ir.model:0
2214+msgid "The Object name must start with x_ and not contain any special character !"
2215+msgstr "Le nom de l'Objet doit commencer par x_ et ne pas comporter de caractères spéciaux !"
2216+
2217+#. module: account_l10nbe_domiciliation
2218+#: wizard_field:invoice.export.dom,init,msg2:0
2219+msgid "Message to the payer, part 2."
2220+msgstr "Messaye pour le payeur, seconde partie"
2221+
2222+#. module: account_l10nbe_domiciliation
2223+#: wizard_field:invoice.export.dom,init,collection_date:0
2224+msgid "Collection Date"
2225+msgstr "Date pivot"
2226+
2227+#. module: account_l10nbe_domiciliation
2228+#: wizard_view:invoice.export.dom,export:0
2229+msgid "Note"
2230+msgstr "Note"
2231+
2232+#. module: account_l10nbe_domiciliation
2233+#: selection:invoice.export.log,state:0
2234+msgid "Failed"
2235+msgstr "Raté"
2236+
2237+#. module: account_l10nbe_domiciliation
2238+#: wizard_view:invoice.export.dom,export:0
2239+msgid "Save File..."
2240+msgstr "Enregistre fichier..."
2241+
2242+#. module: account_l10nbe_domiciliation
2243+#: field:invoice.export.log,note:0
2244+msgid "Creation Log"
2245+msgstr "Log de création"
2246+
2247+#. module: account_l10nbe_domiciliation
2248+#: constraint:ir.actions.act_window:0
2249+msgid "Invalid model name in the action definition."
2250+msgstr "Nom de modèle incorrect dans la définition de l'action"
2251+
2252+#. module: account_l10nbe_domiciliation
2253+#: model:ir.actions.act_window,name:account_l10nbe_domiciliation.action_account_invoice_log_tree
2254+#: model:ir.ui.menu,name:account_l10nbe_domiciliation.menu_action_action_invoice_export_tree
2255+msgid "Invoice Export Logs"
2256+msgstr "Logs des exportations de factures"
2257+
2258+#. module: account_l10nbe_domiciliation
2259+#: field:res.company,id_sender:0
2260+msgid "Identification number of the Sender"
2261+msgstr "Numéro d'identification de l'expéditeur"
2262+
2263+#. module: account_l10nbe_domiciliation
2264+#: field:invoice.export.log,state:0
2265+msgid "Status"
2266+msgstr "Status"
2267+
2268+#. module: account_l10nbe_domiciliation
2269+#: help:res.company,id_creditor:0
2270+msgid "Creditor Id for Dom80 export header"
2271+msgstr "ID créditeur dans l'en-tête DOM80"
2272+
2273+#. module: account_l10nbe_domiciliation
2274+#: field:invoice.export.log,create_date:0
2275+msgid "Creation Date"
2276+msgstr "Date de création"
2277+
2278+#. module: account_l10nbe_domiciliation
2279+#: view:invoice.export.log:0
2280+msgid "Payment Export Logs"
2281+msgstr "Logs des Export de paiement"
2282+
2283+#. module: account_l10nbe_domiciliation
2284+#: wizard_field:invoice.export.dom,init,msg1:0
2285+msgid "Message to the payer, part 1."
2286+msgstr "Message au payeur, première partie"
2287+
2288+#. module: account_l10nbe_domiciliation
2289+#: field:invoice.export.log,create_uid:0
2290+msgid "Creation User"
2291+msgstr "Créateur"
2292+
2293+#. module: account_l10nbe_domiciliation
2294+#: field:res.partner.bank,institution_code:0
2295+msgid "Institution Code"
2296+msgstr "Code de l'institution"
2297+
2298+#. module: account_l10nbe_domiciliation
2299+#: help:res.company,id_sender:0
2300+msgid "Sender Id for Dom80 export header"
2301+msgstr "ID de l'expéditeur dans le'en-tête DOM80"
2302+
2303+#. module: account_l10nbe_domiciliation
2304+#: model:ir.ui.menu,name:account_l10nbe_domiciliation.menu_action_action_invoice_export
2305+msgid "Invoice Export"
2306+msgstr "Exporter les factures"
2307+
2308+#. module: account_l10nbe_domiciliation
2309+#: wizard_view:invoice.export.dom,init:0
2310+msgid "Export invoice to DOM80 format"
2311+msgstr "Exporter les factures au format DOM80"
2312+
2313+#. module: account_l10nbe_domiciliation
2314+#: field:res.partner,domiciliation:0
2315+msgid "Domiciliation Number"
2316+msgstr "Numéro de domiciliation"
2317+
2318+#. module: account_l10nbe_domiciliation
2319+#: constraint:ir.ui.view:0
2320+msgid "Invalid XML for View Architecture!"
2321+msgstr "XML incorrect pour l'Architecture des Vues !"
2322+
2323+#. module: account_l10nbe_domiciliation
2324+#: wizard_button:invoice.export.dom,export,close:0
2325+msgid "Ok"
2326+msgstr "Ok"
2327+
2328+#. module: account_l10nbe_domiciliation
2329+#: model:ir.actions.wizard,name:account_l10nbe_domiciliation.wizard_invoice_export_dom
2330+msgid "Export Invoice"
2331+msgstr "Exoporte les factures"
2332+
2333+#. module: account_l10nbe_domiciliation
2334+#: selection:invoice.export.log,state:0
2335+msgid "Succeeded"
2336+msgstr "Réussi"
2337+
2338+#. module: account_l10nbe_domiciliation
2339+#: wizard_field:invoice.export.dom,export,invoice_file:0
2340+msgid "Export File"
2341+msgstr "Fichier Exporté"
2342+
2343+#. module: account_l10nbe_domiciliation
2344+#: field:res.company,id_creditor:0
2345+msgid "Identification number of the Creditor"
2346+msgstr "Numéro d'identification du créditeur"
2347+
2348+#. module: account_l10nbe_domiciliation
2349+#: help:invoice.export.dom,init,collection_date:0
2350+msgid "Requested collection date"
2351+msgstr "Date pivot"
2352+
2353+#. module: account_l10nbe_domiciliation
2354+#: wizard_view:invoice.export.dom,init:0
2355+msgid "Export Invoices"
2356+msgstr "Exporter les factures"
2357+
2358+#. module: account_l10nbe_domiciliation
2359+#: wizard_field:invoice.export.dom,init,ref_file:0
2360+msgid "Reference of the file"
2361+msgstr "Référence du fichier"
2362+
2363+#. module: account_l10nbe_domiciliation
2364+#: field:account.invoice,domiciled:0
2365+msgid "Domiciled"
2366+msgstr "Domiciliée"
2367+
2368+#. module: account_l10nbe_domiciliation
2369+#: help:invoice.export.dom,init,ref_file:0
2370+msgid "Reference of the file, Used for Dom80 header"
2371+msgstr "Référence du fichier, utilisée dans l'en-tête DOM80"
2372+
2373+#. module: account_l10nbe_domiciliation
2374+#: model:ir.module.module,description:account_l10nbe_domiciliation.module_meta_information
2375+msgid "\n"
2376+" Related with l10n_be module.\n"
2377+" Adds Domiciled and Domiciled send date fields on invoice.\n"
2378+" Domiciliation and Domiciliation Number fields on partner.\n"
2379+" "
2380+msgstr "\n"
2381+" Lié au module l10n_be.\n"
2382+" Ajoute les champs 'Domiciled' and 'Domiciled send date' aux factures,\n"
2383+" et 'Domiciliation' et 'Domiciliation Number' sur les partenaires.\n"
2384+" "
2385+
2386+#. module: account_l10nbe_domiciliation
2387+#: wizard_button:invoice.export.dom,init,export:0
2388+msgid "Export"
2389+msgstr "Export"
2390+
2391+#. module: account_l10nbe_domiciliation
2392+#: help:res.partner.bank,institution_code:0
2393+msgid "Code of the financial institution used for Dom80 Export"
2394+msgstr "Code de l'institution financière utilisée dans l'export DOM80"
2395+
2396+#. module: account_l10nbe_domiciliation
2397+#: wizard_button:invoice.export.dom,init,end:0
2398+msgid "Cancel"
2399+msgstr "Annule"
2400+
2401+#. module: account_l10nbe_domiciliation
2402+#: field:res.partner,domiciliation_bool:0
2403+msgid "Domiciliation"
2404+msgstr "Domiciliation"
2405+
2406+#. module: account_l10nbe_domiciliation
2407+#: model:ir.model,name:account_l10nbe_domiciliation.model_invoice_export_log
2408+msgid "Invoice Export History"
2409+msgstr "Historique de l'Export des factures"
2410+
2411
2412=== added file 'account_l10nbe_domiciliation/l10nbe_domiciliation.py'
2413--- account_l10nbe_domiciliation/l10nbe_domiciliation.py 1970-01-01 00:00:00 +0000
2414+++ account_l10nbe_domiciliation/l10nbe_domiciliation.py 2012-06-28 13:21:29 +0000
2415@@ -0,0 +1,72 @@
2416+# -*- encoding: utf-8 -*-
2417+##############################################################################
2418+#
2419+# OpenERP, Open Source Management Solution
2420+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
2421+#
2422+# This program is free software: you can redistribute it and/or modify
2423+# it under the terms of the GNU Affero General Public License as
2424+# published by the Free Software Foundation, either version 3 of the
2425+# License, or (at your option) any later version.
2426+#
2427+# This program is distributed in the hope that it will be useful,
2428+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2429+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2430+# GNU Affero General Public License for more details.
2431+#
2432+# You should have received a copy of the GNU Affero General Public License
2433+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2434+#
2435+##############################################################################
2436+from osv import fields, osv
2437+
2438+class account_invoice(osv.osv):
2439+ _inherit = 'account.invoice'
2440+ _description = 'Account Invoice'
2441+ _columns = {
2442+ 'domiciled' : fields.boolean('Domiciled'),
2443+ 'domiciled_send_date' : fields.date('Domiciliation Sending Date', readonly=True, help='This field contains the sending date of the document for direct debit invoices collecting'),
2444+ }
2445+
2446+ def on_change_partner_id(self, cr, uid, ids, type, partner_id,date_invoice=False, payment_term=False):
2447+ data=super(account_invoice,self).onchange_partner_id( cr, uid, ids, type, partner_id,date_invoice, payment_term)
2448+ if not partner_id:
2449+ return data['value'].update({'domiciled' : False})
2450+ partner_obj = self.pool.get('res.partner').browse(cr, uid, partner_id)
2451+ domiciled = partner_obj.domiciliation_bool
2452+ data['value']['domiciled'] = domiciled
2453+ return data
2454+
2455+account_invoice()
2456+
2457+class res_partner(osv.osv):
2458+ _inherit = 'res.partner'
2459+ _description = 'Partner'
2460+ _columns = {
2461+ 'domiciliation_bool':fields.boolean('Direct Debit Permission', help="Check this field if you can collect direct debit invoices for this partner."),
2462+ 'domiciliation' : fields.char('Direct Debit Number', size=12)
2463+ }
2464+res_partner()
2465+
2466+class res_partner_bank(osv.osv):
2467+ _inherit = "res.partner.bank"
2468+ _columns = {
2469+ 'institution_code':fields.char('Institution Code', size=3, help="Code of the financial institution used for Dom80 Export"),
2470+ }
2471+res_partner_bank()
2472+
2473+class invoice_export_log(osv.osv):
2474+ _name = "invoice.export.log"
2475+ _description = "Invoice Export History"
2476+ _rec_name = 'invoice_id'
2477+ _columns = {
2478+ 'state': fields.selection([('failed', 'Failed'), ('succeeded', 'Succeeded')], 'Status', readonly=True),
2479+ 'file': fields.binary('Saved File', readonly=True),
2480+ 'note': fields.text('Creation Log', readonly=True),
2481+ 'create_date': fields.datetime('Creation Date', required=True, readonly=True),
2482+ 'create_uid': fields.many2one('res.users', 'Creation User', required=True, readonly=True),
2483+ }
2484+invoice_export_log()
2485+
2486+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2487+
2488
2489=== added file 'account_l10nbe_domiciliation/l10nbe_domiciliation_report.xml'
2490--- account_l10nbe_domiciliation/l10nbe_domiciliation_report.xml 1970-01-01 00:00:00 +0000
2491+++ account_l10nbe_domiciliation/l10nbe_domiciliation_report.xml 2012-06-28 13:21:29 +0000
2492@@ -0,0 +1,16 @@
2493+<?xml version="1.0" encoding="utf-8"?>
2494+<openerp>
2495+ <data>
2496+ <report auto="False" id="account.account_invoices" menu="False"
2497+ model="account.invoice" name="account.invoice.domiciliated"
2498+ rml="account_l10nbe_domiciliation/report/invoice.rml"
2499+ string="Invoices"
2500+ />
2501+<!-- <report auto="False" id="invoice_domiciliation_save"-->
2502+<!-- model="account.invoice" name="invoice.domiciliation.dom"-->
2503+<!-- rml="account_l10nbe_domiciliation/report/domiciliations.rml"-->
2504+<!-- string="Rapport domiciliations" multi="True" header="False"-->
2505+<!-- />-->
2506+
2507+ </data>
2508+</openerp>
2509
2510=== added file 'account_l10nbe_domiciliation/l10nbe_domiciliation_view.xml'
2511--- account_l10nbe_domiciliation/l10nbe_domiciliation_view.xml 1970-01-01 00:00:00 +0000
2512+++ account_l10nbe_domiciliation/l10nbe_domiciliation_view.xml 2012-06-28 13:21:29 +0000
2513@@ -0,0 +1,121 @@
2514+<?xml version="1.0" ?>
2515+<openerp>
2516+ <data>
2517+<!-- Account Invoice object view (inherited) -->
2518+ <record model="ir.ui.view" id="invoice_form_domicile">
2519+ <field name="name">account.invoice.domicile.form</field>
2520+ <field name="type">form</field>
2521+ <field name="model">account.invoice</field>
2522+ <field name="inherit_id" ref="account.invoice_form"/>
2523+ <field name="arch" type="xml">
2524+ <field name="period_id" position="before">
2525+ <field name="domiciled"/>
2526+ <field name="domiciled_send_date"/>
2527+ </field>
2528+ </field>
2529+ </record>
2530+
2531+ <record model="ir.ui.view" id="invoice_form_partner_domiciled">
2532+ <field name="name">account.invoice.partner.domicile.form</field>
2533+ <field name="type">form</field>
2534+ <field name="model">account.invoice</field>
2535+ <field name="inherit_id" ref="account.invoice_form"/>
2536+ <field name="arch" type="xml">
2537+ <field name="partner_id" position="replace">
2538+ <field name="partner_id" on_change="on_change_partner_id(type, partner_id, date_invoice,payment_term)"/>
2539+ </field>
2540+ </field>
2541+ </record>
2542+
2543+
2544+ <record model="ir.ui.view" id="supplier_invoice_form_domicile">
2545+ <field name="name">supplier.invoice.domicile.form</field>
2546+ <field name="type">form</field>
2547+ <field name="model">account.invoice</field>
2548+ <field name="inherit_id" ref="account.invoice_supplier_form"/>
2549+ <field name="arch" type="xml">
2550+ <field name="period_id" position="before">
2551+ <field name="domiciled"/>
2552+ <field name="domiciled_send_date"/>
2553+ </field>
2554+ </field>
2555+ </record>
2556+
2557+
2558+<!-- Partner object view (inherited) -->
2559+ <record model="ir.ui.view" id="view_partner_domicile_form">
2560+ <field name="name">res.partner.domicile.form</field>
2561+ <field name="type">form</field>
2562+ <field name="model">res.partner</field>
2563+ <field name="inherit_id" ref="base.view_partner_form"/>
2564+ <field name="arch" type="xml">
2565+ <field name="date" position="after">
2566+ <field name="domiciliation"/>
2567+ </field>
2568+ </field>
2569+ </record>
2570+
2571+ <record model="ir.ui.view" id="view_partner_form_inherit_code">
2572+ <field name="name">res.partner.form.insti.code.inherit</field>
2573+ <field name="model">res.partner</field>
2574+ <field name="type">form</field>
2575+ <field name="inherit_id" ref="base.view_partner_form"/>
2576+ <field name="arch" type="xml">
2577+ <field name="bank" position="before">
2578+ <field name="institution_code" select="1"/>
2579+ <newline/>
2580+ </field>
2581+ </field>
2582+ </record>
2583+
2584+<!-- Export Logs views and menuitems-->
2585+
2586+ <record model="ir.ui.view" id="view_account_pay_tree">
2587+ <field name="name">invoice.export.log.tree</field>
2588+ <field name="model">invoice.export.log</field>
2589+ <field name="type">tree</field>
2590+ <field name="arch" type="xml">
2591+ <tree string="Payment Export Logs">
2592+ <field name="file"/>
2593+ <field name="create_date"/>
2594+ <field name="create_uid"/>
2595+ <field name="note"/>
2596+ <field name="state"/>
2597+ </tree>
2598+ </field>
2599+ </record>
2600+
2601+ <record model="ir.ui.view" id="view_payment_mode_form">
2602+ <field name="name">invoice.export.log.form</field>
2603+ <field name="model">invoice.export.log</field>
2604+ <field name="type">form</field>
2605+ <field name="arch" type="xml">
2606+ <form string="Payment Export Logs">
2607+ <field name="create_date" select="1"/>
2608+ <field name="create_uid" select="2"/>
2609+ <newline/>
2610+ <field name="file" colspan="4" select="1"/>
2611+ <newline/>
2612+ <field name="note" colspan="4"/>
2613+ <newline/>
2614+ <field name="state" select="2"/>
2615+ </form>
2616+ </field>
2617+ </record>
2618+ <record model="ir.actions.act_window" id="action_account_invoice_log_tree">
2619+ <field name="name">Invoice Export Logs</field>
2620+ <field name="res_model">invoice.export.log</field>
2621+ <field name="view_type">form</field>
2622+ <field name="view_mode">tree,form</field>
2623+ </record>
2624+
2625+ <menuitem
2626+ name="Invoice Export" parent="account.menu_finance_configuration"
2627+ id="menu_action_action_invoice_export" />
2628+
2629+ <menuitem
2630+ parent="menu_action_action_invoice_export"
2631+ id="menu_action_action_invoice_export_tree" action="action_account_invoice_log_tree"/>
2632+
2633+ </data>
2634+</openerp>
2635
2636=== added file 'account_l10nbe_domiciliation/l10nbe_domiciliation_wizard.xml'
2637--- account_l10nbe_domiciliation/l10nbe_domiciliation_wizard.xml 1970-01-01 00:00:00 +0000
2638+++ account_l10nbe_domiciliation/l10nbe_domiciliation_wizard.xml 2012-06-28 13:21:29 +0000
2639@@ -0,0 +1,18 @@
2640+<?xml version="1.0"?>
2641+<openerp>
2642+ <data>
2643+
2644+ <wizard
2645+ string="Export Domiciliated Invoices"
2646+ model="account.invoice"
2647+ name="invoice.export.dom"
2648+ id="wizard_invoice_export_dom"
2649+ menu="False"
2650+ />
2651+
2652+ <menuitem name="Export Domiciliated Invoices" action="wizard_invoice_export_dom" parent="account.menu_finance_periodical_processing"
2653+ type="wizard" id="menu_account_coda_wizard" sequence="15"/>
2654+
2655+
2656+ </data>
2657+</openerp>
2658
2659=== added directory 'account_l10nbe_domiciliation/report'
2660=== added file 'account_l10nbe_domiciliation/report/Rapport.sxw'
2661Binary files account_l10nbe_domiciliation/report/Rapport.sxw 1970-01-01 00:00:00 +0000 and account_l10nbe_domiciliation/report/Rapport.sxw 2012-06-28 13:21:29 +0000 differ
2662=== added file 'account_l10nbe_domiciliation/report/__init__.py'
2663--- account_l10nbe_domiciliation/report/__init__.py 1970-01-01 00:00:00 +0000
2664+++ account_l10nbe_domiciliation/report/__init__.py 2012-06-28 13:21:29 +0000
2665@@ -0,0 +1,27 @@
2666+# -*- encoding: utf-8 -*-
2667+##############################################################################
2668+#
2669+# OpenERP, Open Source Management Solution
2670+# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
2671+# $Id$
2672+#
2673+# This program is free software: you can redistribute it and/or modify
2674+# it under the terms of the GNU General Public License as published by
2675+# the Free Software Foundation, either version 3 of the License, or
2676+# (at your option) any later version.
2677+#
2678+# This program is distributed in the hope that it will be useful,
2679+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2680+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2681+# GNU General Public License for more details.
2682+#
2683+# You should have received a copy of the GNU General Public License
2684+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2685+#
2686+##############################################################################
2687+
2688+import account_invoice
2689+import report_domiciliations
2690+
2691+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2692+
2693
2694=== added file 'account_l10nbe_domiciliation/report/account_invoice.py'
2695--- account_l10nbe_domiciliation/report/account_invoice.py 1970-01-01 00:00:00 +0000
2696+++ account_l10nbe_domiciliation/report/account_invoice.py 2012-06-28 13:21:29 +0000
2697@@ -0,0 +1,37 @@
2698+# -*- encoding: utf-8 -*-
2699+##############################################################################
2700+#
2701+# OpenERP, Open Source Management Solution
2702+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
2703+# $Id$
2704+#
2705+# This program is free software: you can redistribute it and/or modify
2706+# it under the terms of the GNU General Public License as published by
2707+# the Free Software Foundation, either version 3 of the License, or
2708+# (at your option) any later version.
2709+#
2710+# This program is distributed in the hope that it will be useful,
2711+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2712+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2713+# GNU General Public License for more details.
2714+#
2715+# You should have received a copy of the GNU General Public License
2716+# along with this program. If not, see <http://www.gnu.org/licenses/>.
2717+#
2718+##############################################################################
2719+
2720+import time
2721+from report import report_sxw
2722+
2723+class account_invoice(report_sxw.rml_parse):
2724+ def __init__(self, cr, uid, name, context):
2725+ super(account_invoice, self).__init__(cr, uid, name, context)
2726+ self.localcontext.update({
2727+ 'time': time,
2728+ })
2729+report_sxw.report_sxw(
2730+ 'report.account.invoice.domiciliated',
2731+ 'account.invoice',
2732+ 'addons/account_l10nbe_domiciliation/report/invoice.rml',
2733+ parser=account_invoice
2734+)
2735\ No newline at end of file
2736
2737=== added file 'account_l10nbe_domiciliation/report/domiciliations.rml'
2738--- account_l10nbe_domiciliation/report/domiciliations.rml 1970-01-01 00:00:00 +0000
2739+++ account_l10nbe_domiciliation/report/domiciliations.rml 2012-06-28 13:21:29 +0000
2740@@ -0,0 +1,261 @@
2741+<?xml version="1.0"?>
2742+<document filename="dom80.pdf">
2743+ <template pageSize="(595.0,842.0)" title="dom80" author="Martin Simon" allowSplitting="20">
2744+ <pageTemplate id="first">
2745+ <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
2746+ </pageTemplate>
2747+ </template>
2748+ <stylesheet>
2749+ <blockTableStyle id="Standard_Outline">
2750+ <blockAlignment value="LEFT"/>
2751+ <blockValign value="TOP"/>
2752+ </blockTableStyle>
2753+ <blockTableStyle id="Table1">
2754+ <blockAlignment value="LEFT"/>
2755+ <blockValign value="TOP"/>
2756+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
2757+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
2758+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
2759+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
2760+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
2761+ </blockTableStyle>
2762+ <blockTableStyle id="Table3">
2763+ <blockAlignment value="LEFT"/>
2764+ <blockValign value="TOP"/>
2765+ </blockTableStyle>
2766+ <blockTableStyle id="Table4">
2767+ <blockAlignment value="LEFT"/>
2768+ <blockValign value="TOP"/>
2769+ <lineStyle kind="LINEBELOW" colorName="#ececec" start="0,-1" stop="4,-1"/>
2770+ </blockTableStyle>
2771+
2772+ <blockTableStyle id="TableH1">
2773+ <blockAlignment value="LEFT"/>
2774+ <blockValign value="TOP"/>
2775+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
2776+ <lineStyle kind="LINEAFTER" colorName="#000000" start="0,0" stop="0,-1"/>
2777+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
2778+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
2779+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
2780+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
2781+ <lineStyle kind="LINEAFTER" colorName="#000000" start="2,0" stop="2,-1"/>
2782+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
2783+ </blockTableStyle>
2784+
2785+ <blockTableStyle id="TableC1">
2786+ <blockAlignment value="LEFT"/>
2787+ <blockValign value="TOP"/>
2788+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
2789+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
2790+ <lineStyle kind="LINEAFTER" colorName="#000000" start="0,0" stop="0,-1"/>
2791+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
2792+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
2793+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
2794+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
2795+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
2796+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
2797+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
2798+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
2799+ <lineStyle kind="LINEAFTER" colorName="#000000" start="4,0" stop="4,-1"/>
2800+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
2801+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,1" stop="0,-1"/>
2802+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
2803+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,1" stop="1,-1"/>
2804+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
2805+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,1" stop="2,-1"/>
2806+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
2807+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,1" stop="3,-1"/>
2808+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
2809+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="4,1" stop="4,-1"/>
2810+ <lineStyle kind="LINEAFTER" colorName="#000000" start="4,1" stop="4,-1"/>
2811+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
2812+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,2" stop="0,-1"/>
2813+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
2814+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,2" stop="1,-1"/>
2815+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
2816+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,2" stop="2,-1"/>
2817+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
2818+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,2" stop="3,-1"/>
2819+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
2820+ <lineStyle kind="LINEBEFORE" colorName="#000000" start="4,2" stop="4,-1"/>
2821+ <lineStyle kind="LINEAFTER" colorName="#000000" start="4,2" stop="4,-1"/>
2822+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
2823+ </blockTableStyle>
2824+
2825+ <initialize>
2826+ <paraStyle name="all" alignment="justify"/>
2827+ </initialize>
2828+
2829+ <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="18.0" leading="17" alignment="CENTER"/>
2830+ <paraStyle name="P2" fontName="Helvetica" fontSize="15.0" leading="14" alignment="LEFT"/>
2831+ <paraStyle name="P3" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT"/>
2832+ <paraStyle name="P4" fontName="Helvetica-BoldOblique" fontSize="6.0" leading="8" alignment="LEFT"/>
2833+ <paraStyle name="P5" fontName="Helvetica-Oblique" fontSize="9" alignment="LEFT"/>
2834+ <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
2835+ <paraStyle name="P7" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
2836+ <paraStyle name="P8" fontName="Helvetica-BoldOblique" fontSize="8.0" leading="10" alignment="CENTER"/>
2837+ <paraStyle name="P9" fontName="Helvetica-BoldOblique" fontSize="8.0" leading="10" alignment="CENTER"/>
2838+ <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
2839+ <paraStyle name="P11" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT"/>
2840+ <paraStyle name="P12" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="CENTER"/>
2841+ <paraStyle name="P13" fontName="Helvetica-BoldOblique" fontSize="8.0" leading="10" alignment="LEFT"/>
2842+ <paraStyle name="P14" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT"/>
2843+ <paraStyle name="P15" fontName="Helvetica-BoldOblique" fontSize="2.0" leading="3" alignment="CENTER"/>
2844+ <paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2845+ <paraStyle name="P17" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="5.0" leading="7" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2846+ <paraStyle name="P18" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2847+ <paraStyle name="P19" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2848+ <paraStyle name="Standard" fontName="Times-Roman"/>
2849+ <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
2850+ <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
2851+ <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
2852+ <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
2853+ <paraStyle name="Index" fontName="Times-Roman"/>
2854+ <paraStyle name="Table Contents" fontName="Times-Roman"/>
2855+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
2856+ <paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
2857+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
2858+ </stylesheet>
2859+ <images/>
2860+ <story>
2861+ <para style="P4">
2862+ <font color="white"> </font>
2863+ </para>
2864+ <para style="P1"><u>Liste des domiciliations préparées le [[ formatLang(time.strftime('%d-%m-%Y'),date_time = True) ]]</u></para>
2865+ <para style="P2">
2866+ <font color="white"> </font>
2867+ </para>
2868+ <para style="P2">
2869+ <font color="white"> </font>
2870+ </para>
2871+ <para style="P2">
2872+ <font color="white"> </font>
2873+ </para>
2874+ <blockTable colWidths="95.0,95.0,95.0,95.0,95.0" style="Table1">
2875+ <tr>
2876+ <td>
2877+ <para style="P3">Client</para>
2878+ </td>
2879+ <td>
2880+ <para style="P3">Numéro domiciliation</para>
2881+ </td>
2882+ <td>
2883+ <para style="P3">Montant (Euro)</para>
2884+ </td>
2885+ <td>
2886+ <para style="P3">Banque</para>
2887+ </td>
2888+ <td>
2889+ <para style="P3">Communication</para>
2890+ </td>
2891+ </tr>
2892+ </blockTable>
2893+ <blockTable colWidths="482.0" style="Table3">
2894+ <tr>
2895+ <td>
2896+ <para style="P17">[[ repeatIn(invoice_details(data['form']['inv_ids']), 'a') ]]</para>
2897+ <blockTable colWidths="95.0,95.0,95.0,95.0,95.0" style="Table4">
2898+ <tr>
2899+ <td>
2900+ <para style="P5">[[ a['client'] ]]</para>
2901+ </td>
2902+ <td>
2903+ <para style="P5">[[ a['number'] ]]</para>
2904+ </td>
2905+ <td>
2906+ <para style="P5">[[ a['amount'] ]]</para>
2907+ </td>
2908+ <td>
2909+ <para style="P5">[[ a['bank'] ]]</para>
2910+ </td>
2911+ <td>
2912+ <para style="P5">[[ a['communication'] ]]</para>
2913+ </td>
2914+ </tr>
2915+ </blockTable>
2916+ </td>
2917+ </tr>
2918+ </blockTable>
2919+ <para style="P16">
2920+ <font color="white"> </font>
2921+ </para>
2922+ <para style="P19">
2923+ <font color="white"> </font>
2924+ </para>
2925+ <para style="P19">
2926+ <font color="white"> </font>
2927+ </para>
2928+
2929+ <blockTable colWidths="100.0,200.0,200.0" style="TableH1">
2930+ <tr>
2931+ <td>
2932+ <para style="P17">[[ repeatIn(statastics_details(data['form']['account_bank_number'],data['form']['inv_ids']), 's') ]]</para>
2933+ </td>
2934+ <td>
2935+ <para style="P8">Banque [[ s['bank_name'] ]]</para>
2936+ </td>
2937+ <td>
2938+ <para style="P9">Autres banques</para>
2939+ </td>
2940+ </tr>
2941+ </blockTable>
2942+
2943+ <blockTable colWidths="100.0,100.0,100.0,100.0,100.0" style="TableC1">
2944+ <tr>
2945+ <td>
2946+ <para style="P17">[[ repeatIn(statastics_details(data['form']['account_bank_number'],data['form']['inv_ids']), 's') ]]</para>
2947+ </td>
2948+ <td>
2949+ <para style="P12">Nombre</para>
2950+ </td>
2951+ <td>
2952+ <para style="P12">Valeur totale</para>
2953+ </td>
2954+ <td>
2955+ <para style="P12">Nombre</para>
2956+ </td>
2957+ <td>
2958+ <para style="P12">Valeur totale</para>
2959+ </td>
2960+ </tr>
2961+ <tr>
2962+ <td>
2963+ <para style="P13">Recouvrements</para>
2964+ </td>
2965+ <td>
2966+ <para style="P10">[[ s['rec_bank_tot'] ]]</para>
2967+ </td>
2968+ <td>
2969+ <para style="P10">[[ s['rec_bank_val'] ]]</para>
2970+ </td>
2971+ <td>
2972+ <para style="P10">[[ s['rec_other_tot'] ]]</para>
2973+ </td>
2974+ <td>
2975+ <para style="P10">[[ s['rec_other_val'] ]]</para>
2976+ </td>
2977+ </tr>
2978+ <tr>
2979+ <td>
2980+ <para style="P13">Remboursements</para>
2981+ </td>
2982+ <td>
2983+ <para style="P10">[[ s['ref_bank_tot'] ]]</para>
2984+ </td>
2985+ <td>
2986+ <para style="P10">[[ s['ref_bank_val'] ]]</para>
2987+ </td>
2988+ <td>
2989+ <para style="P10">[[ s['ref_other_tot'] ]]</para>
2990+ </td>
2991+ <td>
2992+ <para style="P10">[[ s['ref_other_val'] ]]</para>
2993+ </td>
2994+ </tr>
2995+ </blockTable>
2996+
2997+ <para style="P19">
2998+ <font color="white"> </font>
2999+ </para>
3000+ </story>
3001+</document>
3002
3003=== added file 'account_l10nbe_domiciliation/report/invoice.rml'
3004--- account_l10nbe_domiciliation/report/invoice.rml 1970-01-01 00:00:00 +0000
3005+++ account_l10nbe_domiciliation/report/invoice.rml 2012-06-28 13:21:29 +0000
3006@@ -0,0 +1,429 @@
3007+<?xml version="1.0"?>
3008+<document filename="test.pdf">
3009+ <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
3010+ <pageTemplate id="first">
3011+ <frame id="first" x1="34.0" y1="28.0" width="530" height="786"/>
3012+ </pageTemplate>
3013+ </template>
3014+ <stylesheet>
3015+ <blockTableStyle id="Standard_Outline">
3016+ <blockAlignment value="LEFT"/>
3017+ <blockValign value="TOP"/>
3018+ </blockTableStyle>
3019+ <blockTableStyle id="Table_Partner_Address">
3020+ <blockAlignment value="LEFT"/>
3021+ <blockValign value="TOP"/>
3022+ </blockTableStyle>
3023+ <blockTableStyle id="Table_Invoice_General_Header">
3024+ <blockAlignment value="LEFT"/>
3025+ <blockValign value="TOP"/>
3026+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
3027+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
3028+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
3029+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
3030+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
3031+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
3032+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
3033+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
3034+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
3035+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
3036+ </blockTableStyle>
3037+ <blockTableStyle id="Table_General_Detail_Content">
3038+ <blockAlignment value="LEFT"/>
3039+ <blockValign value="TOP"/>
3040+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
3041+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
3042+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
3043+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
3044+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
3045+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
3046+ <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
3047+ <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
3048+ <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
3049+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
3050+ </blockTableStyle>
3051+ <blockTableStyle id="Table_Header_Invoice_Line">
3052+ <blockAlignment value="LEFT"/>
3053+ <blockValign value="TOP"/>
3054+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
3055+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
3056+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
3057+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
3058+ <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
3059+ <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
3060+ </blockTableStyle>
3061+ <blockTableStyle id="Table_Invoice_Line_Content">
3062+ <blockAlignment value="LEFT"/>
3063+ <blockValign value="TOP"/>
3064+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
3065+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
3066+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
3067+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
3068+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
3069+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
3070+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
3071+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
3072+ </blockTableStyle>
3073+ <blockTableStyle id="Table_Format_2">
3074+ <blockAlignment value="LEFT"/>
3075+ <blockValign value="TOP"/>
3076+ <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
3077+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
3078+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
3079+ <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="1,0" stop="1,-1"/>
3080+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
3081+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
3082+ <lineStyle kind="LINEAFTER" colorName="#ffffff" start="2,0" stop="2,-1"/>
3083+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="2,0" stop="2,0"/>
3084+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
3085+ <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="3,0" stop="3,-1"/>
3086+ <lineStyle kind="LINEAFTER" colorName="#ffffff" start="3,0" stop="3,-1"/>
3087+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="3,0" stop="3,0"/>
3088+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="3,-1" stop="3,-1"/>
3089+ <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
3090+ <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
3091+ <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
3092+ <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/>
3093+ <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/>
3094+ <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/>
3095+ <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,1" stop="0,-1"/>
3096+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,1" stop="0,1"/>
3097+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
3098+ <lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,1" stop="1,-1"/>
3099+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,1" stop="1,1"/>
3100+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
3101+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,2" stop="0,2"/>
3102+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/>
3103+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/>
3104+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,4" stop="0,4"/>
3105+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,4" stop="1,4"/>
3106+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,4" stop="2,4"/>
3107+ </blockTableStyle>
3108+ <blockTableStyle id="Table_format_Table_Line_total">
3109+ <blockAlignment value="LEFT"/>
3110+ <blockValign value="TOP"/>
3111+ <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
3112+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
3113+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
3114+ <lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,0" stop="1,-1"/>
3115+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
3116+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
3117+ </blockTableStyle>
3118+ <blockTableStyle id="Table_eclu_Taxes_Total">
3119+ <blockAlignment value="LEFT"/>
3120+ <blockValign value="TOP"/>
3121+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
3122+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
3123+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
3124+ </blockTableStyle>
3125+ <blockTableStyle id="Table_Taxes_Total">
3126+ <blockAlignment value="LEFT"/>
3127+ <blockValign value="TOP"/>
3128+ </blockTableStyle>
3129+ <blockTableStyle id="Table_Total_Include_Taxes">
3130+ <blockAlignment value="LEFT"/>
3131+ <blockValign value="TOP"/>
3132+ <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
3133+ <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
3134+ <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
3135+ </blockTableStyle>
3136+ <blockTableStyle id="Table_Main_Table">
3137+ <blockAlignment value="LEFT"/>
3138+ <blockValign value="TOP"/>
3139+ <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
3140+ <lineStyle kind="LINEAFTER" colorName="#ffffff" start="0,0" stop="0,-1"/>
3141+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
3142+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
3143+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
3144+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
3145+ <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
3146+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
3147+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
3148+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
3149+ <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,2" stop="0,-1"/>
3150+ <lineStyle kind="LINEAFTER" colorName="#ffffff" start="0,2" stop="0,-1"/>
3151+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
3152+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
3153+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
3154+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
3155+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
3156+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
3157+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
3158+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
3159+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
3160+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
3161+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="3,-1" stop="3,-1"/>
3162+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
3163+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
3164+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
3165+ </blockTableStyle>
3166+ <blockTableStyle id="Table_Tax_Header">
3167+ <blockAlignment value="LEFT"/>
3168+ <blockValign value="TOP"/>
3169+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
3170+ <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
3171+ <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
3172+ </blockTableStyle>
3173+ <blockTableStyle id="Table_Tax_Content">
3174+ <blockAlignment value="LEFT"/>
3175+ <blockValign value="TOP"/>
3176+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
3177+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
3178+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
3179+ </blockTableStyle>
3180+ <blockTableStyle id="Table_Table_Border_White">
3181+ <blockAlignment value="LEFT"/>
3182+ <blockValign value="TOP"/>
3183+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
3184+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
3185+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
3186+ </blockTableStyle>
3187+ <blockTableStyle id="Table_Final_Border">
3188+ <blockAlignment value="LEFT"/>
3189+ <blockValign value="TOP"/>
3190+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
3191+ <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
3192+ </blockTableStyle>
3193+ <blockTableStyle id="Table_Coment_Payment_Term">
3194+ <blockAlignment value="LEFT"/>
3195+ <blockValign value="TOP"/>
3196+ </blockTableStyle>
3197+ <blockTableStyle id="Table_Payment_Terms">
3198+ <blockAlignment value="LEFT"/>
3199+ <blockValign value="TOP"/>
3200+ </blockTableStyle>
3201+ <initialize>
3202+ <paraStyle name="all" alignment="justify"/>
3203+ </initialize>
3204+ <paraStyle name="Standard" fontName="Times-Roman"/>
3205+ <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
3206+ <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
3207+ <paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
3208+ <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
3209+ <paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
3210+ <paraStyle name="Index" fontName="Times-Roman"/>
3211+ <paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
3212+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
3213+ <paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3214+ <paraStyle name="Footer" fontName="Times-Roman"/>
3215+ <paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
3216+ <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
3217+ <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
3218+ <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
3219+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
3220+ <paraStyle name="terp_default_Bold_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3221+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
3222+ <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
3223+ <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
3224+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
3225+ <paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
3226+ <paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
3227+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
3228+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
3229+ <paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3230+ <paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3231+ <paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3232+ <paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
3233+ <paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
3234+ <paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
3235+ <paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3236+ <paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3237+ <paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
3238+ </stylesheet>
3239+ <images/>
3240+ <story>
3241+ <para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
3242+ <para style="terp_default_8">[[ o.partner_id.name ]]</para>
3243+ <para style="terp_default_8">[[ setLang(o.partner_id.lang) ]] </para>
3244+ <blockTable colWidths="297.0,233.0" style="Table_Partner_Address">
3245+ <tr>
3246+ <td><para style="P8"><font color="white"> </font></para></td>
3247+ <td>
3248+ <para style="terp_default_8">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
3249+ <para style="terp_default_8">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
3250+ <para style="terp_default_8">[[ o.address_invoice_id.street ]]</para>
3251+ <para style="terp_default_8">[[ o.address_invoice_id.street2 or '' ]]</para>
3252+ <para style="terp_default_8">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
3253+ <para style="terp_default_8">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
3254+ <para style="terp_default_8">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
3255+ <para style="P8"><font color="white"> </font></para>
3256+ <para style="terp_default_8">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
3257+ <para style="terp_default_8">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
3258+ <para style="terp_default_8">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
3259+ </td>
3260+ </tr>
3261+ </blockTable>
3262+ <para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
3263+ <para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
3264+ <para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
3265+ <para style="terp_header">Canceled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
3266+ <para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
3267+ <para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
3268+ <para style="terp_header">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
3269+ <para style="P8"><font color="white"> </font></para>
3270+ <blockTable colWidths="177.0,177.0,177.0" style="Table_Invoice_General_Header">
3271+ <tr>
3272+ <td><para style="terp_tblheader_General_Centre">Document</para></td>
3273+ <td><para style="terp_tblheader_General_Centre">Invoice Date</para></td>
3274+ <td><para style="terp_tblheader_General_Centre">Partner Ref.</para></td>
3275+ </tr>
3276+ </blockTable>
3277+ <blockTable colWidths="177.0,177.0,177.0" style="Table_General_Detail_Content">
3278+ <tr>
3279+ <td><para style="terp_default_Centre_9">[[ o.name ]]</para></td>
3280+ <td><para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para></td>
3281+ <td><para style="terp_default_Centre_9">[[ o.address_invoice_id.partner_id.ref or '' ]]</para></td>
3282+ </tr>
3283+ </blockTable>
3284+ <para style="P8"><font color="white"></font></para>
3285+ <para style="P8"><font color="white"> </font></para>
3286+ <blockTable colWidths="211.0,62.0,63.0,63.0,40.0,84.0" style="Table_Header_Invoice_Line">
3287+ <tr>
3288+ <td><para style="terp_tblheader_Details">Description</para></td>
3289+ <td><para style="terp_tblheader_Details">Taxes</para></td>
3290+ <td><para style="terp_tblheader_Details">Quantity</para></td>
3291+ <td><para style="terp_tblheader_Details_Centre">Unit Price</para></td>
3292+ <td><para style="terp_tblheader_Details">Disc.(%)</para></td>
3293+ <td><para style="terp_tblheader_Details_Centre">Price</para></td>
3294+ </tr>
3295+ </blockTable>
3296+ <section>
3297+ <para style="terp_default_8">[[ repeatIn(o.invoice_line,'l') ]]</para>
3298+ <blockTable colWidths="211.0,62.0,36.0,27.0,63.0,36.0,62.0,26.0" style="Table_Invoice_Line_Content">
3299+ <tr>
3300+ <td><para style="terp_default_9">[[ l.name ]]</para></td>
3301+ <td><para style="terp_default_9">[[ ', '.join([ lt.description or '' for lt in l.invoice_line_tax_id ]) ]]</para></td>
3302+ <td><para style="terp_default_Right_9">[[ formatLang(l.quantity)]]</para></td>
3303+ <td><para style="terp_default_Right_9">[[ (l.uos_id and l.uos_id.name) or '' ]]</para></td>
3304+ <td><para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para></td>
3305+ <td><para style="terp_default_Right_9">[[ formatLang(l.discount) ]] </para></td>
3306+ <td><para style="terp_default_Right_9">[[ formatLang(l.price_subtotal) ]]</para></td>
3307+ <td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
3308+ </tr>
3309+ <tr>
3310+ <td><para style="terp_default_Note">[[ format(l.note) or removeParentNode('tr') ]]</para></td>
3311+ <td><para style="terp_default_Note"><font color="white"> </font></para></td>
3312+ <td><para style="terp_default_Note"><font color="white"> </font></para></td>
3313+ <td><para style="terp_default_Note"><font color="white"> </font></para></td>
3314+ <td><para style="terp_default_Note"><font color="white"> </font></para></td>
3315+ <td><para style="terp_default_Note"><font color="white"> </font></para></td>
3316+ <td><para style="terp_default_Note"><font color="white"> </font></para></td>
3317+ <td><para style="terp_default_Note"><font color="white"> </font></para></td>
3318+ </tr>
3319+ </blockTable>
3320+ </section>
3321+ <blockTable colWidths="371.0,153.0" style="Table_Format_2">
3322+ <tr>
3323+ <td>
3324+ <blockTable colWidths="176.0,258.0" style="Table_format_Table_Line_total">
3325+ <tr>
3326+ <td><para style="terp_default_2"><font color="white"> </font></para></td>
3327+ <td><para style="terp_default_2"><font color="white"> </font></para></td>
3328+ </tr>
3329+ </blockTable>
3330+ </td>
3331+ <td>
3332+ <blockTable colWidths="62.0,59.0,25.0" style="Table_eclu_Taxes_Total">
3333+ <tr>
3334+ <td><para style="terp_default_Bold_9">Net Total:</para></td>
3335+ <td><para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]]</para></td>
3336+ <td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
3337+ </tr>
3338+ </blockTable>
3339+ <blockTable colWidths="63.0,58.0,26.0" style="Table_Taxes_Total">
3340+ <tr>
3341+ <td><para style="terp_default_Bold_9">Taxes:</para></td>
3342+ <td><para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]]</para></td>
3343+ <td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
3344+ </tr>
3345+ </blockTable>
3346+ <blockTable colWidths="63.0,58.0,26.0" style="Table_Total_Include_Taxes">
3347+ <tr>
3348+ <td><para style="terp_default_Bold_9">Total:</para></td>
3349+ <td><para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]]</para></td>
3350+ <td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
3351+ </tr>
3352+ </blockTable>
3353+ </td>
3354+ </tr>
3355+ </blockTable>
3356+ <blockTable colWidths="530.0" style="Table_Main_Table">
3357+ <tr>
3358+ <td>
3359+ <blockTable colWidths="54.0,80.0,67.0" style="Table_Tax_Header">
3360+ <tr>
3361+ <td><para style="terp_tblheader_Details_Centre">Tax</para></td>
3362+ <td><para style="terp_tblheader_Details_Right">Base</para></td>
3363+ <td><para style="terp_tblheader_Details_Right">Amount</para></td>
3364+ </tr>
3365+ </blockTable>
3366+ </td>
3367+ </tr>
3368+ <tr>
3369+ <td>
3370+ <para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
3371+ <blockTable colWidths="53.0,80.0,65.0" style="Table_Tax_Content">
3372+ <tr>
3373+ <td><para style="terp_default_Centre_8">[[ t.name ]] </para></td>
3374+ <td><para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para></td>
3375+ <td><para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]][[ formatLang(t.amount) ]]</para></td>
3376+ </tr>
3377+ </blockTable>
3378+ </td>
3379+ </tr>
3380+ <tr>
3381+ <td>
3382+ <blockTable colWidths="53.0,60.0,65.0" style="Table_Table_Border_White">
3383+ <tr>
3384+ <td><para style="terp_default_2"><font color="white"> </font></para></td>
3385+ <td><para style="terp_default_2"><font color="white"> </font></para></td>
3386+ <td><para style="terp_default_2"><font color="white"> </font></para></td>
3387+ </tr>
3388+ </blockTable>
3389+ </td>
3390+ </tr>
3391+ </blockTable>
3392+ <blockTable colWidths="180.0,350.0" style="Table_Final_Border">
3393+ <tr>
3394+ <td><para style="terp_default_2"><font color="white"> </font></para></td>
3395+ <td><para style="terp_default_2"><font color="white"> </font></para></td>
3396+ </tr>
3397+ </blockTable>
3398+ <blockTable colWidths="530.0" style="Table_Coment_Payment_Term">
3399+ <tr>
3400+ <td><para style="terp_default_9">[[ format(o.comment or removeParentNode('blockTable')) ]]</para></td>
3401+ </tr>
3402+ </blockTable>
3403+ <blockTable colWidths="530.0" style="Table_Coment_Payment_Term">
3404+ <tr>
3405+ <td><para style="terp_default_9">Domiciliated [[ ((o.domiciled== True or removeParentNode('para')) and '') ]]</para></td>
3406+ </tr>
3407+ </blockTable>
3408+
3409+ <para style="terp_default_2">
3410+ <font color="white"> </font>
3411+ </para>
3412+ <blockTable colWidths="530.0" style="Table_Payment_Terms">
3413+ <tr>
3414+ <td><para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]</para></td>
3415+ </tr>
3416+ </blockTable>
3417+ <para style="terp_default_2">
3418+ <font color="white"> </font>
3419+ </para>
3420+ <blockTable colWidths="128.0,402.0" style="Standard_Outline">
3421+ <tr>
3422+ <td>
3423+ <para style="terp_default_Bold_9">Fiscal Position Remark :</para>
3424+ </td>
3425+ <td>
3426+ <para style="terp_default_9">[[ format(o.fiscal_position and o.fiscal_position.note or removeParentNode('blockTable')) ]]</para>
3427+ </td>
3428+ </tr>
3429+ </blockTable>
3430+ <para style="terp_default_2">
3431+ <font color="white"> </font>
3432+ </para>
3433+
3434+ </story>
3435+</document>
3436
3437=== added file 'account_l10nbe_domiciliation/report/invoice.sxw'
3438Binary files account_l10nbe_domiciliation/report/invoice.sxw 1970-01-01 00:00:00 +0000 and account_l10nbe_domiciliation/report/invoice.sxw 2012-06-28 13:21:29 +0000 differ
3439=== added file 'account_l10nbe_domiciliation/report/report_domiciliations.py'
3440--- account_l10nbe_domiciliation/report/report_domiciliations.py 1970-01-01 00:00:00 +0000
3441+++ account_l10nbe_domiciliation/report/report_domiciliations.py 2012-06-28 13:21:29 +0000
3442@@ -0,0 +1,121 @@
3443+# -*- encoding: utf-8 -*-
3444+##############################################################################
3445+#
3446+# OpenERP, Open Source Management Solution
3447+# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
3448+# $Id$
3449+#
3450+# This program is free software: you can redistribute it and/or modify
3451+# it under the terms of the GNU General Public License as published by
3452+# the Free Software Foundation, either version 3 of the License, or
3453+# (at your option) any later version.
3454+#
3455+# This program is distributed in the hope that it will be useful,
3456+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3457+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3458+# GNU General Public License for more details.
3459+#
3460+# You should have received a copy of the GNU General Public License
3461+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3462+#
3463+##############################################################################
3464+
3465+import time
3466+from report import report_sxw
3467+from osv import osv
3468+
3469+class invoice_domiciliations(report_sxw.rml_parse):
3470+ def __init__(self, cr, uid, name, context):
3471+ super(invoice_domiciliations, self).__init__(cr, uid, name, context)
3472+ self.localcontext.update({
3473+ 'time': time,
3474+ 'invoice_details' : self._get_invoice_details,
3475+ 'statastics_details' : self._statastics_details,
3476+ })
3477+
3478+ def _get_invoice_details(self, inv_ids):
3479+ lines = []
3480+ inv_obj = self.pool.get('account.invoice')
3481+ for inv in inv_obj.browse(self.cr, self.uid, inv_ids):
3482+ res = {}
3483+ res['client'] = inv.partner_id.name
3484+ res['number'] = inv.partner_id.domiciliation
3485+ res['bank'] = inv.partner_bank and inv.partner_bank.name or ''
3486+ res['amount'] = (inv.type == 'out_refund') and -inv.residual or inv.residual
3487+ res['communication'] = inv.name or ''
3488+ lines.append(res)
3489+ return lines
3490+
3491+ def _statastics_details(self, bank_account_id, inv_ids):
3492+ lines = []
3493+ datas = ['rec_bank_tot', 'rec_bank_val', 'ref_bank_tot', 'ref_bank_val' , \
3494+ 'rec_other_tot', 'rec_other_val', 'ref_other_tot', 'ref_other_val' ]
3495+ res = {}
3496+ user = self.pool.get('res.users').browse(self.cr, self.uid, self.uid)
3497+ bank = self.pool.get('res.partner.bank').browse(self.cr, self.uid, bank_account_id)
3498+ res['bank_name'] = ''
3499+ if not bank.bank:
3500+ bank_id = '0'
3501+ else:
3502+ bank_id = str(bank.bank.id)
3503+ res['bank_name'] = bank.bank.name
3504+ invoice_ids = ','.join(map(str,inv_ids))
3505+ self.cr.execute("select count(ai.id) as tot, coalesce(sum(residual),0)as val from account_invoice ai \
3506+ join res_partner_bank rpb on (ai.partner_bank=rpb.id)\
3507+ join res_bank bank on (rpb.bank=bank.id)\
3508+ where bank.id =%s \
3509+ and type not like '%%refund' \
3510+ and ai.id in (%s)" % (bank_id,invoice_ids))
3511+ val1= self.cr.dictfetchall()
3512+ if val1:
3513+ res['rec_bank_tot'] = val1[0]['tot'] # 1
3514+ res['rec_bank_val'] = val1[0]['val'] # 2
3515+
3516+ self.cr.execute("select count(ai.id) as tot, coalesce(sum(residual),0)as val from account_invoice ai \
3517+ join res_partner_bank rpb on (ai.partner_bank=rpb.id)\
3518+ join res_bank bank on (rpb.bank=bank.id)\
3519+ where bank.id =%s \
3520+ and type like '%%refund' \
3521+ and ai.id in (%s)" % (bank_id,invoice_ids))
3522+
3523+ val2= self.cr.dictfetchall()
3524+ if val2:
3525+ res['ref_bank_tot'] = val2[0]['tot'] # 5
3526+ res['ref_bank_val'] = val2[0]['val'] # 6
3527+
3528+ self.cr.execute("select count(ai.id) as tot, coalesce(sum(residual),0)as val from account_invoice ai \
3529+ join res_partner_bank rpb on (ai.partner_bank=rpb.id)\
3530+ join res_bank bank on (rpb.bank=bank.id)\
3531+ where bank.id !=%s \
3532+ and type not like '%%refund' \
3533+ and ai.id in (%s)" % (bank_id,invoice_ids))
3534+ val3= self.cr.dictfetchall()
3535+ if val3:
3536+ res['rec_other_tot'] = val3[0]['tot'] # 3
3537+ res['rec_other_val'] = val3[0]['val'] # 4
3538+
3539+ self.cr.execute("select count(ai.id) as tot, coalesce(sum(residual),0)as val from account_invoice ai \
3540+ join res_partner_bank rpb on (ai.partner_bank=rpb.id)\
3541+ join res_bank bank on (rpb.bank=bank.id)\
3542+ where bank.id !=%s \
3543+ and type like '%%refund' \
3544+ and ai.id in (%s)" % (bank_id,invoice_ids))
3545+ val4= self.cr.dictfetchall()
3546+ if val4:
3547+ res['ref_other_tot'] = val4[0]['tot'] # 7
3548+ res['ref_other_val'] = val4[0]['val'] # 8
3549+
3550+ for d in datas:
3551+ res.setdefault(0.0)
3552+
3553+ lines.append(res)
3554+ return lines
3555+
3556+report_sxw.report_sxw(
3557+ 'report.invoice.domiciliation.dom',
3558+ 'account.invoice',
3559+ 'addons/account_l10nbe_domiciliation/report/domiciliations.rml',
3560+ parser=invoice_domiciliations, header=False
3561+)
3562+
3563+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3564
3565=== added directory 'account_l10nbe_domiciliation/wizard'
3566=== added file 'account_l10nbe_domiciliation/wizard/__init__.py'
3567--- account_l10nbe_domiciliation/wizard/__init__.py 1970-01-01 00:00:00 +0000
3568+++ account_l10nbe_domiciliation/wizard/__init__.py 2012-06-28 13:21:29 +0000
3569@@ -0,0 +1,26 @@
3570+# -*- encoding: utf-8 -*-
3571+##############################################################################
3572+#
3573+# OpenERP, Open Source Management Solution
3574+# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
3575+# $Id$
3576+#
3577+# This program is free software: you can redistribute it and/or modify
3578+# it under the terms of the GNU General Public License as published by
3579+# the Free Software Foundation, either version 3 of the License, or
3580+# (at your option) any later version.
3581+#
3582+# This program is distributed in the hope that it will be useful,
3583+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3584+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3585+# GNU General Public License for more details.
3586+#
3587+# You should have received a copy of the GNU General Public License
3588+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3589+#
3590+##############################################################################
3591+
3592+import export_invoice
3593+
3594+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3595+
3596
3597=== added file 'account_l10nbe_domiciliation/wizard/export_invoice.py'
3598--- account_l10nbe_domiciliation/wizard/export_invoice.py 1970-01-01 00:00:00 +0000
3599+++ account_l10nbe_domiciliation/wizard/export_invoice.py 2012-06-28 13:21:29 +0000
3600@@ -0,0 +1,382 @@
3601+# -*- encoding: utf-8 -*-
3602+##############################################################################
3603+#
3604+# OpenERP, Open Source Management Solution
3605+# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
3606+# $Id$
3607+#
3608+# This program is free software: you can redistribute it and/or modify
3609+# it under the terms of the GNU General Public License as published by
3610+# the Free Software Foundation, either version 3 of the License, or
3611+# (at your option) any later version.
3612+#
3613+# This program is distributed in the hope that it will be useful,
3614+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3615+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3616+# GNU General Public License for more details.
3617+#
3618+# You should have received a copy of the GNU General Public License
3619+# along with this program. If not, see <http://www.gnu.org/licenses/>.
3620+#
3621+##############################################################################
3622+import pooler
3623+import wizard
3624+import base64
3625+from osv import osv
3626+import time
3627+from tools.translate import _
3628+
3629+form = """<?xml version="1.0"?>
3630+<form string="Export Invoices">
3631+<separator string="Export invoice to DOM80 format" colspan="4" />
3632+ <field name="ref_file" colspan="4" />
3633+ <field name="collection_date" colspan="4" />
3634+ <field name="account_bank_number" colspan="4" />
3635+ <field name="sender" colspan="4" />
3636+ <field name="credit_note" colspan="4" />
3637+</form>"""
3638+
3639+fields = {
3640+ 'ref_file' : {
3641+ 'string':'Reference of the file',
3642+ 'type':'char',
3643+ 'size' : 10,
3644+ 'help' : "Reference of the file, Used for Dom80 header",
3645+ 'required': True,
3646+ },
3647+ 'collection_date' : {
3648+ 'string':'Collection Date',
3649+ 'type':'date',
3650+ 'required': True,
3651+ 'default' : time.strftime('%Y-%m-%d'),
3652+ 'help' : "Requested collection date"
3653+ },
3654+ 'sender': {
3655+ 'string': 'Document Sender',
3656+ 'type': 'many2one',
3657+ 'relation': 'res.partner',
3658+ 'help': 'This field have to be filled in cases where the sender is different from the creditor'
3659+ },
3660+ 'account_bank_number': {
3661+ 'string': 'Account Bank Number',
3662+ 'type': 'many2one',
3663+ 'relation': 'res.partner.bank',
3664+ 'help': 'Select here the creditor account number',
3665+ 'domain': "[('state','=','bank'),('partner_id','=',1)]", #to improve: partner of the company of the uid
3666+ 'required': True
3667+ },
3668+ 'credit_note': {
3669+ 'string': 'With Credit Note?',
3670+ 'type': 'boolean',
3671+ 'help': 'Check if you want to export credit note'
3672+ },
3673+
3674+ }
3675+
3676+save_form = """<?xml version="1.0"?>
3677+<form string="Save File...">
3678+ <field name="invoice_file"/>
3679+ <separator string="Note" colspan="4" />
3680+ <field name="note" colspan="4" nolabel="1" readonly="1"/>
3681+ </form>"""
3682+
3683+save_fields = {
3684+ 'invoice_file' : {
3685+ 'string':'Export File',
3686+ 'type':'binary',
3687+ 'required': False,
3688+ 'readonly':True,
3689+ },
3690+ 'note' : {'string':'Log', 'type':'text'},
3691+}
3692+
3693+trans=[(u'ᅢᄅ', 'e'),
3694+ (u'ᅢᄄ', 'e'),
3695+ (u'ᅢᅠ', 'a'),
3696+ (u'ᅢᆰ', 'e'),
3697+ (u'ᅢᆴ', 'i'),
3698+ (u'ᅢᆵ', 'i'),
3699+ (u'ᅢᄁ', 'a'),
3700+ (u'ᅢᄂ', 'a')]
3701+
3702+def tr(s):
3703+ s= s.decode('utf-8')
3704+ for k in trans:
3705+ s = s.replace(k[0], k[1])
3706+ try:
3707+ res= s.encode('ascii', 'replace')
3708+ except:
3709+ res = s
3710+ return res
3711+
3712+class record:
3713+ def __init__(self, global_context_dict):
3714+
3715+ for i in global_context_dict:
3716+ global_context_dict[i]= global_context_dict[i] and tr(global_context_dict[i])
3717+ self.fields = []
3718+ self.global_values = global_context_dict
3719+ self.pre={'padding':'', 'seg_num1':'0', 'seg_num2':'1',
3720+ 'seg_num3':'1', 'seg_num4':'1', 'seg_num5':'1', 'seg_num8':'1', 'seg_num_t':'9',
3721+ 'flag':'0', 'flag1':'\n'
3722+ }
3723+ self.init_local_context()
3724+
3725+ def init_local_context(self):
3726+ """
3727+ Must instanciate a fields list, field = (name,size)
3728+ and update a local_values dict.
3729+ """
3730+ raise "not implemented"
3731+
3732+ def generate(self):
3733+ res=''
3734+ value=0
3735+ go=True
3736+ for field in self.fields :
3737+ if self.pre.has_key(field[0]):
3738+ value = self.pre[field[0]]
3739+ elif self.global_values.has_key(field[0]):
3740+ value = self.global_values[field[0]]
3741+ else :
3742+ continue
3743+ #raise Exception(field[0]+' not found !')
3744+ try:
3745+ res = res + c_ljust(value, field[1])
3746+ except :
3747+ pass
3748+
3749+ return res
3750+
3751+class record_header(record):
3752+ def init_local_context(self):
3753+ self.fields=[
3754+ #Header record start
3755+ ('identification', 1),
3756+ ('zeros', 4), ('creation_date', 6),
3757+ ('institution_code', 3), ('app_code', 2), ('ref_file', 10), ('id_sender', 11), ('id_creditor', 11),
3758+ ('acc_num_creditor', 12), ('version_code', 1), ('if_duplicate', 1), ('collection_date', 6), ('blanks', 60)
3759+ ]
3760+
3761+class record_trailer(record):
3762+ def init_local_context(self):
3763+ self.fields=[
3764+ #Trailer record start
3765+ ('identification', 1),
3766+ ('tot_collection', 4), ('tot_amount_collection', 12) ,
3767+ ('tot_collection_direct_debit_num', 15),
3768+ ('tot_reversal_inst', 4), ('tot_amount_reversal_inst', 12),
3769+ ('tot_reversal_direct_debit_num', 15),
3770+ ('blanks', 65),
3771+ ]
3772+
3773+class record_invoice_data(record):
3774+ def init_local_context(self):
3775+ self.fields=[
3776+ ('identification', 1), ('serial_num', 4), ('direct_debit_num', 12),
3777+ ('type_code', 1),
3778+ ('amount_collection', 12), ('creditor', 26), ('msg_payer_1', 15),
3779+ ('msg_payer_2', 15), ('creditor_ref', 12), ('blanks', 30),
3780+ ]
3781+
3782+def c_ljust(s, size):
3783+ """
3784+ check before calling ljust
3785+ """
3786+ s= s or ''
3787+ if len(s) > size:
3788+ s= s[:size]
3789+ s = s.decode('utf-8').encode('latin1', 'replace').ljust(size)
3790+ return s
3791+
3792+class Log:
3793+ def __init__(self):
3794+ self.content= ""
3795+ self.error= False
3796+ def add(self, s, error=True):
3797+ self.content= self.content + s
3798+ if error:
3799+ self.error= error
3800+ def __call__(self):
3801+ return self.content
3802+
3803+def _create_file(self, cr, uid, data, context):
3804+ v1 = {}
3805+ v2 = {}
3806+ v3 = {}
3807+ log=''
3808+ log = Log()
3809+ blank_space = ' '
3810+
3811+ seq = 0
3812+ inv_seq = 0
3813+ total = 0
3814+ inv_total = 0
3815+ invoice_data = ''
3816+
3817+ pool = pooler.get_pool(cr.dbname)
3818+ partner_obj = pool.get('res.partner')
3819+ bank_obj = pool.get('res.partner.bank')
3820+ invoice_obj = pool.get('account.invoice')
3821+ obj_cmpny = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid).company_id
3822+
3823+ #Header Record Start
3824+
3825+ v1['identification']='0' #1
3826+ v1['zeros']='0000' # 2-5
3827+ v1['creation_date']= time.strftime('%d%m%y') #6-11
3828+ code = bank_obj.browse(cr, uid, data['form']['account_bank_number']).institution_code
3829+ if not code:
3830+ return {'note':_('Please provide Institution Code number for the bank of the creditor.'), 'invoice_file': False, 'state':'' }
3831+
3832+ v1['institution_code'] = code # 12-14
3833+ v1['app_code']= '02' # 15-16
3834+ v1['ref_file']= data['form']['ref_file'] or '' # 17-26
3835+
3836+ id_creditor = obj_cmpny.partner_id.vat
3837+ if not id_creditor:
3838+ return {'note': _('Please Provide VAT number for the creditor.'), 'invoice_file': False, 'state':'failed' }
3839+ v1['id_creditor']= '0' + id_creditor[-10:]
3840+
3841+ sender_rec = data['form']['sender'] and partner_obj.browse(cr, uid, data['form']['sender']) or obj_cmpny.partner_id
3842+ id_sender = sender_rec.vat
3843+ if not id_sender:
3844+ return {'note': _('Please Provide VAT number for the Sender.'), 'invoice_file': False, 'state':'failed' }
3845+ v1['id_sender']= '0' + id_sender[-10:] # 27-37
3846+
3847+ #Taken bank account num of main company
3848+ partner_bank = bank_obj.browse(cr, uid, data['form']['account_bank_number']).acc_number
3849+
3850+ if partner_bank:
3851+ v1['acc_num_creditor'] = partner_bank
3852+ else:
3853+ return {'note':_('Please Provide Bank number for the creditor.'), 'invoice_file': False, 'state':'failed' }
3854+
3855+ v1['version_code']='5' #61
3856+ v1['if_duplicate']=' ' # 62
3857+ collection_date = time.strptime(data['form']['collection_date'], '%Y-%m-%d')
3858+ v1['collection_date'] = time.strftime('%d%m%y', collection_date)
3859+ v1['blanks'] = ' '*60
3860+ file_header =record_header(v1).generate()
3861+ #Header Record End
3862+
3863+ #Data Record Start
3864+ direct_debit_num_tot = 0
3865+ inv_direct_debit_num_tot = 0
3866+ if data['form']['credit_note']:
3867+ cr.execute("select id from account_invoice where domiciled=True and domiciled_send_date is null and type in('out_refund', 'out_invoice') and state ='open'")
3868+ else:
3869+ cr.execute("select id from account_invoice where domiciled=True and domiciled_send_date is null and type in('out_invoice') and state ='open'")
3870+
3871+ inv_ids = map(lambda x:x[0], cr.fetchall())
3872+ if not inv_ids:
3873+ return {'note': _('There is no no invoices to export'), 'invoice_file': False, 'state':'failed' }
3874+
3875+ collected_invoice_ids = []
3876+ for inv in invoice_obj.browse(cr, uid, inv_ids):
3877+ seq=seq+1
3878+ v2['identification'] = '1'
3879+ v2['serial_num'] = str(seq)[-4:].rjust(4, '0')
3880+ v2['direct_debit_num'] = inv.partner_id.domiciliation
3881+ v2['amount_collection'] = (('%.2f' % inv.residual).replace('.', '')).rjust(12, '0')
3882+ v2['msg_payer_1'] = inv.name
3883+ v2['msg_payer_2'] = ''
3884+ v2['creditor_ref' ] = '0' * 12
3885+ v2['blanks' ] = ' ' * 30
3886+
3887+ if inv.type == 'out_refund':
3888+ v2['type_code'] = '1'
3889+ inv_total += inv.residual
3890+ inv_seq += 1
3891+ inv_direct_debit_num_tot += int(v2['direct_debit_num'])
3892+ v2['creditor'] = inv.partner_id.name
3893+ else:
3894+ total += inv.residual
3895+ direct_debit_num_tot += int(v2['direct_debit_num'])
3896+ v2['type_code'] = '0'
3897+ v2['creditor'] = obj_cmpny.partner_id.name#inv.partner_id.name#.ljust(26 , ' ')
3898+
3899+ invoice_data = invoice_data+ '\n' + record_invoice_data(v2).generate()
3900+ collected_invoice_ids.append(inv.id)
3901+ #Data Record End
3902+
3903+ #Trailer Record Start
3904+ v3['identification'] = '9'
3905+ v3['tot_collection'] = str(seq-inv_seq).rjust(4, '0')
3906+ v3['tot_amount_collection'] = (('%.2f' % total).replace('.', '')).rjust(12, '0')
3907+ v3['tot_collection_direct_debit_num'] = str(direct_debit_num_tot).rjust(15, '0')
3908+
3909+ v3['tot_reversal_inst'] = str(inv_seq).rjust(4, '0')
3910+ v3['tot_amount_reversal_inst'] = (('%.2f' % inv_total).replace('.','')).rjust(12, '0')
3911+ v3['tot_reversal_direct_debit_num'] = str(inv_direct_debit_num_tot).rjust(15, '0')
3912+
3913+ v3['blanks' ] = ' ' * 65
3914+
3915+ file_trailer = '\n' + record_trailer(v3).generate()
3916+
3917+ #Trailer Record End
3918+
3919+ dom_data = file_header + invoice_data + file_trailer
3920+ log.add("Successfully Exported\n--------------------\nSummary:\n\nTotal amount collected : %.2f \nTotal Number of collection : %d \n-------------------- " %(total, seq))
3921+ invoice_obj.write(cr, uid, collected_invoice_ids,{'domiciled_send_date': time.strftime('%Y-%m-%d')},context=context)
3922+ return {'note':log(), 'invoice_file': base64.encodestring(dom_data), 'state':'succeeded', 'inv_ids':collected_invoice_ids}
3923+
3924+
3925+def float2str(lst):
3926+ return str(lst).rjust(16).replace('.', '')
3927+
3928+def _log_create(self, cr, uid, data, context):
3929+ pool = pooler.get_pool(cr.dbname)
3930+ pool.get('invoice.export.log').create(cr, uid, {
3931+ 'note': data['form']['note'],
3932+ 'file': data['form']['invoice_file'] and data['form']['invoice_file'] or False,
3933+ 'state': data['form']['state'],
3934+ })
3935+
3936+ return {}
3937+
3938+def _check(self, cr, uid, data, context):
3939+ if data['form']['state'] == 'failed':
3940+ return 'failed'
3941+ return 'close'
3942+
3943+class wizard_pay_create(wizard.interface):
3944+
3945+ states = {
3946+ 'init' : {
3947+ 'actions' : [],
3948+ 'result' : {'type' : 'form',
3949+ 'arch' : form,
3950+ 'fields' : fields,
3951+ 'state' : [('end', 'Cancel'), ('export', 'Export') ]}
3952+ },
3953+ 'export' : {
3954+ 'actions' : [_create_file],
3955+ 'result' : {'type' : 'form',
3956+ 'arch' : save_form,
3957+ 'fields' : save_fields,
3958+ 'state' : [('next_state_check', 'Ok', 'gtk-ok') ]}
3959+ },
3960+ 'next_state_check': {
3961+ 'actions': [_log_create],
3962+ 'result' : {'type': 'choice', 'next_state': _check }
3963+ },
3964+ 'failed': {
3965+ 'actions': [],
3966+ 'result': {'type': 'state', 'state':'end'}
3967+ },
3968+
3969+ 'close': {
3970+ 'actions': [],
3971+ 'result': {'type': 'state', 'state':'report'}
3972+ },
3973+ 'report': {
3974+ 'actions': [],
3975+ 'result': {'type':'print', 'report':'invoice.domiciliation.dom', 'state':'end'}
3976+ }
3977+ }
3978+wizard_pay_create('invoice.export.dom')
3979+
3980+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
3981+
3982+
3983
3984=== added directory 'account_report_aged_partner_balance_v6'
3985=== added file 'account_report_aged_partner_balance_v6/__init__.py'
3986--- account_report_aged_partner_balance_v6/__init__.py 1970-01-01 00:00:00 +0000
3987+++ account_report_aged_partner_balance_v6/__init__.py 2012-06-28 13:21:29 +0000
3988@@ -0,0 +1,26 @@
3989+# -*- coding: utf-8 -*-
3990+##############################################################################
3991+#
3992+# OpenERP, Open Source Management Solution
3993+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
3994+#
3995+# This program is free software: you can redistribute it and/or modify
3996+# it under the terms of the GNU Affero General Public License as
3997+# published by the Free Software Foundation, either version 3 of the
3998+# License, or (at your option) any later version.
3999+#
4000+# This program is distributed in the hope that it will be useful,
4001+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4002+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4003+# GNU Affero General Public License for more details.
4004+#
4005+# You should have received a copy of the GNU Affero General Public License
4006+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4007+#
4008+##############################################################################
4009+
4010+import account_move_line
4011+import wizard
4012+import report
4013+
4014+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4015
4016=== added file 'account_report_aged_partner_balance_v6/__terp__.py'
4017--- account_report_aged_partner_balance_v6/__terp__.py 1970-01-01 00:00:00 +0000
4018+++ account_report_aged_partner_balance_v6/__terp__.py 2012-06-28 13:21:29 +0000
4019@@ -0,0 +1,42 @@
4020+# -*- coding: utf-8 -*-
4021+##############################################################################
4022+#
4023+# OpenERP, Open Source Management Solution
4024+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
4025+#
4026+# This program is free software: you can redistribute it and/or modify
4027+# it under the terms of the GNU Affero General Public License as
4028+# published by the Free Software Foundation, either version 3 of the
4029+# License, or (at your option) any later version.
4030+#
4031+# This program is distributed in the hope that it will be useful,
4032+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4033+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4034+# GNU Affero General Public License for more details.
4035+#
4036+# You should have received a copy of the GNU Affero General Public License
4037+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4038+#
4039+##############################################################################
4040+
4041+
4042+{
4043+ 'name': 'Backport of the accounting report \'aged partner balance\' of v6',
4044+ 'version': '1.1',
4045+ 'category': 'Generic Modules/Accounting',
4046+ 'description': """This module contains the financial an accounting reports defined in the v6 with few changements in order to get them compatible for v5. It directly comes from the extra_addons module account_v6_reports_backport but include only the aged partner balance in order to don't remove cci customization on other reports.
4047+ """,
4048+ 'author': 'OpenERP SA',
4049+ 'website': 'http://www.openerp.com',
4050+ 'depends': ['account', 'account_report_bs_pl'],
4051+ 'init_xml': [],
4052+ 'update_xml': [
4053+ 'wizard/account_report_aged_partner_balance_view.xml',
4054+ ],
4055+ 'demo_xml': [],
4056+ 'test': [],
4057+ 'installable': True,
4058+ 'active': False,
4059+ 'certificate': '00544170409926159389',
4060+}
4061+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4062
4063=== added file 'account_report_aged_partner_balance_v6/account_move_line.py'
4064--- account_report_aged_partner_balance_v6/account_move_line.py 1970-01-01 00:00:00 +0000
4065+++ account_report_aged_partner_balance_v6/account_move_line.py 2012-06-28 13:21:29 +0000
4066@@ -0,0 +1,136 @@
4067+# -*- coding: utf-8 -*-
4068+##############################################################################
4069+#
4070+# OpenERP, Open Source Management Solution
4071+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
4072+#
4073+# This program is free software: you can redistribute it and/or modify
4074+# it under the terms of the GNU Affero General Public License as
4075+# published by the Free Software Foundation, either version 3 of the
4076+# License, or (at your option) any later version.
4077+#
4078+# This program is distributed in the hope that it will be useful,
4079+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4080+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4081+# GNU Affero General Public License for more details.
4082+#
4083+# You should have received a copy of the GNU Affero General Public License
4084+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4085+#
4086+##############################################################################
4087+
4088+from osv import fields, osv
4089+
4090+class account_account(osv.osv):
4091+ _inherit = "account.account"
4092+
4093+ def _get_level(self, cr, uid, ids, field_name, arg, context={}):
4094+ res={}
4095+ accounts = self.browse(cr, uid, ids)
4096+ for account in accounts:
4097+ level = 0
4098+ if account.parent_id:
4099+ obj = self.browse(cr, uid, account.parent_id.id)
4100+ level = obj.level + 1
4101+ res[account.id] = level
4102+ return res
4103+
4104+ _columns = {
4105+ 'level': fields.function(_get_level, string='Level', method=True, store=True, type='integer'),
4106+ }
4107+account_account()
4108+
4109+#modifications on class account_period and account_move_line are deprecated because of code in account_report_bs_pl module
4110+#class account_period(osv.osv):
4111+# _inherit = "account.period"
4112+#
4113+# def build_ctx_periods(self, cr, uid, period_from_id, period_to_id):
4114+# period_from = self.browse(cr, uid, period_from_id)
4115+# period_date_start = period_from.date_start
4116+# #company1_id = period_from.company_id and period_from.company_id.id or False
4117+# period_to = self.browse(cr, uid, period_to_id)
4118+# period_date_stop = period_to.date_stop
4119+# #company2_id = period_to.company_id and period_from.company_id.id or False
4120+# #if company1_id != company2_id:
4121+# # raise osv.except_osv(_('Error'), _('You should have chosen periods that belongs to the same company'))
4122+# if period_date_start > period_date_stop:
4123+# raise osv.except_osv(_('Error'), _('Start period should be smaller then End period'))
4124+# return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop),])# ('company_id', '=', company1_id)])
4125+#account_period()
4126+#
4127+#class account_move_line(osv.osv):
4128+# _inherit = "account.move.line"
4129+#
4130+# def _query_get(self, cr, uid, obj='l', context=None):
4131+# fiscalyear_obj = self.pool.get('account.fiscalyear')
4132+# fiscalperiod_obj = self.pool.get('account.period')
4133+# account_obj = self.pool.get('account.account')
4134+# fiscalyear_ids = []
4135+# if context is None:
4136+# context = {}
4137+# initial_bal = context.get('initial_bal', False)
4138+# company_clause = " "
4139+# if context.get('company_id', False):
4140+# company_clause = " AND " +obj+".company_id = %s" % context.get('company_id', False)
4141+# if not context.get('fiscalyear', False):
4142+# if context.get('all_fiscalyear', False):
4143+# #this option is needed by the aged balance report because otherwise, if we search only the draft ones, an open invoice of a closed fiscalyear won't be displayed
4144+# fiscalyear_ids = fiscalyear_obj.search(cr, uid, [])
4145+# else:
4146+# fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('state', '=', 'draft')])
4147+# else:
4148+# #for initial balance as well as for normal query, we check only the selected FY because the best practice is to generate the FY opening entries
4149+# fiscalyear_ids = [context['fiscalyear']]
4150+#
4151+# fiscalyear_clause = (','.join([str(x) for x in fiscalyear_ids])) or '0'
4152+# state = context.get('state', False)
4153+# where_move_state = ''
4154+# where_move_lines_by_date = ''
4155+#
4156+# if context.get('date_from', False) and context.get('date_to', False):
4157+# if initial_bal:
4158+# where_move_lines_by_date = " AND " +obj+".move_id IN (SELECT id FROM account_move WHERE date < '" +context['date_from']+"')"
4159+# else:
4160+# where_move_lines_by_date = " AND " +obj+".move_id IN (SELECT id FROM account_move WHERE date >= '" +context['date_from']+"' AND date <= '"+context['date_to']+"')"
4161+#
4162+# if state:
4163+# if state.lower() not in ['all']:
4164+# where_move_state= " AND "+obj+".move_id IN (SELECT id FROM account_move WHERE account_move.state = '"+state+"')"
4165+#
4166+# if context.get('period_from', False) and context.get('period_to', False) and not context.get('periods', False):
4167+# if initial_bal:
4168+# period_company_id = fiscalperiod_obj.browse(cr, uid, context['period_from'], context=context).company_id.id
4169+# first_period = fiscalperiod_obj.search(cr, uid, [('company_id', '=', period_company_id)], order='date_start', limit=1)[0]
4170+# context['periods'] = fiscalperiod_obj.build_ctx_periods(cr, uid, first_period, context['period_from'])
4171+# else:
4172+# context['periods'] = fiscalperiod_obj.build_ctx_periods(cr, uid, context['period_from'], context['period_to'])
4173+# if context.get('periods', False):
4174+# if initial_bal:
4175+# query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s)) %s %s" % (fiscalyear_clause, where_move_state, where_move_lines_by_date)
4176+# period_ids = fiscalperiod_obj.search(cr, uid, [('id', 'in', context['periods'])], order='date_start', limit=1)
4177+# if period_ids and period_ids[0]:
4178+# first_period = fiscalperiod_obj.browse(cr, uid, period_ids[0], context=context)
4179+# # Find the old periods where date start of those periods less then Start period
4180+# periods = fiscalperiod_obj.search(cr, uid, [('date_start', '<', first_period.date_start)])
4181+# periods = ','.join([str(x) for x in periods])
4182+# if periods:
4183+# query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s) AND id IN (%s)) %s %s" % (fiscalyear_clause, periods, where_move_state, where_move_lines_by_date)
4184+# else:
4185+# ids = ','.join([str(x) for x in context['periods']])
4186+# query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s) AND id IN (%s)) %s %s" % (fiscalyear_clause, ids, where_move_state, where_move_lines_by_date)
4187+# else:
4188+# query = obj+".state <> 'draft' AND "+obj+".period_id IN (SELECT id FROM account_period WHERE fiscalyear_id IN (%s)) %s %s" % (fiscalyear_clause, where_move_state, where_move_lines_by_date)
4189+#
4190+# if context.get('journal_ids', False):
4191+# query += ' AND '+obj+'.journal_id IN (%s)' % ','.join(map(str, context['journal_ids']))
4192+#
4193+# if context.get('chart_account_id', False):
4194+# child_ids = account_obj._get_children_and_consol(cr, uid, [context['chart_account_id']], context=context)
4195+# query += ' AND '+obj+'.account_id IN (%s)' % ','.join(map(str, child_ids))
4196+#
4197+# query += company_clause
4198+#
4199+# return query
4200+#account_move_line()
4201+
4202+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4203
4204=== added directory 'account_report_aged_partner_balance_v6/report'
4205=== added file 'account_report_aged_partner_balance_v6/report/__init__.py'
4206--- account_report_aged_partner_balance_v6/report/__init__.py 1970-01-01 00:00:00 +0000
4207+++ account_report_aged_partner_balance_v6/report/__init__.py 2012-06-28 13:21:29 +0000
4208@@ -0,0 +1,23 @@
4209+# -*- coding: utf-8 -*-
4210+##############################################################################
4211+#
4212+# OpenERP, Open Source Management Solution
4213+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
4214+#
4215+# This program is free software: you can redistribute it and/or modify
4216+# it under the terms of the GNU Affero General Public License as
4217+# published by the Free Software Foundation, either version 3 of the
4218+# License, or (at your option) any later version.
4219+#
4220+# This program is distributed in the hope that it will be useful,
4221+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4222+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4223+# GNU Affero General Public License for more details.
4224+#
4225+# You should have received a copy of the GNU Affero General Public License
4226+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4227+#
4228+##############################################################################
4229+import common_report_header
4230+import account_aged_partner_balance
4231+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4232
4233=== added file 'account_report_aged_partner_balance_v6/report/account_aged_partner_balance.py'
4234--- account_report_aged_partner_balance_v6/report/account_aged_partner_balance.py 1970-01-01 00:00:00 +0000
4235+++ account_report_aged_partner_balance_v6/report/account_aged_partner_balance.py 2012-06-28 13:21:29 +0000
4236@@ -0,0 +1,382 @@
4237+# -*- coding: utf-8 -*-
4238+##############################################################################
4239+#
4240+# OpenERP, Open Source Management Solution
4241+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
4242+#
4243+# This program is free software: you can redistribute it and/or modify
4244+# it under the terms of the GNU Affero General Public License as
4245+# published by the Free Software Foundation, either version 3 of the
4246+# License, or (at your option) any later version.
4247+#
4248+# This program is distributed in the hope that it will be useful,
4249+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4250+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4251+# GNU Affero General Public License for more details.
4252+#
4253+# You should have received a copy of the GNU Affero General Public License
4254+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4255+#
4256+##############################################################################
4257+
4258+import time
4259+from report import report_sxw
4260+from common_report_header import common_report_header
4261+
4262+class aged_trial_report(report_sxw.rml_parse, common_report_header):
4263+
4264+ def __init__(self, cr, uid, name, context):
4265+ super(aged_trial_report, self).__init__(cr, uid, name, context=context)
4266+ print "v6 report"
4267+ self.total_account = []
4268+ self.localcontext.update({
4269+ 'time': time,
4270+ 'get_lines_with_out_partner': self._get_lines_with_out_partner,
4271+ 'get_lines': self._get_lines,
4272+ 'get_total': self._get_total,
4273+ 'get_direction': self._get_direction,
4274+ 'get_for_period': self._get_for_period,
4275+ 'get_company': self._get_company,
4276+ 'get_currency': self._get_currency,
4277+ 'get_partners':self._get_partners,
4278+ 'get_account': self._get_account,
4279+ 'get_fiscalyear': self._get_fiscalyear,
4280+ 'get_target_move': self._get_target_move,
4281+ })
4282+
4283+ def set_context(self, objects, data, ids, report_type=None):
4284+ obj_move = self.pool.get('account.move.line')
4285+ ctx = data['form'].get('used_context', {})
4286+ ctx.update({'fiscalyear': False, 'all_fiscalyear': True})
4287+ self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=ctx)
4288+ self.direction_selection = data['form'].get('direction_selection', 'past')
4289+ self.target_move = data['form'].get('target_move', 'all')
4290+ self.date_from = data['form'].get('date_from', time.strftime('%Y-%m-%d'))
4291+ if (data['form']['result_selection'] == 'customer' ):
4292+ self.ACCOUNT_TYPE = ['receivable']
4293+ elif (data['form']['result_selection'] == 'supplier'):
4294+ self.ACCOUNT_TYPE = ['payable']
4295+ else:
4296+ self.ACCOUNT_TYPE = ['payable','receivable']
4297+ return super(aged_trial_report, self).set_context(objects, data, ids, report_type=report_type)
4298+
4299+ def _get_lines(self, form):
4300+ res = []
4301+ move_state = ['draft','posted']
4302+ if self.target_move == 'posted':
4303+ move_state = ['posted']
4304+ self.cr.execute('SELECT DISTINCT res_partner.id AS id,\
4305+ res_partner.name AS name \
4306+ FROM res_partner,account_move_line AS l, account_account, account_move am\
4307+ WHERE (l.account_id=account_account.id) \
4308+ AND (l.move_id=am.id) \
4309+ AND (am.state IN %s)\
4310+ AND (account_account.type IN %s)\
4311+ AND account_account.active\
4312+ AND ((reconcile_id IS NULL)\
4313+ OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
4314+ AND (l.partner_id=res_partner.id)\
4315+ AND (l.date <= %s)\
4316+ AND ' + self.query + ' \
4317+ ORDER BY res_partner.name', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from,))
4318+ partners = self.cr.dictfetchall()
4319+ ## mise a 0 du total
4320+ for i in range(7):
4321+ self.total_account.append(0)
4322+ #
4323+ # Build a string like (1,2,3) for easy use in SQL query
4324+ partner_ids = [x['id'] for x in partners]
4325+ if not partner_ids:
4326+ return []
4327+ # This dictionary will store the debit-credit for all partners, using partner_id as key.
4328+
4329+ totals = {}
4330+ self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit) \
4331+ FROM account_move_line AS l, account_account, account_move am \
4332+ WHERE (l.account_id = account_account.id) AND (l.move_id=am.id) \
4333+ AND (am.state IN %s)\
4334+ AND (account_account.type IN %s)\
4335+ AND (l.partner_id IN %s)\
4336+ AND ((l.reconcile_id IS NULL)\
4337+ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
4338+ AND ' + self.query + '\
4339+ AND account_account.active\
4340+ AND (l.date <= %s)\
4341+ GROUP BY l.partner_id ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from, self.date_from,))
4342+ t = self.cr.fetchall()
4343+ for i in t:
4344+ totals[i[0]] = i[1]
4345+
4346+ # This dictionary will store the future or past of all partners
4347+ future_past = {}
4348+ if self.direction_selection == 'future':
4349+ self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit) \
4350+ FROM account_move_line AS l, account_account, account_move am \
4351+ WHERE (l.account_id=account_account.id) AND (l.move_id=am.id) \
4352+ AND (am.state IN %s)\
4353+ AND (account_account.type IN %s)\
4354+ AND (COALESCE(l.date_maturity, l.date) < %s)\
4355+ AND (l.partner_id IN %s)\
4356+ AND ((l.reconcile_id IS NULL)\
4357+ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
4358+ AND '+ self.query + '\
4359+ AND account_account.active\
4360+ AND (l.date <= %s)\
4361+ GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids),self.date_from, self.date_from,))
4362+ t = self.cr.fetchall()
4363+ for i in t:
4364+ future_past[i[0]] = i[1]
4365+ elif self.direction_selection == 'past': # Using elif so people could extend without this breaking
4366+ self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit) \
4367+ FROM account_move_line AS l, account_account, account_move am \
4368+ WHERE (l.account_id=account_account.id) AND (l.move_id=am.id)\
4369+ AND (am.state IN %s)\
4370+ AND (account_account.type IN %s)\
4371+ AND (COALESCE(l.date_maturity,l.date) > %s)\
4372+ AND (l.partner_id IN %s)\
4373+ AND ((l.reconcile_id IS NULL)\
4374+ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
4375+ AND '+ self.query + '\
4376+ AND account_account.active\
4377+ AND (l.date <= %s)\
4378+ GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from, self.date_from,))
4379+ t = self.cr.fetchall()
4380+ for i in t:
4381+ future_past[i[0]] = i[1]
4382+
4383+ # Use one query per period and store results in history (a list variable)
4384+ # Each history will contain: history[1] = {'<partner_id>': <partner_debit-credit>}
4385+ history = []
4386+ for i in range(5):
4387+ args_list = (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids),self.date_from,)
4388+ dates_query = '(COALESCE(l.date_maturity,l.date)'
4389+ if form[str(i)]['start'] and form[str(i)]['stop']:
4390+ dates_query += ' BETWEEN %s AND %s)'
4391+ args_list += (form[str(i)]['start'], form[str(i)]['stop'])
4392+ elif form[str(i)]['start']:
4393+ dates_query += ' > %s)'
4394+ args_list += (form[str(i)]['start'],)
4395+ else:
4396+ dates_query += ' < %s)'
4397+ args_list += (form[str(i)]['stop'],)
4398+ args_list += (self.date_from,)
4399+ self.cr.execute('''SELECT l.partner_id, SUM(l.debit-l.credit)
4400+ FROM account_move_line AS l, account_account, account_move am
4401+ WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)
4402+ AND (am.state IN %s)
4403+ AND (account_account.type IN %s)
4404+ AND (l.partner_id IN %s)
4405+ AND ((l.reconcile_id IS NULL)
4406+ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))
4407+ AND ''' + self.query + '''
4408+ AND account_account.active
4409+ AND ''' + dates_query + '''
4410+ AND (l.date <= %s)
4411+ GROUP BY l.partner_id''', args_list)
4412+ t = self.cr.fetchall()
4413+ d = {}
4414+ for i in t:
4415+ d[i[0]] = i[1]
4416+ history.append(d)
4417+
4418+ for partner in partners:
4419+ values = {}
4420+ ## If choise selection is in the future
4421+ if self.direction_selection == 'future':
4422+ # Query here is replaced by one query which gets the all the partners their 'before' value
4423+ before = False
4424+ if future_past.has_key(partner['id']):
4425+ before = [ future_past[partner['id']] ]
4426+ self.total_account[6] = self.total_account[6] + (before and before[0] or 0.0)
4427+ values['direction'] = before and before[0] or 0.0
4428+ elif self.direction_selection == 'past': # Changed this so people could in the future create new direction_selections
4429+ # Query here is replaced by one query which gets the all the partners their 'after' value
4430+ after = False
4431+ if future_past.has_key(partner['id']): # Making sure this partner actually was found by the query
4432+ after = [ future_past[partner['id']] ]
4433+
4434+ self.total_account[6] = self.total_account[6] + (after and after[0] or 0.0)
4435+ values['direction'] = after and after[0] or 0.0
4436+
4437+ for i in range(5):
4438+ during = False
4439+ if history[i].has_key(partner['id']):
4440+ during = [ history[i][partner['id']] ]
4441+ # Ajout du compteur
4442+ self.total_account[(i)] = self.total_account[(i)] + (during and during[0] or 0)
4443+ values[str(i)] = during and during[0] or 0.0
4444+ total = False
4445+ if totals.has_key( partner['id'] ):
4446+ total = [ totals[partner['id']] ]
4447+ values['total'] = total and total[0] or 0.0
4448+ ## Add for total
4449+ self.total_account[(i+1)] = self.total_account[(i+1)] + (total and total[0] or 0.0)
4450+ values['name'] = partner['name']
4451+
4452+ res.append(values)
4453+
4454+ total = 0.0
4455+ totals = {}
4456+ for r in res:
4457+ total += float(r['total'] or 0.0)
4458+ for i in range(5)+['direction']:
4459+ totals.setdefault(str(i), 0.0)
4460+ totals[str(i)] += float(r[str(i)] or 0.0)
4461+ return res
4462+
4463+ def _get_lines_with_out_partner(self, form):
4464+ res = []
4465+ move_state = ['draft','posted']
4466+ if self.target_move == 'posted':
4467+ move_state = ['posted']
4468+
4469+ ## mise a 0 du total
4470+ for i in range(7):
4471+ self.total_account.append(0)
4472+ totals = {}
4473+ self.cr.execute('SELECT SUM(l.debit-l.credit) \
4474+ FROM account_move_line AS l, account_account, account_move am \
4475+ WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\
4476+ AND (am.state IN %s)\
4477+ AND (l.partner_id IS NULL)\
4478+ AND (account_account.type IN %s)\
4479+ AND ((l.reconcile_id IS NULL) \
4480+ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
4481+ AND ' + self.query + '\
4482+ AND (l.date <= %s)\
4483+ AND account_account.active ',(tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from,))
4484+ t = self.cr.fetchall()
4485+ for i in t:
4486+ totals['Unknown Partner'] = i[0]
4487+ future_past = {}
4488+ if self.direction_selection == 'future':
4489+ self.cr.execute('SELECT SUM(l.debit-l.credit) \
4490+ FROM account_move_line AS l, account_account, account_move am\
4491+ WHERE (l.account_id=account_account.id) AND (l.move_id=am.id)\
4492+ AND (am.state IN %s)\
4493+ AND (l.partner_id IS NULL)\
4494+ AND (account_account.type IN %s)\
4495+ AND (COALESCE(l.date_maturity, l.date) < %s)\
4496+ AND ((l.reconcile_id IS NULL)\
4497+ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
4498+ AND '+ self.query + '\
4499+ AND account_account.active ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from))
4500+ t = self.cr.fetchall()
4501+ for i in t:
4502+ future_past['Unknown Partner'] = i[0]
4503+ elif self.direction_selection == 'past': # Using elif so people could extend without this breaking
4504+ self.cr.execute('SELECT SUM(l.debit-l.credit) \
4505+ FROM account_move_line AS l, account_account, account_move am \
4506+ WHERE (l.account_id=account_account.id) AND (l.move_id=am.id)\
4507+ AND (am.state IN %s)\
4508+ AND (l.partner_id IS NULL)\
4509+ AND (account_account.type IN %s)\
4510+ AND (COALESCE(l.date_maturity,l.date) > %s)\
4511+ AND ((l.reconcile_id IS NULL)\
4512+ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
4513+ AND '+ self.query + '\
4514+ AND account_account.active ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from))
4515+ t = self.cr.fetchall()
4516+ for i in t:
4517+ future_past['Unknown Partner'] = i[0]
4518+ history = []
4519+
4520+ for i in range(5):
4521+ args_list = (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from,)
4522+ dates_query = '(COALESCE(l.date_maturity,l.date)'
4523+ if form[str(i)]['start'] and form[str(i)]['stop']:
4524+ dates_query += ' BETWEEN %s AND %s)'
4525+ args_list += (form[str(i)]['start'], form[str(i)]['stop'])
4526+ elif form[str(i)]['start']:
4527+ dates_query += ' > %s)'
4528+ args_list += (form[str(i)]['start'],)
4529+ else:
4530+ dates_query += ' < %s)'
4531+ args_list += (form[str(i)]['stop'],)
4532+ args_list += (self.date_from,)
4533+ self.cr.execute('SELECT SUM(l.debit-l.credit)\
4534+ FROM account_move_line AS l, account_account, account_move am \
4535+ WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\
4536+ AND (am.state IN %s)\
4537+ AND (account_account.type IN %s)\
4538+ AND (l.partner_id IS NULL)\
4539+ AND ((l.reconcile_id IS NULL)\
4540+ OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
4541+ AND '+ self.query + '\
4542+ AND account_account.active\
4543+ AND ' + dates_query + '\
4544+ AND (l.date <= %s)\
4545+ GROUP BY l.partner_id', args_list)
4546+ t = self.cr.fetchall()
4547+ d = {}
4548+ for i in t:
4549+ d['Unknown Partner'] = i[0]
4550+ history.append(d)
4551+
4552+ values = {}
4553+ if self.direction_selection == 'future':
4554+ before = False
4555+ if future_past.has_key('Unknown Partner'):
4556+ before = [ future_past['Unknown Partner'] ]
4557+ self.total_account[6] = self.total_account[6] + (before and before[0] or 0.0)
4558+ values['direction'] = before and before[0] or 0.0
4559+ elif self.direction_selection == 'past':
4560+ after = False
4561+ if future_past.has_key('Unknown Partner'):
4562+ after = [ future_past['Unknown Partner'] ]
4563+ self.total_account[6] = self.total_account[6] + (after and after[0] or 0.0)
4564+ values['direction'] = after and after[0] or 0.0
4565+
4566+ for i in range(5):
4567+ during = False
4568+ if history[i].has_key('Unknown Partner'):
4569+ during = [ history[i]['Unknown Partner'] ]
4570+ self.total_account[(i)] = self.total_account[(i)] + (during and during[0] or 0)
4571+ values[str(i)] = during and during[0] or 0.0
4572+
4573+ total = False
4574+ if totals.has_key( 'Unknown Partner' ):
4575+ total = [ totals['Unknown Partner'] ]
4576+ values['total'] = total and total[0] or 0.0
4577+ ## Add for total
4578+ self.total_account[(i+1)] = self.total_account[(i+1)] + (total and total[0] or 0.0)
4579+ values['name'] = 'Unknown Partner'
4580+
4581+ if values['total']:
4582+ res.append(values)
4583+
4584+ total = 0.0
4585+ totals = {}
4586+ for r in res:
4587+ total += float(r['total'] or 0.0)
4588+ for i in range(5)+['direction']:
4589+ totals.setdefault(str(i), 0.0)
4590+ totals[str(i)] += float(r[str(i)] or 0.0)
4591+ return res
4592+
4593+ def _get_total(self,pos):
4594+ period = self.total_account[int(pos)]
4595+ return period or 0.0
4596+
4597+ def _get_direction(self,pos):
4598+ period = self.total_account[int(pos)]
4599+ return period or 0.0
4600+
4601+ def _get_for_period(self,pos):
4602+ period = self.total_account[int(pos)]
4603+ return period or 0.0
4604+
4605+ def _get_partners(self,data):
4606+ if data['form']['result_selection'] == 'customer':
4607+ return 'Receivable Accounts'
4608+ elif data['form']['result_selection'] == 'supplier':
4609+ return 'Payable Accounts'
4610+ elif data['form']['result_selection'] == 'customer_supplier':
4611+ return 'Receivable and Payable Accounts'
4612+ return ''
4613+
4614+report_sxw.report_sxw('report.v6.account.aged_trial_balance', 'res.partner',
4615+ 'addons/account_report_aged_partner_balance_v6/report/account_aged_partner_balance.rml',parser=aged_trial_report, header=False)
4616+
4617+
4618+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4619
4620=== added file 'account_report_aged_partner_balance_v6/report/account_aged_partner_balance.rml'
4621--- account_report_aged_partner_balance_v6/report/account_aged_partner_balance.rml 1970-01-01 00:00:00 +0000
4622+++ account_report_aged_partner_balance_v6/report/account_aged_partner_balance.rml 2012-06-28 13:21:29 +0000
4623@@ -0,0 +1,290 @@
4624+<?xml version="1.0"?>
4625+<document filename="Aged Trial Balance.pdf">
4626+ <template pageSize="(842.0,595.0)" title="Aged Trial Balance" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
4627+<pageTemplate>
4628+ <frame id="first" x1="28.0" y1="28.0" width="786" height="525"/>
4629+ <pageGraphics>
4630+ <fill color="black"/>
4631+ <stroke color="black"/>
4632+ <drawString x="25" y="555"> [[ formatLang(time.strftime("%Y-%m-%d"), date=True) ]] [[ time.strftime("%H:%M") ]]</drawString>
4633+ <drawString x="382" y="555">[[ company.partner_id.name ]]</drawString>
4634+ <stroke color="#000000"/>
4635+ <lines>25 550 818 550</lines>
4636+ </pageGraphics>
4637+ </pageTemplate>
4638+ </template>
4639+ <stylesheet>
4640+ <blockTableStyle id="Standard_Outline">
4641+ <blockAlignment value="LEFT"/>
4642+ <blockValign value="TOP"/>
4643+ </blockTableStyle>
4644+ <blockTableStyle id="Table1">
4645+ <blockAlignment value="LEFT"/>
4646+ <blockValign value="TOP"/>
4647+ <blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
4648+ <blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
4649+ <blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
4650+ <blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
4651+ <blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
4652+ <blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
4653+ </blockTableStyle>
4654+ <blockTableStyle id="Table_header_Content">
4655+ <blockAlignment value="LEFT"/>
4656+ <blockValign value="TOP"/>
4657+ </blockTableStyle>
4658+ <blockTableStyle id="Tableau1">
4659+ <blockAlignment value="LEFT"/>
4660+ <blockValign value="TOP"/>
4661+ <lineStyle kind="GRID" colorName="black"/>
4662+ </blockTableStyle>
4663+ <blockTableStyle id="Table2">
4664+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
4665+ <lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
4666+ <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
4667+
4668+ <blockValign value="TOP"/>
4669+ <blockAlignment value="LEFT" start="2,1" stop="-1,-1"/>
4670+ </blockTableStyle>
4671+ <blockTableStyle id="Table8">
4672+ <blockAlignment value="LEFT"/>
4673+ <blockValign value="TOP"/>
4674+ <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="-1,-1"/>
4675+ <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="-1,-1"/>
4676+ <lineStyle kind="LINEAFTER" colorName="#cccccc" start="0,0" stop="-1,-1"/>
4677+ <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,-1"/>
4678+ </blockTableStyle>
4679+
4680+ <blockTableStyle id="Tableau3">
4681+ <blockAlignment value="LEFT"/>
4682+ <blockValign value="TOP"/>
4683+ <lineStyle kind="GRID" colorName="black"/>
4684+ </blockTableStyle>
4685+ <initialize>
4686+ <paraStyle name="all" alignment="justify"/>
4687+ </initialize>
4688+ <paraStyle name="P1" fontName="Helvetica" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
4689+ <paraStyle name="P2" fontName="Helvetica" fontSize="8.3" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
4690+ <paraStyle name="P2_content" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
4691+ <paraStyle name="Total" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
4692+ <paraStyle name="Total_right" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
4693+ <paraStyle name="P3" fontName="Helvetica" fontSize="15.0" leading="20" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
4694+ <paraStyle name="P4" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
4695+ <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
4696+ <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
4697+ <paraStyle name="P7" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
4698+ <paraStyle name="P8" fontName="Helvetica" fontSize="8.3" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
4699+ <paraStyle name="content" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
4700+ <paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
4701+ <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
4702+ <paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
4703+ <paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="0.0"/>
4704+ <paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="0.0"/>
4705+ <paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
4706+ <paraStyle name="P10" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
4707+ <paraStyle name="Standard" fontName="Helvetica"/>
4708+ <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
4709+ <paraStyle name="Heading" fontName="Helvetica" fontSize="8.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
4710+ <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
4711+ <paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
4712+ <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
4713+ <paraStyle name="Caption" fontName="Helvetica" fontSize="8.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
4714+ <paraStyle name="Index" fontName="Helvetica"/>
4715+ <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
4716+ <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
4717+ <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
4718+ <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
4719+ <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
4720+ <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
4721+ <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
4722+ <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
4723+ <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
4724+ <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
4725+ <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
4726+ <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
4727+ <paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
4728+ <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
4729+ <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
4730+ <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
4731+
4732+ </stylesheet>
4733+ <story>
4734+
4735+ <blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content">
4736+ <tr>
4737+ <td><para style="terp_header"><font color="white"> </font></para>
4738+ </td>
4739+ <td><para style="terp_header_Centre">Aged Trial Balance</para></td>
4740+ <td><para style="terp_header"><font color="white"> </font></para></td>
4741+ </tr>
4742+ </blockTable>
4743+ <blockTable colWidths="110.0,110.0,110.0,110.0,128.0,93.0,110.0" style="Table8">
4744+ <tr>
4745+ <td>
4746+ <para style="terp_tblheader_General_Centre">Chart of Account</para>
4747+ </td>
4748+ <td>
4749+ <para style="terp_tblheader_General_Centre">Fiscal Year</para>
4750+ </td>
4751+ <td>
4752+ <para style="terp_tblheader_General_Centre">Start Date</para>
4753+ </td>
4754+ <td>
4755+ <para style="terp_tblheader_General_Centre">Period Length(days)</para>
4756+ </td>
4757+ <td>
4758+ <para style="terp_tblheader_General_Centre">Partner's</para>
4759+ </td>
4760+ <td>
4761+ <para style="terp_tblheader_General_Centre">Analysis Direction</para>
4762+ </td>
4763+ <td>
4764+ <para style="terp_tblheader_General_Centre">Target Moves</para>
4765+ </td>
4766+ </tr>
4767+ <tr>
4768+ <td>
4769+ <para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para>
4770+ </td>
4771+ <td>
4772+ <para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
4773+ </td>
4774+ <td>
4775+ <para style="terp_default_Centre_8">[[ formatLang(data['form']['date_from'],date=True) ]]</para>
4776+ </td>
4777+ <td>
4778+ <para style="terp_default_Centre_8">[[ data['form']['period_length'] ]]</para>
4779+ </td>
4780+ <td>
4781+ <para style="terp_default_Centre_8">[[ get_partners(data) ]]</para>
4782+ </td>
4783+ <td>
4784+ <para style="terp_default_Centre_8">[[ data['form']['direction_selection'] ]]</para>
4785+ </td>
4786+ <td>
4787+ <para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para>
4788+ </td>
4789+ </tr>
4790+ </blockTable>
4791+ <para style="P9">
4792+ <font color="white"> </font>
4793+ </para>
4794+ <blockTable colWidths="135.0,90.0,90.0,90.0,90.0,90.0,90.0,90.0" style="Table2" repeatRows="1">
4795+ <tr>
4796+ <td>
4797+ <para style="terp_tblheader_Details">Partners</para>
4798+ </td>
4799+ <td>
4800+ <para style="terp_tblheader_Details_Right">[[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]]</para>
4801+ </td>
4802+ <td>
4803+ <para style="terp_tblheader_Details_Right">[[ data['form']['4']['name'] ]]</para>
4804+ </td>
4805+ <td>
4806+ <para style="terp_tblheader_Details_Right">[[ data['form']['3']['name'] ]]</para>
4807+ </td>
4808+ <td>
4809+ <para style="terp_tblheader_Details_Right">[[ data['form']['2']['name'] ]]</para>
4810+ </td>
4811+ <td>
4812+ <para style="terp_tblheader_Details_Right">[[ data['form']['1']['name'] ]]</para>
4813+ </td>
4814+ <td>
4815+ <para style="terp_tblheader_Details_Right">[[ data['form']['0']['name'] ]]</para>
4816+ </td>
4817+ <td>
4818+ <para style="terp_tblheader_Details_Right">Total</para>
4819+ </td>
4820+ </tr>
4821+
4822+ <tr>
4823+
4824+ <td>
4825+ <para style="P3"> <font color="white">[[ (get_lines(data['form']), 'partner') == False or removeParentNode('para') ]]</font></para>
4826+ <para style="P3"> <font color="white">[[ (get_lines_with_out_partner(data['form']), 'not_partner') == False or removeParentNode('para') ]]</font></para>
4827+ <para style="Total">Account Total</para>
4828+ </td>
4829+ <td>
4830+ <para style="Total_right">[[ formatLang(get_direction('6')) ]] [[ company.currency_id.code ]]</para>
4831+ </td>
4832+ <td>
4833+ <para style="Total_right">[[ formatLang(get_for_period('4')) ]] [[ company.currency_id.code ]]</para>
4834+ </td>
4835+ <td>
4836+ <para style="Total_right">[[ formatLang(get_for_period('3')) ]] [[ company.currency_id.code ]]</para>
4837+ </td>
4838+ <td>
4839+ <para style="Total_right">[[ formatLang(get_for_period('2')) ]] [[ company.currency_id.code ]]</para>
4840+ </td>
4841+ <td>
4842+ <para style="Total_right">[[ formatLang(get_for_period('1')) ]] [[ company.currency_id.code ]]</para>
4843+ </td>
4844+ <td>
4845+ <para style="Total_right">[[ formatLang(get_for_period('0')) ]] [[ company.currency_id.code ]]</para>
4846+ </td>
4847+ <td>
4848+ <para style="Total_right">[[ formatLang(get_total('5')) ]] [[ company.currency_id.code ]]</para>
4849+ </td>
4850+ </tr>
4851+
4852+ <tr>
4853+ <td>
4854+ <para style="P3">[[ repeatIn(get_lines(data['form']), 'partner') ]]</para>
4855+ <para style="P2_content">[[ partner['name'] ]]</para>
4856+ </td>
4857+ <td>
4858+ <para style="content">[[ formatLang(partner['direction']) ]] [[ company.currency_id.code ]]</para>
4859+ </td>
4860+ <td>
4861+ <para style="content">[[ formatLang(partner['4'])]] [[ company.currency_id.code ]]</para>
4862+ </td>
4863+ <td>
4864+ <para style="content">[[ formatLang(partner['3'])]] [[ company.currency_id.code ]]</para>
4865+ </td>
4866+ <td>
4867+ <para style="content">[[ formatLang(partner['2']) ]] [[ company.currency_id.code ]]</para>
4868+ </td>
4869+ <td>
4870+ <para style="content">[[ formatLang(partner['1']) ]] [[ company.currency_id.code ]]</para>
4871+ </td>
4872+ <td>
4873+ <para style="content">[[ formatLang(partner['0']) ]] [[ company.currency_id.code ]]</para>
4874+ </td>
4875+ <td>
4876+ <para style="content">[[ formatLang(partner['total']) ]] [[ company.currency_id.code ]]</para>
4877+ </td>
4878+ </tr>
4879+ <tr>
4880+ <td>
4881+ <para style="P3">[[ repeatIn(get_lines_with_out_partner(data['form']), 'not_partner') ]]</para>
4882+ <para style="P2_content">[[ not_partner['name'] ]]</para>
4883+ </td>
4884+ <td>
4885+ <para style="content">[[ formatLang(not_partner['direction']) ]] [[ company.currency_id.code ]]</para>
4886+ </td>
4887+ <td>
4888+ <para style="content">[[ formatLang(not_partner['4'])]] [[ company.currency_id.code ]]</para>
4889+ </td>
4890+ <td>
4891+ <para style="content">[[ formatLang(not_partner['3'])]] [[ company.currency_id.code ]]</para>
4892+ </td>
4893+ <td>
4894+ <para style="content">[[ formatLang(not_partner['2']) ]] [[ company.currency_id.code ]]</para>
4895+ </td>
4896+ <td>
4897+ <para style="content">[[ formatLang(not_partner['1']) ]] [[ company.currency_id.code ]]</para>
4898+ </td>
4899+ <td>
4900+ <para style="content">[[ formatLang(not_partner['0']) ]] [[ company.currency_id.code ]]</para>
4901+ </td>
4902+ <td>
4903+ <para style="content">[[ formatLang(not_partner['total']) ]] [[ company.currency_id.code ]]</para>
4904+ </td>
4905+ </tr>
4906+ </blockTable>
4907+
4908+ <para style="P9">
4909+ <font color="white"> </font>
4910+ </para>
4911+ </story>
4912+</document>
4913+
4914
4915=== added file 'account_report_aged_partner_balance_v6/report/common_report_header.py'
4916--- account_report_aged_partner_balance_v6/report/common_report_header.py 1970-01-01 00:00:00 +0000
4917+++ account_report_aged_partner_balance_v6/report/common_report_header.py 2012-06-28 13:21:29 +0000
4918@@ -0,0 +1,143 @@
4919+# -*- coding: utf-8 -*-
4920+##############################################################################
4921+#
4922+# OpenERP, Open Source Management Solution
4923+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
4924+#
4925+# This program is free software: you can redistribute it and/or modify
4926+# it under the terms of the GNU Affero General Public License as
4927+# published by the Free Software Foundation, either version 3 of the
4928+# License, or (at your option) any later version.
4929+#
4930+# This program is distributed in the hope that it will be useful,
4931+# but WITHOUT ANY WARRANTY; without even the implied warranty of
4932+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4933+# GNU Affero General Public License for more details.
4934+#
4935+# You should have received a copy of the GNU Affero General Public License
4936+# along with this program. If not, see <http://www.gnu.org/licenses/>.
4937+#
4938+##############################################################################
4939+
4940+import pooler
4941+from tools.translate import _
4942+
4943+class common_report_header(object):
4944+
4945+ def _sum_debit(self, period_id=False, journal_id=False):
4946+ if journal_id and isinstance(journal_id, int):
4947+ journal_id = [journal_id]
4948+ if period_id and isinstance(period_id, int):
4949+ period_id = [period_id]
4950+ if not journal_id:
4951+ journal_id = self.journal_ids
4952+ if not period_id:
4953+ period_id = self.period_ids
4954+ if not (period_id and journal_id):
4955+ return 0.0
4956+ self.cr.execute('SELECT SUM(debit) FROM account_move_line l '
4957+ 'WHERE period_id IN %s AND journal_id IN %s ' + self.query_get_clause + ' ',
4958+ (tuple(period_id), tuple(journal_id)))
4959+ return self.cr.fetchone()[0] or 0.0
4960+
4961+ def _sum_credit(self, period_id=False, journal_id=False):
4962+ if journal_id and isinstance(journal_id, int):
4963+ journal_id = [journal_id]
4964+ if period_id and isinstance(period_id, int):
4965+ period_id = [period_id]
4966+ if not journal_id:
4967+ journal_id = self.journal_ids
4968+ if not period_id:
4969+ period_id = self.period_ids
4970+ if not (period_id and journal_id):
4971+ return 0.0
4972+ self.cr.execute('SELECT SUM(credit) FROM account_move_line l '
4973+ 'WHERE period_id IN %s AND journal_id IN %s '+ self.query_get_clause+'',
4974+ (tuple(period_id), tuple(journal_id)))
4975+ return self.cr.fetchone()[0] or 0.0
4976+
4977+ def _get_start_date(self, data):
4978+ if data.get('form', False) and data['form'].get('date_from', False):
4979+ return data['form']['date_from']
4980+ return ''
4981+
4982+ def _get_target_move(self, data):
4983+ if data.get('form', False) and data['form'].get('target_move', False):
4984+ if data['form']['target_move'] == 'all':
4985+ return 'All Entries'
4986+ return 'All Posted Entries'
4987+ return ''
4988+
4989+ def _get_end_date(self, data):
4990+ if data.get('form', False) and data['form'].get('date_to', False):
4991+ return data['form']['date_to']
4992+ return ''
4993+
4994+ def get_start_period(self, data):
4995+ if data.get('form', False) and data['form'].get('period_from', False):
4996+ return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,data['form']['period_from']).name
4997+ return ''
4998+
4999+ def get_end_period(self, data):
5000+ if data.get('form', False) and data['form'].get('period_to', False):
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: