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
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2012-06-28 13:21:29 +0000
@@ -0,0 +1,1 @@
1*.pyc
02
=== renamed file '.bzrignore' => '.bzrignore.moved'
=== added directory 'account_analytic_package'
=== added file 'account_analytic_package/__init__.py'
--- account_analytic_package/__init__.py 1970-01-01 00:00:00 +0000
+++ account_analytic_package/__init__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,23 @@
1##############################################################################
2#
3# OpenERP, Open Source Management Solution
4# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Affero General Public License as
8# published by the Free Software Foundation, either version 3 of the
9# License, or (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Affero General Public License for more details.
15#
16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#
19##############################################################################
20
21import account_analytic_package
22# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
23
024
=== added file 'account_analytic_package/__terp__.py'
--- account_analytic_package/__terp__.py 1970-01-01 00:00:00 +0000
+++ account_analytic_package/__terp__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,43 @@
1##############################################################################
2#
3# OpenERP, Open Source Management Solution
4# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Affero General Public License as
8# published by the Free Software Foundation, either version 3 of the
9# License, or (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Affero General Public License for more details.
15#
16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#
19##############################################################################
20
21{
22 "name" : "Account Analytic Package - To configure Analytic Account for product packages",
23 "description": """The Module allows to configure analytic account for product packages.
24 Views for total and monthly product packages weight, Amount analysis.""",
25 "version" : "1.0",
26 "author" : "Tiny",
27 "category" : "Generic Modules/Accounting",
28 "module": "",
29 "website": "http://www.openerp.com",
30 "depends" : ["account","product","crm"],
31 "init_xml" : [],
32 "update_xml" : [
33 "security/ir.model.access.csv",
34 "account_analytic_package_view.xml"
35 ],
36 "demo_xml" : [],
37 "active": False,
38 "installable": True,
39
40'certificate': '00181681485805',
41}
42# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
43
044
=== added file 'account_analytic_package/account_analytic_package.py'
--- account_analytic_package/account_analytic_package.py 1970-01-01 00:00:00 +0000
+++ account_analytic_package/account_analytic_package.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,160 @@
1##############################################################################
2#
3# OpenERP, Open Source Management Solution
4# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
5#
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU Affero General Public License as
8# published by the Free Software Foundation, either version 3 of the
9# License, or (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU Affero General Public License for more details.
15#
16# You should have received a copy of the GNU Affero General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
18#
19##############################################################################
20
21import operator
22from osv import osv, fields
23
24
25class account_analytic_account(osv.osv):
26 _inherit = "account.analytic.account"
27 _columns = {
28 'package_ok': fields.boolean('Used in Package'),
29 }
30account_analytic_account()
31
32
33class product_product(osv.osv):
34 _inherit = "product.product"
35 _columns = {
36 'package_weight': fields.float('Package Weight', digits=(16,2)),
37 }
38 _defaults = {
39 'package_weight': lambda *args: 0.0
40 }
41product_product()
42
43class crm_case_section(osv.osv):
44 _inherit = "crm.case.section"
45 _columns = {
46 'package_product_id': fields.many2one('product.product', 'Package Product'),
47 'analytic_account_id': fields.many2one('account.analytic.account', 'Main Analytic Account'),
48 'analytic_journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'),
49 }
50crm_case_section()
51
52class crm_case(osv.osv):
53 _inherit = "crm.case"
54 def case_open(self, cr, uid, ids, *args):
55 res = super(crm_case, self).case_open(cr, uid, ids, *args)
56 for case in self.browse(cr,uid, ids):
57 section = case.section_id
58 if section.package_product_id and section.analytic_account_id and section.analytic_journal_id:
59 partner = self.pool.get('res.users').browse(cr, uid, uid).address_id.partner_id.id
60 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])])
61 if not aids:
62 raise osv.except_osv('You can not open this case !', 'No valid analytic account defined for your user.\nPlease contact the administrator.')
63 self.pool.get('account.analytic.line').create(cr, uid, {
64 'name': case.name,
65 'amount': 0.0,
66 'unit_amount': 1,
67 'product_uom_id': section.package_product_id.uom_id.id,
68 'product_id': section.package_product_id.id,
69 'account_id': aids[0],
70 'general_account_id': section.package_product_id.property_account_income.id or section.package_product_id.categ_id.property_account_income_categ.id,
71 'journal_id': section.analytic_journal_id.id,
72 'user_id': uid,
73 'ref': 'CASE'+str(case.id)
74 })
75 return res
76crm_case()
77
78
79class account_analytic_line_package(osv.osv):
80 _name = "account.analytic.line.package"
81 _auto = False
82 _order = 'date desc'
83 def init(self, cr):
84 cr.execute("""
85 CREATE OR REPLACE VIEW account_analytic_line_package AS (
86 select
87 l.id,
88 l.name,
89 l.date,
90 a.partner_id,
91 a.id as account_id,
92 l.product_id,
93 p.package_weight as unit_weight,
94 p.package_weight*l.unit_amount as total_weight,
95 l.unit_amount
96 from
97 account_analytic_line l
98 left join
99 account_analytic_account a on (l.account_id=a.id)
100 left join
101 product_product p on (p.id=l.product_id)
102 where
103 l.product_id is not null and
104 p.package_weight<>0 and
105 a.package_ok
106 )
107 """)
108 _columns = {
109 'name': fields.char('Name', size=128, readonly=True, select=1),
110 'date': fields.date('Date', readonly=True, select=1),
111 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
112 'account_id': fields.many2one('account.analytic.account', 'Account', readonly=True),
113 'product_id': fields.many2one('product.product', 'Product', select=2, readonly=True),
114 'unit_amount': fields.float('Quantity', readonly=True),
115 'unit_weight': fields.float('Unit Weight', readonly=True),
116 'total_weight': fields.float('Total Weight', readonly=True),
117 }
118account_analytic_line_package()
119
120class account_analytic_line_package_month(osv.osv):
121 _name = "account.analytic.line.package.month"
122 _auto = False
123 def init(self, cr):
124 cr.execute("""
125 CREATE OR REPLACE VIEW account_analytic_line_package_month AS (
126 select
127 min(l.id) as id,
128 to_char(l.date, 'YYYY-MM-01') as name,
129 a.partner_id,
130 l.product_id,
131 sum(p.package_weight*l.unit_amount) as total_weight,
132 sum(case when p.package_weight>0 then p.package_weight*l.unit_amount else 0 end) as total_activity,
133 sum(case when p.package_weight<0 then -p.package_weight*l.unit_amount else 0 end) as total_service
134 from
135 account_analytic_line l
136 left join
137 account_analytic_account a on (l.account_id=a.id)
138 left join
139 product_product p on (p.id=l.product_id)
140 where
141 l.product_id is not null and
142 p.package_weight<>0 and
143 a.package_ok
144 group by
145 l.product_id,
146 a.partner_id,
147 to_char(l.date, 'YYYY-MM-01')
148 )
149 """)
150 _columns ={
151 'name': fields.date('Date', readonly=True, select=1),
152 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
153 'product_id': fields.many2one('product.product', 'Product', select=2, readonly=True),
154 'total_weight': fields.float('Total Weight', readonly=True),
155 'total_activity': fields.float('Total Activity', readonly=True),
156 'total_service': fields.float('Total Service', readonly=True),
157 }
158account_analytic_line_package_month()
159# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
160
0161
=== added file 'account_analytic_package/account_analytic_package_view.xml'
--- account_analytic_package/account_analytic_package_view.xml 1970-01-01 00:00:00 +0000
+++ account_analytic_package/account_analytic_package_view.xml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,235 @@
1<?xml version="1.0" ?>
2<openerp>
3 <data>
4
5 <record model="ir.ui.view" id="view_account_analytic_package">
6 <field name="name">account.analytic.account.package.form</field>
7 <field name="model">account.analytic.account</field>
8 <field name="inherit_id" ref="account.view_account_analytic_account_form" />
9 <field name="type">form</field>
10 <field name="arch" type="xml">
11 <notebook position="inside">
12 <page string="Package Weight">
13 <field name="package_ok"/>
14 </page>
15 </notebook>
16 </field>
17 </record>
18
19
20 <record model="ir.ui.view" id="view_crm_section_form_package">
21 <field name="name">crm.case.section.package.form</field>
22 <field name="model">crm.case.section</field>
23 <field name="inherit_id" ref="crm.crm_case_section_view_form" />
24 <field name="type">form</field>
25 <field name="arch" type="xml">
26 <notebook position="inside">
27 <page string="Package Weight">
28 <separator string="Analytic Package" colspan="4"/>
29 <field name="package_product_id" colspan="4" />
30 <field name="analytic_journal_id" colspan="4" />
31 <field name="analytic_account_id" colspan="4" />
32 <label string="The parent account of all package account" colspan="4"/>
33 </page>
34 </notebook>
35 </field>
36 </record>
37
38
39 <record model="ir.ui.view" id="view_product_form_package">
40 <field name="name">product.normal.package.form</field>
41 <field name="model">product.product</field>
42 <field name="inherit_id" ref="product.product_normal_form_view" />
43 <field name="type">form</field>
44 <field name="arch" type="xml">
45 <notebook position="inside">
46 <page string="Package Units">
47 <separator string="Analytic Package" colspan="4"/>
48 <field name="package_weight" colspan="4" />
49 <label string="Zero if not part of a package" colspan="4"/>
50 <label string="&lt;0 if it's a service unit" colspan="4"/>
51 <label string="&gt;0 if it's a activity unit" colspan="4"/>
52 </page>
53 </notebook>
54 </field>
55 </record>
56
57 <record model="ir.ui.view" id="view_account_analytic_line_package_tree_simplified">
58 <field name="name">account.analytic.line.package.simplified.tree</field>
59 <field name="model">account.analytic.line.package</field>
60 <field name="type">tree</field>
61 <field name="priority">32</field>
62 <field name="arch" type="xml">
63 <tree string="Service &amp; Activity Units">
64 <field name="date"/>
65 <field name="name"/>
66 <field name="product_id"/>
67 <field name="unit_amount"/>
68 <field name="unit_weight"/>
69 <field name="total_weight" sum="Units"/>
70 </tree>
71 </field>
72 </record>
73 <record model="ir.actions.act_window" id="action_account_analytic_line_package_tree_simplified">
74 <field name="name">Service &amp; Activity Units (no partner and account)</field>
75 <field name="res_model">account.analytic.line.package</field>
76 <field name="view_type">form</field>
77 <field name="view_mode">tree</field>
78 <field name="view_id" ref="view_account_analytic_line_package_tree_simplified"/>
79 </record>
80
81
82 <record model="ir.ui.view" id="view_account_analytic_line_package_form">
83 <field name="name">account.analytic.line.package.form</field>
84 <field name="model">account.analytic.line.package</field>
85 <field name="type">form</field>
86 <field name="arch" type="xml">
87 <form string="Service &amp; Activity Units">
88 <field name="date" select="1"/>
89 <field name="name" select="2"/>
90 <field name="partner_id" select="1"/>
91 <field name="account_id" select="1"/>
92 <field name="product_id" select="2"/>
93 <field name="unit_amount"/>
94 <field name="unit_weight"/>
95 <field name="total_weight" sum="Units"/>
96 </form>
97 </field>
98 </record>
99 <record model="ir.ui.view" id="view_account_analytic_line_package_tree">
100 <field name="name">account.analytic.line.package.tree</field>
101 <field name="model">account.analytic.line.package</field>
102 <field name="type">tree</field>
103 <field name="arch" type="xml">
104 <tree string="Service &amp; Activity Units">
105 <field name="date"/>
106 <field name="name"/>
107 <field name="partner_id"/>
108 <field name="account_id"/>
109 <field name="product_id"/>
110 <field name="unit_amount"/>
111 <field name="unit_weight"/>
112 <field name="total_weight" sum="Units"/>
113 </tree>
114 </field>
115 </record>
116 <record model="ir.actions.act_window" id="action_account_analytic_line_package_tree">
117 <field name="name">Service &amp; Activity Units</field>
118 <field name="res_model">account.analytic.line.package</field>
119 <field name="view_type">form</field>
120 <field name="view_mode">tree</field>
121 <field name="view_id" ref="view_account_analytic_line_package_tree"/>
122 </record>
123 <menuitem name="Packages" id="menu_account_analytic_line_package" parent="account.menu_finance_reporting"/>
124 <menuitem name="Service &amp; Activity Units" parent="menu_account_analytic_line_package"
125 id="menu_account_analytic_line_package_tree"
126 action="action_account_analytic_line_package_tree"/>
127
128 <record model="ir.actions.act_window" id="action_account_analytic_line_package_service_tree">
129 <field name="name">Service Units</field>
130 <field name="res_model">account.analytic.line.package</field>
131 <field name="view_type">form</field>
132 <field name="view_mode">tree</field>
133 <field name="domain">[('total_weight','&lt;=',0.0)]</field>
134 <field name="view_id" ref="view_account_analytic_line_package_tree"/>
135 </record>
136 <menuitem parent="menu_account_analytic_line_package_tree"
137 id="menu_account_analytic_line_package_service_tree"
138 action="action_account_analytic_line_package_service_tree"/>
139 <record model="ir.actions.act_window" id="action_account_analytic_line_package_activity_tree">
140 <field name="name">Activity Units</field>
141 <field name="res_model">account.analytic.line.package</field>
142 <field name="view_type">form</field>
143 <field name="view_mode">tree</field>
144 <field name="domain">[('total_weight','&gt;=',0.0)]</field>
145 <field name="view_id" ref="view_account_analytic_line_package_tree"/>
146 </record>
147 <menuitem parent="menu_account_analytic_line_package_tree"
148 id="menu_account_analytic_line_package_activity_tree"
149 action="action_account_analytic_line_package_activity_tree"/>
150
151
152 <record model="ir.ui.view" id="view_account_analytic_line_package_month_graph">
153 <field name="name">account.analytic.line.package.month.graph</field>
154 <field name="model">account.analytic.line.package.month</field>
155 <field name="type">graph</field>
156 <field name="arch" type="xml">
157 <graph string="Analytic Package" type="bar">
158 <field name="name"/>
159 <field name="total_activity" operator="+"/>
160 <field name="total_service" operator="+"/>
161 </graph>
162 </field>
163 </record>
164 <record model="ir.ui.view" id="view_account_analytic_line_package_month_form">
165 <field name="name">account.analytic.line.package.month.form</field>
166 <field name="model">account.analytic.line.package.month</field>
167 <field name="type">form</field>
168 <field name="arch" type="xml">
169 <form string="Analytic Package">
170 <field name="name" select="1"/>
171 <field name="partner_id" select="1"/>
172 <field name="product_id" select="2"/>
173 <field name="total_weight" sum="Signed Units" select="2"/>
174 <field name="total_activity" sum="Activity Units" select="2"/>
175 <field name="total_service" sum="Service Units" select="2"/>
176 </form>
177 </field>
178 </record>
179 <record model="ir.ui.view" id="view_account_analytic_line_package_month_tree">
180 <field name="name">account.analytic.line.package.month.tree</field>
181 <field name="model">account.analytic.line.package.month</field>
182 <field name="type">tree</field>
183 <field name="arch" type="xml">
184 <tree string="Analytic Package">
185 <field name="name"/>
186 <field name="partner_id"/>
187 <field name="product_id"/>
188 <field name="total_weight" sum="Signed Units"/>
189 <field name="total_activity" sum="Activity Units"/>
190 <field name="total_service" sum="Service Units"/>
191 </tree>
192 </field>
193 </record>
194 <record model="ir.actions.act_window" id="action_account_analytic_line_package_month_tree">
195 <field name="name">Monthly Services &amp; Activity Units</field>
196 <field name="res_model">account.analytic.line.package.month</field>
197 <field name="view_type">form</field>
198 <field name="view_mode">graph,tree</field>
199 <field name="view_id" eval="False"/>
200 </record>
201 <menuitem parent="menu_account_analytic_line_package"
202 id="menu_account_analytic_line_package_month_tree"
203 action="action_account_analytic_line_package_month_tree"/>
204
205 <record model="ir.ui.view" id="package_product_tree">
206 <field name="name">Products List</field>
207 <field name="model">product.product</field>
208 <field name="type">tree</field>
209 <field name="priority">64</field>
210 <field name="arch" type="xml">
211 <tree string="Products Units" link="0">
212 <field name="name"/>
213 <field name="package_weight"/>
214 </tree>
215 </field>
216 </record>
217 <record model="ir.actions.act_window" id="action_package_product_tree">
218 <field name="name">Products Units</field>
219 <field name="res_model">product.product</field>
220 <field name="view_type">form</field>
221 <field name="view_mode">tree</field>
222 <field name="view_id" eval="package_product_tree"/>
223 <field name="domain">[('package_weight','&lt;&gt;',0)]</field>
224 </record>
225 <menuitem parent="menu_account_analytic_line_package"
226 id="menu_action_package_product_tree"
227 action="action_package_product_tree"/>
228
229
230
231
232
233
234 </data>
235</openerp>
0236
=== added directory 'account_analytic_package/i18n'
=== added file 'account_analytic_package/i18n/account_analytic_package.pot'
--- account_analytic_package/i18n/account_analytic_package.pot 1970-01-01 00:00:00 +0000
+++ account_analytic_package/i18n/account_analytic_package.pot 2012-06-28 13:21:29 +0000
@@ -0,0 +1,220 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * account_analytic_package
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.6\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2009-11-24 12:16:03+0000\n"
10"PO-Revision-Date: 2009-11-24 12:16:03+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: account_analytic_package
19#: constraint:ir.model:0
20msgid "The Object name must start with x_ and not contain any special character !"
21msgstr ""
22
23#. module: account_analytic_package
24#: view:account.analytic.line.package.month:0
25msgid "Signed Units"
26msgstr ""
27
28#. module: account_analytic_package
29#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package
30msgid "account.analytic.line.package"
31msgstr ""
32
33#. module: account_analytic_package
34#: constraint:ir.ui.view:0
35msgid "Invalid XML for View Architecture!"
36msgstr ""
37
38#. module: account_analytic_package
39#: view:account.analytic.account:0
40#: view:crm.case.section:0
41#: field:product.product,package_weight:0
42msgid "Package Weight"
43msgstr ""
44
45#. module: account_analytic_package
46#: view:account.analytic.line.package:0
47#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree
48#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_tree
49msgid "Service & Activity Units"
50msgstr ""
51
52#. module: account_analytic_package
53#: constraint:ir.actions.act_window:0
54msgid "Invalid model name in the action definition."
55msgstr ""
56
57#. module: account_analytic_package
58#: view:account.analytic.line.package:0
59msgid "Units"
60msgstr ""
61
62#. module: account_analytic_package
63#: view:product.product:0
64msgid "<0 if it's a service unit"
65msgstr ""
66
67#. module: account_analytic_package
68#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree_simplified
69msgid "Service & Activity Units (no partner and account)"
70msgstr ""
71
72#. module: account_analytic_package
73#: field:account.analytic.line.package,product_id:0
74#: field:account.analytic.line.package.month,product_id:0
75msgid "Product"
76msgstr ""
77
78#. module: account_analytic_package
79#: field:crm.case.section,analytic_journal_id:0
80msgid "Analytic Journal"
81msgstr ""
82
83#. module: account_analytic_package
84#: view:account.analytic.line.package.month:0
85#: view:crm.case.section:0
86#: view:product.product:0
87msgid "Analytic Package"
88msgstr ""
89
90#. module: account_analytic_package
91#: view:product.product:0
92msgid "Zero if not part of a package"
93msgstr ""
94
95#. module: account_analytic_package
96#: field:account.analytic.line.package.month,total_service:0
97msgid "Total Service"
98msgstr ""
99
100#. module: account_analytic_package
101#: field:account.analytic.line.package,unit_weight:0
102msgid "Unit Weight"
103msgstr ""
104
105#. module: account_analytic_package
106#: view:product.product:0
107msgid "Package Units"
108msgstr ""
109
110#. module: account_analytic_package
111#: field:account.analytic.line.package,date:0
112#: field:account.analytic.line.package.month,name:0
113msgid "Date"
114msgstr ""
115
116#. module: account_analytic_package
117#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package
118msgid "Packages"
119msgstr ""
120
121#. module: account_analytic_package
122#: view:account.analytic.line.package.month:0
123#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_service_tree
124#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_service_tree
125msgid "Service Units"
126msgstr ""
127
128#. module: account_analytic_package
129#: field:account.analytic.line.package,total_weight:0
130#: field:account.analytic.line.package.month,total_weight:0
131msgid "Total Weight"
132msgstr ""
133
134#. module: account_analytic_package
135#: model:ir.actions.act_window,name:account_analytic_package.action_package_product_tree
136#: model:ir.ui.menu,name:account_analytic_package.menu_action_package_product_tree
137#: view:product.product:0
138msgid "Products Units"
139msgstr ""
140
141#. module: account_analytic_package
142#: model:ir.module.module,description:account_analytic_package.module_meta_information
143msgid "The Module allows to configure analytic account for product packages.\n"
144" Views for total and monthly product packages weight, Amount analysis."
145msgstr ""
146
147#. module: account_analytic_package
148#: field:account.analytic.line.package,account_id:0
149msgid "Account"
150msgstr ""
151
152#. module: account_analytic_package
153#: model:ir.module.module,shortdesc:account_analytic_package.module_meta_information
154msgid "account_analytic_package"
155msgstr ""
156
157#. module: account_analytic_package
158#: field:account.analytic.line.package,name:0
159msgid "Name"
160msgstr ""
161
162#. module: account_analytic_package
163#: view:account.analytic.line.package.month:0
164#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_activity_tree
165#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_activity_tree
166msgid "Activity Units"
167msgstr ""
168
169#. module: account_analytic_package
170#: view:crm.case.section:0
171msgid "The parent account of all package account"
172msgstr ""
173
174#. module: account_analytic_package
175#: field:crm.case.section,package_product_id:0
176msgid "Package Product"
177msgstr ""
178
179#. module: account_analytic_package
180#: view:product.product:0
181msgid ">0 if it's a activity unit"
182msgstr ""
183
184#. module: account_analytic_package
185#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_month_tree
186#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_month_tree
187msgid "Monthly Services & Activity Units"
188msgstr ""
189
190#. module: account_analytic_package
191#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package_month
192msgid "account.analytic.line.package.month"
193msgstr ""
194
195#. module: account_analytic_package
196#: field:account.analytic.line.package,unit_amount:0
197msgid "Quantity"
198msgstr ""
199
200#. module: account_analytic_package
201#: field:crm.case.section,analytic_account_id:0
202msgid "Main Analytic Account"
203msgstr ""
204
205#. module: account_analytic_package
206#: field:account.analytic.account,package_ok:0
207msgid "Used in Package"
208msgstr ""
209
210#. module: account_analytic_package
211#: field:account.analytic.line.package,partner_id:0
212#: field:account.analytic.line.package.month,partner_id:0
213msgid "Partner"
214msgstr ""
215
216#. module: account_analytic_package
217#: field:account.analytic.line.package.month,total_activity:0
218msgid "Total Activity"
219msgstr ""
220
0221
=== added file 'account_analytic_package/i18n/fr_BE.po'
--- account_analytic_package/i18n/fr_BE.po 1970-01-01 00:00:00 +0000
+++ account_analytic_package/i18n/fr_BE.po 2012-06-28 13:21:29 +0000
@@ -0,0 +1,220 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * account_analytic_package
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.6\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2009-11-24 12:16:03+0000\n"
10"PO-Revision-Date: 2009-11-24 12:16:03+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: account_analytic_package
19#: constraint:ir.model:0
20msgid "The Object name must start with x_ and not contain any special character !"
21msgstr ""
22
23#. module: account_analytic_package
24#: view:account.analytic.line.package.month:0
25msgid "Signed Units"
26msgstr ""
27
28#. module: account_analytic_package
29#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package
30msgid "account.analytic.line.package"
31msgstr ""
32
33#. module: account_analytic_package
34#: constraint:ir.ui.view:0
35msgid "Invalid XML for View Architecture!"
36msgstr ""
37
38#. module: account_analytic_package
39#: view:account.analytic.account:0
40#: view:crm.case.section:0
41#: field:product.product,package_weight:0
42msgid "Package Weight"
43msgstr ""
44
45#. module: account_analytic_package
46#: view:account.analytic.line.package:0
47#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree
48#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_tree
49msgid "Service & Activity Units"
50msgstr ""
51
52#. module: account_analytic_package
53#: constraint:ir.actions.act_window:0
54msgid "Invalid model name in the action definition."
55msgstr ""
56
57#. module: account_analytic_package
58#: view:account.analytic.line.package:0
59msgid "Units"
60msgstr ""
61
62#. module: account_analytic_package
63#: view:product.product:0
64msgid "<0 if it's a service unit"
65msgstr ""
66
67#. module: account_analytic_package
68#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree_simplified
69msgid "Service & Activity Units (no partner and account)"
70msgstr ""
71
72#. module: account_analytic_package
73#: field:account.analytic.line.package,product_id:0
74#: field:account.analytic.line.package.month,product_id:0
75msgid "Product"
76msgstr ""
77
78#. module: account_analytic_package
79#: field:crm.case.section,analytic_journal_id:0
80msgid "Analytic Journal"
81msgstr ""
82
83#. module: account_analytic_package
84#: view:account.analytic.line.package.month:0
85#: view:crm.case.section:0
86#: view:product.product:0
87msgid "Analytic Package"
88msgstr ""
89
90#. module: account_analytic_package
91#: view:product.product:0
92msgid "Zero if not part of a package"
93msgstr ""
94
95#. module: account_analytic_package
96#: field:account.analytic.line.package.month,total_service:0
97msgid "Total Service"
98msgstr ""
99
100#. module: account_analytic_package
101#: field:account.analytic.line.package,unit_weight:0
102msgid "Unit Weight"
103msgstr ""
104
105#. module: account_analytic_package
106#: view:product.product:0
107msgid "Package Units"
108msgstr ""
109
110#. module: account_analytic_package
111#: field:account.analytic.line.package,date:0
112#: field:account.analytic.line.package.month,name:0
113msgid "Date"
114msgstr ""
115
116#. module: account_analytic_package
117#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package
118msgid "Packages"
119msgstr ""
120
121#. module: account_analytic_package
122#: view:account.analytic.line.package.month:0
123#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_service_tree
124#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_service_tree
125msgid "Service Units"
126msgstr ""
127
128#. module: account_analytic_package
129#: field:account.analytic.line.package,total_weight:0
130#: field:account.analytic.line.package.month,total_weight:0
131msgid "Total Weight"
132msgstr ""
133
134#. module: account_analytic_package
135#: model:ir.actions.act_window,name:account_analytic_package.action_package_product_tree
136#: model:ir.ui.menu,name:account_analytic_package.menu_action_package_product_tree
137#: view:product.product:0
138msgid "Products Units"
139msgstr ""
140
141#. module: account_analytic_package
142#: model:ir.module.module,description:account_analytic_package.module_meta_information
143msgid "The Module allows to configure analytic account for product packages.\n"
144" Views for total and monthly product packages weight, Amount analysis."
145msgstr ""
146
147#. module: account_analytic_package
148#: field:account.analytic.line.package,account_id:0
149msgid "Account"
150msgstr "Compte"
151
152#. module: account_analytic_package
153#: model:ir.module.module,shortdesc:account_analytic_package.module_meta_information
154msgid "account_analytic_package"
155msgstr ""
156
157#. module: account_analytic_package
158#: field:account.analytic.line.package,name:0
159msgid "Name"
160msgstr "Nom"
161
162#. module: account_analytic_package
163#: view:account.analytic.line.package.month:0
164#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_activity_tree
165#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_activity_tree
166msgid "Activity Units"
167msgstr ""
168
169#. module: account_analytic_package
170#: view:crm.case.section:0
171msgid "The parent account of all package account"
172msgstr ""
173
174#. module: account_analytic_package
175#: field:crm.case.section,package_product_id:0
176msgid "Package Product"
177msgstr ""
178
179#. module: account_analytic_package
180#: view:product.product:0
181msgid ">0 if it's a activity unit"
182msgstr ""
183
184#. module: account_analytic_package
185#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_month_tree
186#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_month_tree
187msgid "Monthly Services & Activity Units"
188msgstr ""
189
190#. module: account_analytic_package
191#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package_month
192msgid "account.analytic.line.package.month"
193msgstr ""
194
195#. module: account_analytic_package
196#: field:account.analytic.line.package,unit_amount:0
197msgid "Quantity"
198msgstr "Quantité"
199
200#. module: account_analytic_package
201#: field:crm.case.section,analytic_account_id:0
202msgid "Main Analytic Account"
203msgstr "Compte analytique principal"
204
205#. module: account_analytic_package
206#: field:account.analytic.account,package_ok:0
207msgid "Used in Package"
208msgstr ""
209
210#. module: account_analytic_package
211#: field:account.analytic.line.package,partner_id:0
212#: field:account.analytic.line.package.month,partner_id:0
213msgid "Partner"
214msgstr "Partenaire"
215
216#. module: account_analytic_package
217#: field:account.analytic.line.package.month,total_activity:0
218msgid "Total Activity"
219msgstr ""
220
0221
=== added file 'account_analytic_package/i18n/pl.po'
--- account_analytic_package/i18n/pl.po 1970-01-01 00:00:00 +0000
+++ account_analytic_package/i18n/pl.po 2012-06-28 13:21:29 +0000
@@ -0,0 +1,227 @@
1# Polish translation for openobject-addons
2# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
3# This file is distributed under the same license as the openobject-addons package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: openobject-addons\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2009-11-24 12:16+0000\n"
11"PO-Revision-Date: 2010-05-31 04:43+0000\n"
12"Last-Translator: OpenERP Administrators <Unknown>\n"
13"Language-Team: Polish <pl@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2010-08-26 04:05+0000\n"
18"X-Generator: Launchpad (build Unknown)\n"
19
20#. module: account_analytic_package
21#: constraint:ir.model:0
22msgid ""
23"The Object name must start with x_ and not contain any special character !"
24msgstr ""
25"Nazwa obiektu musi zaczynać się od x_ oraz nie może zawierać znaków "
26"specjalnych !"
27
28#. module: account_analytic_package
29#: view:account.analytic.line.package.month:0
30msgid "Signed Units"
31msgstr "Uzgodnione jednostki"
32
33#. module: account_analytic_package
34#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package
35msgid "account.analytic.line.package"
36msgstr ""
37
38#. module: account_analytic_package
39#: constraint:ir.ui.view:0
40msgid "Invalid XML for View Architecture!"
41msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
42
43#. module: account_analytic_package
44#: view:account.analytic.account:0
45#: view:crm.case.section:0
46#: field:product.product,package_weight:0
47msgid "Package Weight"
48msgstr "Waga opakowania"
49
50#. module: account_analytic_package
51#: view:account.analytic.line.package:0
52#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree
53#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_tree
54msgid "Service & Activity Units"
55msgstr "Jednostki usług i aktywności"
56
57#. module: account_analytic_package
58#: constraint:ir.actions.act_window:0
59msgid "Invalid model name in the action definition."
60msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
61
62#. module: account_analytic_package
63#: view:account.analytic.line.package:0
64msgid "Units"
65msgstr "Jednostki"
66
67#. module: account_analytic_package
68#: view:product.product:0
69msgid "<0 if it's a service unit"
70msgstr "<0 jeśli jednostka usługi"
71
72#. module: account_analytic_package
73#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_tree_simplified
74msgid "Service & Activity Units (no partner and account)"
75msgstr "Jednostki usług i aktywności (bez partnerów i kont)"
76
77#. module: account_analytic_package
78#: field:account.analytic.line.package,product_id:0
79#: field:account.analytic.line.package.month,product_id:0
80msgid "Product"
81msgstr "Produkt"
82
83#. module: account_analytic_package
84#: field:crm.case.section,analytic_journal_id:0
85msgid "Analytic Journal"
86msgstr "Dziennik analityczny"
87
88#. module: account_analytic_package
89#: view:account.analytic.line.package.month:0
90#: view:crm.case.section:0
91#: view:product.product:0
92msgid "Analytic Package"
93msgstr "Analityka opakowania"
94
95#. module: account_analytic_package
96#: view:product.product:0
97msgid "Zero if not part of a package"
98msgstr "Zero , jeśli nie jest częścią opakowania"
99
100#. module: account_analytic_package
101#: field:account.analytic.line.package.month,total_service:0
102msgid "Total Service"
103msgstr "Suma usług"
104
105#. module: account_analytic_package
106#: field:account.analytic.line.package,unit_weight:0
107msgid "Unit Weight"
108msgstr "Waga jednostkowa"
109
110#. module: account_analytic_package
111#: view:product.product:0
112msgid "Package Units"
113msgstr "Jednostki opakowania"
114
115#. module: account_analytic_package
116#: field:account.analytic.line.package,date:0
117#: field:account.analytic.line.package.month,name:0
118msgid "Date"
119msgstr "Data"
120
121#. module: account_analytic_package
122#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package
123msgid "Packages"
124msgstr "Opakowania"
125
126#. module: account_analytic_package
127#: view:account.analytic.line.package.month:0
128#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_service_tree
129#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_service_tree
130msgid "Service Units"
131msgstr "Jednostki usług"
132
133#. module: account_analytic_package
134#: field:account.analytic.line.package,total_weight:0
135#: field:account.analytic.line.package.month,total_weight:0
136msgid "Total Weight"
137msgstr "Suma wag"
138
139#. module: account_analytic_package
140#: model:ir.actions.act_window,name:account_analytic_package.action_package_product_tree
141#: model:ir.ui.menu,name:account_analytic_package.menu_action_package_product_tree
142#: view:product.product:0
143msgid "Products Units"
144msgstr "Jednostki produktów"
145
146#. module: account_analytic_package
147#: model:ir.module.module,description:account_analytic_package.module_meta_information
148msgid ""
149"The Module allows to configure analytic account for product packages.\n"
150" Views for total and monthly product packages weight, Amount analysis."
151msgstr ""
152"Moduł pozwala konfigurować konto analityczne dla opakowań produktu.\n"
153" Widoki dla sum i miesięcznych wag opakowań, Analiza wartościowa."
154
155#. module: account_analytic_package
156#: field:account.analytic.line.package,account_id:0
157msgid "Account"
158msgstr "Konto"
159
160#. module: account_analytic_package
161#: model:ir.module.module,shortdesc:account_analytic_package.module_meta_information
162msgid "account_analytic_package"
163msgstr ""
164
165#. module: account_analytic_package
166#: field:account.analytic.line.package,name:0
167msgid "Name"
168msgstr "Nazwa"
169
170#. module: account_analytic_package
171#: view:account.analytic.line.package.month:0
172#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_activity_tree
173#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_activity_tree
174msgid "Activity Units"
175msgstr "Jednostki aktywności"
176
177#. module: account_analytic_package
178#: view:crm.case.section:0
179msgid "The parent account of all package account"
180msgstr "Konto nadrzędne dla wszystkich kont opakowań"
181
182#. module: account_analytic_package
183#: field:crm.case.section,package_product_id:0
184msgid "Package Product"
185msgstr "Opakowanie produktu"
186
187#. module: account_analytic_package
188#: view:product.product:0
189msgid ">0 if it's a activity unit"
190msgstr ">0 jeśli jednostka aktywności"
191
192#. module: account_analytic_package
193#: model:ir.actions.act_window,name:account_analytic_package.action_account_analytic_line_package_month_tree
194#: model:ir.ui.menu,name:account_analytic_package.menu_account_analytic_line_package_month_tree
195msgid "Monthly Services & Activity Units"
196msgstr "Jednostki miesięcznych usług i aktywności"
197
198#. module: account_analytic_package
199#: model:ir.model,name:account_analytic_package.model_account_analytic_line_package_month
200msgid "account.analytic.line.package.month"
201msgstr ""
202
203#. module: account_analytic_package
204#: field:account.analytic.line.package,unit_amount:0
205msgid "Quantity"
206msgstr "Ilość"
207
208#. module: account_analytic_package
209#: field:crm.case.section,analytic_account_id:0
210msgid "Main Analytic Account"
211msgstr "Główne konto analityczne"
212
213#. module: account_analytic_package
214#: field:account.analytic.account,package_ok:0
215msgid "Used in Package"
216msgstr "Stosowane w opakowaniach"
217
218#. module: account_analytic_package
219#: field:account.analytic.line.package,partner_id:0
220#: field:account.analytic.line.package.month,partner_id:0
221msgid "Partner"
222msgstr "Partner"
223
224#. module: account_analytic_package
225#: field:account.analytic.line.package.month,total_activity:0
226msgid "Total Activity"
227msgstr "Suma aktywności"
0228
=== added directory 'account_analytic_package/security'
=== added file 'account_analytic_package/security/ir.model.access.csv'
--- account_analytic_package/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ account_analytic_package/security/ir.model.access.csv 2012-06-28 13:21:29 +0000
@@ -0,0 +1,3 @@
1"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
2"access_account_analytic_line_package","account.analytic.line.package","model_account_analytic_line_package","account.group_account_user",1,1,1,1
3"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
0\ No newline at end of file4\ No newline at end of file
15
=== added directory 'account_coda'
=== renamed directory 'account_coda' => 'account_coda.moved'
=== added file 'account_coda/__init__.py'
--- account_coda/__init__.py 1970-01-01 00:00:00 +0000
+++ account_coda/__init__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,26 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import account_coda
23import wizard
24
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26
027
=== added file 'account_coda/__terp__.py'
--- account_coda/__terp__.py 1970-01-01 00:00:00 +0000
+++ account_coda/__terp__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,44 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22{
23 "name" : "Account CODA - import bank statements from coda file",
24 "version" : "1.0",
25 "author" : "OpenERP SA",
26 "category" : "Account CODA",
27 "description": """
28 Module provides functionality to import
29 bank statements from coda files.
30 """,
31 "depends" : ["account"],
32 "demo_xml" : [],
33 "init_xml" : [],
34 "update_xml": ["security/ir.model.access.csv",
35 "wizard/account_coda_import.xml",
36 "account_coda_view.xml"],
37 "active" : False,
38 "installable" : True,
39
40'certificate': '001319613245022826189',
41}
42
43# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
44
045
=== added file 'account_coda/account_coda.py'
--- account_coda/account_coda.py 1970-01-01 00:00:00 +0000
+++ account_coda/account_coda.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,51 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from osv import osv,fields
24
25class account_coda(osv.osv):
26 _name = "account.coda"
27 _description = "coda for an Account"
28 _columns = {
29 'name': fields.binary('Coda file', readonly=True, help="Store the detail of bank statements"),
30 'statement_ids': fields.one2many('account.bank.statement', 'coda_id', 'Generated Bank Statements', readonly=True),
31 'note': fields.text('Import log', readonly=True),
32 'journal_id': fields.many2one('account.journal', 'Journal', readonly=True, select=True, help="Bank Journal"),
33 'date': fields.date('Date', readonly=True, select=True, help="Import Date"),
34 'user_id': fields.many2one('res.users', 'User', readonly=True, select=True),
35 }
36 _defaults = {
37 'date': time.strftime('%Y-%m-%d'),
38 'user_id': lambda self,cr,uid,context: uid,
39 }
40
41account_coda()
42
43class account_bank_statement(osv.osv):
44 _inherit = "account.bank.statement"
45 _columns = {
46 'coda_id':fields.many2one('account.coda', 'Coda'),
47 }
48
49account_bank_statement()
50
51# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0\ No newline at end of file52\ No newline at end of file
153
=== added file 'account_coda/account_coda_demo.xml'
--- account_coda/account_coda_demo.xml 1970-01-01 00:00:00 +0000
+++ account_coda/account_coda_demo.xml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,5 @@
1<?xml version="1.0"?>
2<openerp>
3<data noupdate="1">
4</data>
5</openerp>
06
=== added file 'account_coda/account_coda_view.xml'
--- account_coda/account_coda_view.xml 1970-01-01 00:00:00 +0000
+++ account_coda/account_coda_view.xml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,64 @@
1<?xml version="1.0" ?>
2<openerp>
3<data>
4
5 <record model="ir.ui.view" id="view_account_coda_form">
6 <field name="name">account.coda.form</field>
7 <field name="model">account.coda</field>
8 <field name="type">form</field>
9 <field name="arch" type="xml">
10 <form string="Coda import">
11 <field name="name" />
12 <field name="journal_id" />
13 <field name="date" />
14 <field name="user_id" />
15 <notebook colspan="4">
16 <page string="Log">
17 <field name="note" colspan="4" nolabel="1"/>
18 </page>
19 <page string="Statements">
20 <field name="statement_ids" colspan="4" nolabel="1"/>
21 </page>
22 </notebook>
23 </form>
24 </field>
25 </record>
26
27 <record model="ir.ui.view" id="view_account_coda_tree">
28 <field name="name">account.coda.tree</field>
29 <field name="model">account.coda</field>
30 <field name="type">tree</field>
31 <field name="arch" type="xml">
32 <tree string="Coda import">
33 <field name="journal_id" />
34 <field name="date" />
35 <field name="user_id" />
36 <field name="statement_ids"/>
37 </tree>
38 </field>
39 </record>
40
41
42 <record model="ir.actions.act_window" id="action_account_coda">
43 <field name="name">Coda Statements</field>
44 <field name="type">ir.actions.act_window</field>
45 <field name="res_model">account.coda</field>
46 <field name="view_type">form</field>
47 <field name="view_mode">tree,form</field>
48 </record>
49
50
51 <menuitem name="Financial Management/Reporting/Coda Statements" id="menu_account_coda_statement" action="action_account_coda" sequence="15"/>
52
53 <menuitem name="Financial Management/Periodical Processing/Import Coda Statements" action="action_account_coda_import" id="menu_account_coda_import" sequence="13"/>
54
55 <act_window name="Coda File"
56 domain="[('statement_ids', 'in', [active_id])]"
57 res_model="account.coda"
58 src_model="account.bank.statement"
59 view_type="form"
60 view_mode="tree,form"
61 id="act_account_payment_account_bank_statement"/>
62
63 </data>
64</openerp>
065
=== added directory 'account_coda/i18n'
=== added directory 'account_coda/security'
=== added file 'account_coda/security/ir.model.access.csv'
--- account_coda/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ account_coda/security/ir.model.access.csv 2012-06-28 13:21:29 +0000
@@ -0,0 +1,6 @@
1"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
2"access_account_coda","account.coda","model_account_coda","account.group_account_user",1,0,0,0
3"access_account_coda_manager","account.coda","model_account_coda","account.group_account_manager",1,1,1,1
4"access_account_coda_import_manager","account.coda.import","model_account_coda_import","account.group_account_manager",1,1,1,1
5"access_account_coda_import_user","account.coda","model_account_coda","account.group_account_user",1,0,0,0
6"access_account_coda_system","account.coda system","model_account_coda","base.group_system",1,0,0,0
07
=== added directory 'account_coda/test_coda_file'
=== added file 'account_coda/test_coda_file/statement_coda.txt'
--- account_coda/test_coda_file/statement_coda.txt 1970-01-01 00:00:00 +0000
+++ account_coda/test_coda_file/statement_coda.txt 2012-06-28 13:21:29 +0000
@@ -0,0 +1,10 @@
10000006060712505 00000CPH CODA TINY 0047747270100477472701 00000 1
21 049126201326907 EUR0BE 0000000015632900050607TINY COMPTE COURANT ORDINAIRE 049
32100010000 0000000001150000060607001500000INVOICE OF 2006-12-19 0606070020100
42200010000 EUR000000001150000 100
52300010000301915554082 PROLIBRE SARL CAROUGE GE 000
62100020000 0000000000500000060607001500000CONTRACT PARTNER ERREUR ECART YEA 0606070030100
72200020000RTY CONTRACT PARTNER EUR000000000500000 100
82300020000050000000017 SEDNACOM 43 ALLEE DES FOUGERES 9522 0 HERBLAY 000
98049126201326907 0000000017282900060607
109 000008000000000000000000000001650000 2
011
=== added directory 'account_coda/wizard'
=== added file 'account_coda/wizard/__init__.py'
--- account_coda/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ account_coda/wizard/__init__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,25 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import account_coda_import
23
24# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
25
026
=== added file 'account_coda/wizard/account_coda_import.py'
--- account_coda/wizard/account_coda_import.py 1970-01-01 00:00:00 +0000
+++ account_coda/wizard/account_coda_import.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,309 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
6# $Id$
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23import time
24import base64
25
26from osv import fields
27from osv import osv
28from tools.translate import _
29
30def str2date(date_str):
31 return time.strftime("%y/%m/%d", time.strptime(date_str, "%d%m%y"))
32
33def str2float(str):
34 try:
35 return float(str)
36 except:
37 return 0.0
38
39def list2float(lst):
40 try:
41 return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
42 except:
43 return 0.0
44
45class account_coda_import(osv.osv_memory):
46 _name = 'account.coda.import'
47 _description = 'Account Coda Import'
48 _columns = {
49 'journal_id': fields.many2one('account.journal', 'Bank Journal', required=True),
50 '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'),
51 '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',),
52 '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',),
53 'coda': fields.binary('Coda File', required=True),
54 'note':fields.text('Log'),
55 }
56
57 def coda_parsing(self, cr, uid, ids, context=None):
58
59 journal_obj=self.pool.get('account.journal')
60 account_period_obj = self.pool.get('account.period')
61 partner_bank_obj = self.pool.get('res.partner.bank')
62 bank_statement_obj = self.pool.get('account.bank.statement')
63 move_line_obj = self.pool.get('account.move.line')
64 bank_statement_line_obj = self.pool.get('account.bank.statement.line')
65 statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile')
66 account_coda_obj = self.pool.get('account.coda')
67 mod_obj = self.pool.get('ir.model.data')
68
69 if not context:
70 context = {}
71
72 data = self.read(cr, uid, ids)[0]
73
74 codafile = data['coda']
75 journal_code = journal_obj.browse(cr, uid, data['journal_id'], context).code
76
77 period = account_period_obj.find(cr, uid, context=context)[0]
78 def_pay_acc = data['def_payable']
79 def_rec_acc = data['def_receivable']
80
81 str_log = ""
82 err_log = "Errors:\n------\n"
83 nb_err=0
84 std_log=''
85 str_log1 = "Coda File is Imported : "
86 str_not=''
87 str_not1=''
88
89 bank_statements=[]
90 bank_statement = {}
91 recordlist = base64.decodestring(codafile).split('\n')
92 recordlist.pop()
93 i=0
94 bkst_list=[]
95 for line in recordlist:
96 if line[0] == '0':
97 # header data
98
99 bank_statement["bank_statement_line"]={}
100 bank_statement_lines = {}
101 bank_statement['date'] = str2date(line[5:11])
102 bank_statement['journal_id']=data['journal_id']
103 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")))])
104 bank_statement['period_id'] = period_id and period_id[0] or False
105 bank_statement['state']='draft'
106 elif line[0] == '1':
107 # old balance data
108 bal_start = list2float(line[43:58])
109 if line[42] == '1':
110 bal_start = - bal_start
111 bank_statement["balance_start"]= bal_start
112 bank_statement["acc_number"]=line[5:17]
113 bank_statement["acc_holder"]=line[64:90]
114 bank_statement['name'] = journal_code + ' ' + str(line[2:5])
115
116 elif line[0]=='2':
117 # movement data record 2
118 if line[1]=='1':
119 # movement data record 2.1
120 if bank_statement_lines.has_key(line[2:6]):
121 continue
122 st_line = {}
123 st_line['extra_note'] = ''
124 st_line['statement_id']=0
125 st_line['ref'] = line[2:10]
126 st_line['date'] = time.strftime('%Y-%m-%d', time.strptime(str2date(line[115:121]), "%y/%m/%d")),
127 st_line_amt = list2float(line[32:47])
128
129 if line[61]=='1':
130 st_line['toreconcile'] = True
131 st_line['name']=line[65:77]
132 else:
133 st_line['toreconcile'] = False
134 st_line['name']=line[62:115]
135
136 st_line['free_comm'] = st_line['name']
137 st_line['val_date']=time.strftime('%Y-%m-%d', time.strptime(str2date(line[47:53]), "%y/%m/%d")),
138 st_line['entry_date']=time.strftime('%Y-%m-%d', time.strptime(str2date(line[115:121]), "%y/%m/%d")),
139 st_line['partner_id']=0
140 if line[31] == '1':
141 st_line_amt = - st_line_amt
142 st_line['account_id'] = def_pay_acc
143 else:
144 st_line['account_id'] = def_rec_acc
145 st_line['amount'] = st_line_amt
146 bank_statement_lines[line[2:6]]=st_line
147 bank_statement["bank_statement_line"]=bank_statement_lines
148 elif line[1] == '2':
149 st_line_name = line[2:6]
150 bank_statement_lines[st_line_name].update({'account_id': data['awaiting_account']})
151
152 elif line[1] == '3':
153 # movement data record 3.1
154 st_line_name = line[2:6]
155 st_line_partner_acc = str(line[10:47]).strip()
156 cntry_number=line[10:47].strip()
157 contry_name=line[47:125].strip()
158 bank_ids = partner_bank_obj.search(cr, uid, [('acc_number', '=', st_line_partner_acc)])
159 bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
160 if bank_ids:
161 bank = partner_bank_obj.browse(cr, uid, bank_ids[0], context)
162 if line and bank.partner_id:
163 bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
164 if bank_statement_lines[st_line_name]['amount'] < 0 :
165 bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
166 else :
167 bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
168 else:
169 nb_err += 1
170 err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number, contry_name)
171 bank_statement_lines[st_line_name].update({'account_id': data['awaiting_account']})
172
173 bank_statement["bank_statement_line"]=bank_statement_lines
174 elif line[0]=='3':
175 if line[1] == '1':
176 st_line_name = line[2:6]
177 bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113].decode('utf-8','replace').encode('utf-8')
178 elif line[1] == '2':
179 st_line_name = line[2:6]
180 bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115].decode('utf-8','replace').encode('utf-8')
181 elif line[1] == '3':
182 st_line_name = line[2:6]
183 bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100].decode('utf-8','replace').encode('utf-8')
184 elif line[0]=='8':
185 # new balance record
186 bal_end = list2float(line[42:57])
187 if line[41] == '1':
188 bal_end = - bal_end
189 bank_statement["balance_end_real"]= bal_end
190
191 elif line[0]=='9':
192 # footer record
193 bank_statement['id%d'%i] = i
194 i+=1
195 bank_statements.append(bank_statement)
196 statement = bank_statement
197 try:
198 bk_st_id =bank_statement_obj.create(cr, uid, {
199 'journal_id': statement['journal_id'],
200 'date':time.strftime('%Y-%m-%d', time.strptime(statement['date'], "%y/%m/%d")),
201 'period_id':statement['period_id'] or period,
202 'balance_start': statement["balance_start"],
203 'balance_end_real': statement["balance_end_real"],
204 'state': 'draft',
205 'name': statement['name'],
206 })
207 lines=statement["bank_statement_line"]
208 for value in lines:
209 line=lines[value]
210 reconcile_id = False
211 if line['toreconcile']:
212 name = line['name'][:3] + '/' + line['name'][3:7] + '/' + line['name'][7:]
213 rec_id = self.pool.get('account.move.line').search(cr, uid, [('name','=', name),('reconcile_id','=',False),('account_id.reconcile','=',True)])
214 if rec_id:
215 reconcile_id = statement_reconcile_obj.create(cr, uid, {
216 'line_ids': [(6, 0, rec_id)]
217 }, context=context)
218 mv = self.pool.get('account.move.line').browse(cr, uid, rec_id[0], context=context)
219 if mv.partner_id:
220 line['partner_id'] = mv.partner_id.id
221 if line['amount'] < 0 :
222 line['account_id'] = mv.partner_id.property_account_payable.id
223 else :
224 line['account_id'] = mv.partner_id.property_account_receivable.id
225 str_not1 = ''
226 if line.has_key('contry_name') and line.has_key('cntry_number'):
227 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])
228 id=bank_statement_line_obj.create(cr, uid, {
229 'name':line['name'],
230 'date': line['date'],
231 'type': (line['amount']>0 and 'customer') or (line['amount']<0 and 'supplier') or 'general',
232 'amount': line['amount'],
233 'partner_id':line['partner_id'] or 0,
234 'account_id':line['account_id'],
235 'statement_id': bk_st_id,
236 'reconcile_id': reconcile_id,
237 'note':str_not1,
238 'ref':line['ref'],
239 })
240
241 str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"], statement["acc_holder"])
242 std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
243 %(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
244 bkst_list.append(bk_st_id)
245
246 except osv.except_osv, e:
247 cr.rollback()
248 nb_err+=1
249 err_log += '\n Application Error : ' + str(e)
250 raise # REMOVEME
251
252 except Exception, e:
253 cr.rollback()
254 nb_err+=1
255 err_log += '\n System Error : '+str(e)
256 raise # REMOVEME
257 except :
258 cr.rollback()
259 nb_err+=1
260 err_log += '\n Unknown Error'
261 raise
262 err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
263 err_log += '\nNumber of error :'+ str(nb_err) +'\n'
264
265 account_coda_obj.create(cr, uid, {
266 'name':codafile,
267 'statement_ids': [(6, 0, bkst_list,)],
268 'note':str_log1+str_not+std_log+err_log,
269 'journal_id':data['journal_id'],
270 'date':time.strftime("%Y-%m-%d"),
271 'user_id':uid,
272 })
273 test=''
274 test=str_log1 + std_log + err_log
275 self.write(cr, uid, ids, {'note':test}, context=context)
276 extraction= { 'statment_ids':bkst_list}
277 context.update({ 'statment_ids':bkst_list})
278 model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'), ('name', '=', 'account_coda_note_view')], context=context)
279 resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
280
281 return {
282 'name': _('Result'),
283 'res_id': ids[0],
284 'view_type': 'form',
285 'view_mode': 'form',
286 'res_model': 'account.coda.import',
287 'view_id': False,
288 'target':'new',
289 'views': [(resource_id, 'form')],
290 'context': context,
291 'type': 'ir.actions.act_window',
292 }
293
294 def action_open_window(self, cr, uid, data, context=None):
295 if not context:
296 cotext = {}
297 return {
298 'domain':"[('id','in',%s)]"%(context.get('statment_ids', False)),
299 'name': 'Statement',
300 'view_type': 'form',
301 'view_mode': 'tree,form',
302 'res_model': 'account.bank.statement',
303 'view_id': False,
304 'type': 'ir.actions.act_window',
305 }
306
307account_coda_import()
308
309# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0310
=== added file 'account_coda/wizard/account_coda_import.xml'
--- account_coda/wizard/account_coda_import.xml 1970-01-01 00:00:00 +0000
+++ account_coda/wizard/account_coda_import.xml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,59 @@
1<?xml version="1.0" ?>
2<openerp>
3<data>
4 <record id="account_coda_import_view" model="ir.ui.view">
5 <field name="name">Import Coda Statement</field>
6 <field name="model">account.coda.import</field>
7 <field name="type">form</field>
8 <field name="arch" type="xml">
9 <form string="Import Coda Statement">
10 <separator colspan="4" string="Configure Your Journal and Account :" />
11 <field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
12 <newline />
13 <field name="def_payable" />
14 <newline />
15 <field name="def_receivable" />
16 <newline />
17 <field name="awaiting_account" />
18 <separator string="Click on 'New' to select your file :" colspan="4"/>
19 <field name="coda"/>
20 <newline/>
21 <group colspan="4" col="6">
22 <separator colspan="6"/>
23 <button special="cancel" string="Cancel" icon="gtk-cancel"/>
24 <button name="coda_parsing" string="Import" type="object" icon="gtk-ok"/>
25 </group>
26 </form>
27 </field>
28 </record>
29
30 <record id="account_coda_note_view" model="ir.ui.view">
31 <field name="name">Import Coda Statement</field>
32 <field name="model">account.coda.import</field>
33 <field name="type">form</field>
34 <field name="arch" type="xml">
35 <form string="Result of Imported Coda Statements">
36 <group height="420">
37 <separator colspan="4" string="Results :" />
38 <field name="note" colspan="4" nolabel="1"/>
39 <newline/>
40 <separator colspan="6"/>
41 <button special="cancel" string="Close" icon="gtk-cancel"/>
42 <button name="action_open_window" string="Open Statements" type="object" icon="gtk-apply"/>
43 </group>
44 </form>
45 </field>
46 </record>
47
48 <record id="action_account_coda_import" model="ir.actions.act_window">
49 <field name="name">Import Coda Statement</field>
50 <field name="type">ir.actions.act_window</field>
51 <field name="res_model">account.coda.import</field>
52 <field name="view_type">form</field>
53 <field name="view_mode">form</field>
54 <field name="target">new</field>
55 <field name="view_id" ref="account_coda_import_view"/>
56 </record>
57
58</data>
59</openerp>
060
=== added directory 'account_l10nbe_domiciliation'
=== added file 'account_l10nbe_domiciliation/__init__.py'
--- account_l10nbe_domiciliation/__init__.py 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/__init__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,27 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import l10nbe_domiciliation
23import report
24import wizard
25
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
27
028
=== added file 'account_l10nbe_domiciliation/__terp__.py'
--- account_l10nbe_domiciliation/__terp__.py 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/__terp__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,46 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21{
22 "name" : "Account l10nbe Domiciliation",
23 "version" : "1.0",
24 "author" : "Tiny",
25 "website" : "http://www.openerp.com",
26 "category" : "Generic Modules/Account l10nbe Domiciliation",
27 "description": """
28 Related with l10n_be module.
29 Adds Domiciled and Domiciled send date fields on invoice.
30 Domiciliation and Domiciliation Number fields on partner.
31 """,
32 "depends" : ["base","account","l10n_be"],
33 "init_xml" : [],
34 "demo_xml" : [],
35
36 "update_xml" : ["l10nbe_domiciliation_view.xml",
37 "l10nbe_domiciliation_report.xml",
38 "l10nbe_domiciliation_wizard.xml"
39 ],
40 "active": False,
41 "installable": True,
42
43'certificate': '00405683612189',
44}
45# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
46
047
=== added directory 'account_l10nbe_domiciliation/i18n'
=== added file 'account_l10nbe_domiciliation/i18n/account_l10nbe_domiciliation.pot'
--- account_l10nbe_domiciliation/i18n/account_l10nbe_domiciliation.pot 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/i18n/account_l10nbe_domiciliation.pot 2012-06-28 13:21:29 +0000
@@ -0,0 +1,237 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * account_l10nbe_domiciliation
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.6\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2009-11-24 13:07:05+0000\n"
10"PO-Revision-Date: 2009-11-24 13:07:05+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: account_l10nbe_domiciliation
19#: view:res.company:0
20msgid "Dom80 Export"
21msgstr ""
22
23#. module: account_l10nbe_domiciliation
24#: model:ir.module.module,shortdesc:account_l10nbe_domiciliation.module_meta_information
25msgid "Account l10nbe Domiciliation"
26msgstr ""
27
28#. module: account_l10nbe_domiciliation
29#: wizard_field:invoice.export.dom,export,note:0
30msgid "Log"
31msgstr ""
32
33#. module: account_l10nbe_domiciliation
34#: field:invoice.export.log,file:0
35msgid "Saved File"
36msgstr ""
37
38#. module: account_l10nbe_domiciliation
39#: field:account.invoice,domiciled_send_date:0
40msgid "Domiciliation Sending Date"
41msgstr ""
42
43#. module: account_l10nbe_domiciliation
44#: constraint:ir.model:0
45msgid "The Object name must start with x_ and not contain any special character !"
46msgstr ""
47
48#. module: account_l10nbe_domiciliation
49#: wizard_field:invoice.export.dom,init,msg2:0
50msgid "Message to the payer, part 2."
51msgstr ""
52
53#. module: account_l10nbe_domiciliation
54#: wizard_field:invoice.export.dom,init,collection_date:0
55msgid "Collection Date"
56msgstr ""
57
58#. module: account_l10nbe_domiciliation
59#: wizard_view:invoice.export.dom,export:0
60msgid "Note"
61msgstr ""
62
63#. module: account_l10nbe_domiciliation
64#: selection:invoice.export.log,state:0
65msgid "Failed"
66msgstr ""
67
68#. module: account_l10nbe_domiciliation
69#: wizard_view:invoice.export.dom,export:0
70msgid "Save File..."
71msgstr ""
72
73#. module: account_l10nbe_domiciliation
74#: field:invoice.export.log,note:0
75msgid "Creation Log"
76msgstr ""
77
78#. module: account_l10nbe_domiciliation
79#: constraint:ir.actions.act_window:0
80msgid "Invalid model name in the action definition."
81msgstr ""
82
83#. module: account_l10nbe_domiciliation
84#: model:ir.actions.act_window,name:account_l10nbe_domiciliation.action_account_invoice_log_tree
85#: model:ir.ui.menu,name:account_l10nbe_domiciliation.menu_action_action_invoice_export_tree
86msgid "Invoice Export Logs"
87msgstr ""
88
89#. module: account_l10nbe_domiciliation
90#: field:res.company,id_sender:0
91msgid "Identification number of the Sender"
92msgstr ""
93
94#. module: account_l10nbe_domiciliation
95#: field:invoice.export.log,state:0
96msgid "Status"
97msgstr ""
98
99#. module: account_l10nbe_domiciliation
100#: help:res.company,id_creditor:0
101msgid "Creditor Id for Dom80 export header"
102msgstr ""
103
104#. module: account_l10nbe_domiciliation
105#: field:invoice.export.log,create_date:0
106msgid "Creation Date"
107msgstr ""
108
109#. module: account_l10nbe_domiciliation
110#: view:invoice.export.log:0
111msgid "Payment Export Logs"
112msgstr ""
113
114#. module: account_l10nbe_domiciliation
115#: wizard_field:invoice.export.dom,init,msg1:0
116msgid "Message to the payer, part 1."
117msgstr ""
118
119#. module: account_l10nbe_domiciliation
120#: field:invoice.export.log,create_uid:0
121msgid "Creation User"
122msgstr ""
123
124#. module: account_l10nbe_domiciliation
125#: field:res.partner.bank,institution_code:0
126msgid "Institution Code"
127msgstr ""
128
129#. module: account_l10nbe_domiciliation
130#: help:res.company,id_sender:0
131msgid "Sender Id for Dom80 export header"
132msgstr ""
133
134#. module: account_l10nbe_domiciliation
135#: model:ir.ui.menu,name:account_l10nbe_domiciliation.menu_action_action_invoice_export
136msgid "Invoice Export"
137msgstr ""
138
139#. module: account_l10nbe_domiciliation
140#: wizard_view:invoice.export.dom,init:0
141msgid "Export invoice to DOM80 format"
142msgstr ""
143
144#. module: account_l10nbe_domiciliation
145#: field:res.partner,domiciliation:0
146msgid "Domiciliation Number"
147msgstr ""
148
149#. module: account_l10nbe_domiciliation
150#: constraint:ir.ui.view:0
151msgid "Invalid XML for View Architecture!"
152msgstr ""
153
154#. module: account_l10nbe_domiciliation
155#: wizard_button:invoice.export.dom,export,close:0
156msgid "Ok"
157msgstr ""
158
159#. module: account_l10nbe_domiciliation
160#: model:ir.actions.wizard,name:account_l10nbe_domiciliation.wizard_invoice_export_dom
161msgid "Export Invoice"
162msgstr ""
163
164#. module: account_l10nbe_domiciliation
165#: selection:invoice.export.log,state:0
166msgid "Succeeded"
167msgstr ""
168
169#. module: account_l10nbe_domiciliation
170#: wizard_field:invoice.export.dom,export,invoice_file:0
171msgid "Export File"
172msgstr ""
173
174#. module: account_l10nbe_domiciliation
175#: field:res.company,id_creditor:0
176msgid "Identification number of the Creditor"
177msgstr ""
178
179#. module: account_l10nbe_domiciliation
180#: help:invoice.export.dom,init,collection_date:0
181msgid "Requested collection date"
182msgstr ""
183
184#. module: account_l10nbe_domiciliation
185#: wizard_view:invoice.export.dom,init:0
186msgid "Export Invoices"
187msgstr ""
188
189#. module: account_l10nbe_domiciliation
190#: wizard_field:invoice.export.dom,init,ref_file:0
191msgid "Reference of the file"
192msgstr ""
193
194#. module: account_l10nbe_domiciliation
195#: field:account.invoice,domiciled:0
196msgid "Domiciled"
197msgstr ""
198
199#. module: account_l10nbe_domiciliation
200#: help:invoice.export.dom,init,ref_file:0
201msgid "Reference of the file, Used for Dom80 header"
202msgstr ""
203
204#. module: account_l10nbe_domiciliation
205#: model:ir.module.module,description:account_l10nbe_domiciliation.module_meta_information
206msgid "\n"
207" Related with l10n_be module.\n"
208" Adds Domiciled and Domiciled send date fields on invoice.\n"
209" Domiciliation and Domiciliation Number fields on partner.\n"
210" "
211msgstr ""
212
213#. module: account_l10nbe_domiciliation
214#: wizard_button:invoice.export.dom,init,export:0
215msgid "Export"
216msgstr ""
217
218#. module: account_l10nbe_domiciliation
219#: help:res.partner.bank,institution_code:0
220msgid "Code of the financial institution used for Dom80 Export"
221msgstr ""
222
223#. module: account_l10nbe_domiciliation
224#: wizard_button:invoice.export.dom,init,end:0
225msgid "Cancel"
226msgstr ""
227
228#. module: account_l10nbe_domiciliation
229#: field:res.partner,domiciliation_bool:0
230msgid "Domiciliation"
231msgstr ""
232
233#. module: account_l10nbe_domiciliation
234#: model:ir.model,name:account_l10nbe_domiciliation.model_invoice_export_log
235msgid "Invoice Export History"
236msgstr ""
237
0238
=== added file 'account_l10nbe_domiciliation/i18n/fr_BE.po'
--- account_l10nbe_domiciliation/i18n/fr_BE.po 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/i18n/fr_BE.po 2012-06-28 13:21:29 +0000
@@ -0,0 +1,241 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * account_l10nbe_domiciliation
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.6\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2009-11-24 13:07:05+0000\n"
10"PO-Revision-Date: 2009-11-24 13:07:05+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: account_l10nbe_domiciliation
19#: view:res.company:0
20msgid "Dom80 Export"
21msgstr "Export DOM80"
22
23#. module: account_l10nbe_domiciliation
24#: model:ir.module.module,shortdesc:account_l10nbe_domiciliation.module_meta_information
25msgid "Account l10nbe Domiciliation"
26msgstr "Account l10nbe Domiciliation"
27
28#. module: account_l10nbe_domiciliation
29#: wizard_field:invoice.export.dom,export,note:0
30msgid "Log"
31msgstr "Log"
32
33#. module: account_l10nbe_domiciliation
34#: field:invoice.export.log,file:0
35msgid "Saved File"
36msgstr "Fichier enregistré"
37
38#. module: account_l10nbe_domiciliation
39#: field:account.invoice,domiciled_send_date:0
40msgid "Domiciliation Sending Date"
41msgstr "Date d'envoi de la domiciliation"
42
43#. module: account_l10nbe_domiciliation
44#: constraint:ir.model:0
45msgid "The Object name must start with x_ and not contain any special character !"
46msgstr "Le nom de l'Objet doit commencer par x_ et ne pas comporter de caractères spéciaux !"
47
48#. module: account_l10nbe_domiciliation
49#: wizard_field:invoice.export.dom,init,msg2:0
50msgid "Message to the payer, part 2."
51msgstr "Messaye pour le payeur, seconde partie"
52
53#. module: account_l10nbe_domiciliation
54#: wizard_field:invoice.export.dom,init,collection_date:0
55msgid "Collection Date"
56msgstr "Date pivot"
57
58#. module: account_l10nbe_domiciliation
59#: wizard_view:invoice.export.dom,export:0
60msgid "Note"
61msgstr "Note"
62
63#. module: account_l10nbe_domiciliation
64#: selection:invoice.export.log,state:0
65msgid "Failed"
66msgstr "Raté"
67
68#. module: account_l10nbe_domiciliation
69#: wizard_view:invoice.export.dom,export:0
70msgid "Save File..."
71msgstr "Enregistre fichier..."
72
73#. module: account_l10nbe_domiciliation
74#: field:invoice.export.log,note:0
75msgid "Creation Log"
76msgstr "Log de création"
77
78#. module: account_l10nbe_domiciliation
79#: constraint:ir.actions.act_window:0
80msgid "Invalid model name in the action definition."
81msgstr "Nom de modèle incorrect dans la définition de l'action"
82
83#. module: account_l10nbe_domiciliation
84#: model:ir.actions.act_window,name:account_l10nbe_domiciliation.action_account_invoice_log_tree
85#: model:ir.ui.menu,name:account_l10nbe_domiciliation.menu_action_action_invoice_export_tree
86msgid "Invoice Export Logs"
87msgstr "Logs des exportations de factures"
88
89#. module: account_l10nbe_domiciliation
90#: field:res.company,id_sender:0
91msgid "Identification number of the Sender"
92msgstr "Numéro d'identification de l'expéditeur"
93
94#. module: account_l10nbe_domiciliation
95#: field:invoice.export.log,state:0
96msgid "Status"
97msgstr "Status"
98
99#. module: account_l10nbe_domiciliation
100#: help:res.company,id_creditor:0
101msgid "Creditor Id for Dom80 export header"
102msgstr "ID créditeur dans l'en-tête DOM80"
103
104#. module: account_l10nbe_domiciliation
105#: field:invoice.export.log,create_date:0
106msgid "Creation Date"
107msgstr "Date de création"
108
109#. module: account_l10nbe_domiciliation
110#: view:invoice.export.log:0
111msgid "Payment Export Logs"
112msgstr "Logs des Export de paiement"
113
114#. module: account_l10nbe_domiciliation
115#: wizard_field:invoice.export.dom,init,msg1:0
116msgid "Message to the payer, part 1."
117msgstr "Message au payeur, première partie"
118
119#. module: account_l10nbe_domiciliation
120#: field:invoice.export.log,create_uid:0
121msgid "Creation User"
122msgstr "Créateur"
123
124#. module: account_l10nbe_domiciliation
125#: field:res.partner.bank,institution_code:0
126msgid "Institution Code"
127msgstr "Code de l'institution"
128
129#. module: account_l10nbe_domiciliation
130#: help:res.company,id_sender:0
131msgid "Sender Id for Dom80 export header"
132msgstr "ID de l'expéditeur dans le'en-tête DOM80"
133
134#. module: account_l10nbe_domiciliation
135#: model:ir.ui.menu,name:account_l10nbe_domiciliation.menu_action_action_invoice_export
136msgid "Invoice Export"
137msgstr "Exporter les factures"
138
139#. module: account_l10nbe_domiciliation
140#: wizard_view:invoice.export.dom,init:0
141msgid "Export invoice to DOM80 format"
142msgstr "Exporter les factures au format DOM80"
143
144#. module: account_l10nbe_domiciliation
145#: field:res.partner,domiciliation:0
146msgid "Domiciliation Number"
147msgstr "Numéro de domiciliation"
148
149#. module: account_l10nbe_domiciliation
150#: constraint:ir.ui.view:0
151msgid "Invalid XML for View Architecture!"
152msgstr "XML incorrect pour l'Architecture des Vues !"
153
154#. module: account_l10nbe_domiciliation
155#: wizard_button:invoice.export.dom,export,close:0
156msgid "Ok"
157msgstr "Ok"
158
159#. module: account_l10nbe_domiciliation
160#: model:ir.actions.wizard,name:account_l10nbe_domiciliation.wizard_invoice_export_dom
161msgid "Export Invoice"
162msgstr "Exoporte les factures"
163
164#. module: account_l10nbe_domiciliation
165#: selection:invoice.export.log,state:0
166msgid "Succeeded"
167msgstr "Réussi"
168
169#. module: account_l10nbe_domiciliation
170#: wizard_field:invoice.export.dom,export,invoice_file:0
171msgid "Export File"
172msgstr "Fichier Exporté"
173
174#. module: account_l10nbe_domiciliation
175#: field:res.company,id_creditor:0
176msgid "Identification number of the Creditor"
177msgstr "Numéro d'identification du créditeur"
178
179#. module: account_l10nbe_domiciliation
180#: help:invoice.export.dom,init,collection_date:0
181msgid "Requested collection date"
182msgstr "Date pivot"
183
184#. module: account_l10nbe_domiciliation
185#: wizard_view:invoice.export.dom,init:0
186msgid "Export Invoices"
187msgstr "Exporter les factures"
188
189#. module: account_l10nbe_domiciliation
190#: wizard_field:invoice.export.dom,init,ref_file:0
191msgid "Reference of the file"
192msgstr "Référence du fichier"
193
194#. module: account_l10nbe_domiciliation
195#: field:account.invoice,domiciled:0
196msgid "Domiciled"
197msgstr "Domiciliée"
198
199#. module: account_l10nbe_domiciliation
200#: help:invoice.export.dom,init,ref_file:0
201msgid "Reference of the file, Used for Dom80 header"
202msgstr "Référence du fichier, utilisée dans l'en-tête DOM80"
203
204#. module: account_l10nbe_domiciliation
205#: model:ir.module.module,description:account_l10nbe_domiciliation.module_meta_information
206msgid "\n"
207" Related with l10n_be module.\n"
208" Adds Domiciled and Domiciled send date fields on invoice.\n"
209" Domiciliation and Domiciliation Number fields on partner.\n"
210" "
211msgstr "\n"
212" Lié au module l10n_be.\n"
213" Ajoute les champs 'Domiciled' and 'Domiciled send date' aux factures,\n"
214" et 'Domiciliation' et 'Domiciliation Number' sur les partenaires.\n"
215" "
216
217#. module: account_l10nbe_domiciliation
218#: wizard_button:invoice.export.dom,init,export:0
219msgid "Export"
220msgstr "Export"
221
222#. module: account_l10nbe_domiciliation
223#: help:res.partner.bank,institution_code:0
224msgid "Code of the financial institution used for Dom80 Export"
225msgstr "Code de l'institution financière utilisée dans l'export DOM80"
226
227#. module: account_l10nbe_domiciliation
228#: wizard_button:invoice.export.dom,init,end:0
229msgid "Cancel"
230msgstr "Annule"
231
232#. module: account_l10nbe_domiciliation
233#: field:res.partner,domiciliation_bool:0
234msgid "Domiciliation"
235msgstr "Domiciliation"
236
237#. module: account_l10nbe_domiciliation
238#: model:ir.model,name:account_l10nbe_domiciliation.model_invoice_export_log
239msgid "Invoice Export History"
240msgstr "Historique de l'Export des factures"
241
0242
=== added file 'account_l10nbe_domiciliation/l10nbe_domiciliation.py'
--- account_l10nbe_domiciliation/l10nbe_domiciliation.py 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/l10nbe_domiciliation.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,72 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21from osv import fields, osv
22
23class account_invoice(osv.osv):
24 _inherit = 'account.invoice'
25 _description = 'Account Invoice'
26 _columns = {
27 'domiciled' : fields.boolean('Domiciled'),
28 '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'),
29 }
30
31 def on_change_partner_id(self, cr, uid, ids, type, partner_id,date_invoice=False, payment_term=False):
32 data=super(account_invoice,self).onchange_partner_id( cr, uid, ids, type, partner_id,date_invoice, payment_term)
33 if not partner_id:
34 return data['value'].update({'domiciled' : False})
35 partner_obj = self.pool.get('res.partner').browse(cr, uid, partner_id)
36 domiciled = partner_obj.domiciliation_bool
37 data['value']['domiciled'] = domiciled
38 return data
39
40account_invoice()
41
42class res_partner(osv.osv):
43 _inherit = 'res.partner'
44 _description = 'Partner'
45 _columns = {
46 'domiciliation_bool':fields.boolean('Direct Debit Permission', help="Check this field if you can collect direct debit invoices for this partner."),
47 'domiciliation' : fields.char('Direct Debit Number', size=12)
48 }
49res_partner()
50
51class res_partner_bank(osv.osv):
52 _inherit = "res.partner.bank"
53 _columns = {
54 'institution_code':fields.char('Institution Code', size=3, help="Code of the financial institution used for Dom80 Export"),
55 }
56res_partner_bank()
57
58class invoice_export_log(osv.osv):
59 _name = "invoice.export.log"
60 _description = "Invoice Export History"
61 _rec_name = 'invoice_id'
62 _columns = {
63 'state': fields.selection([('failed', 'Failed'), ('succeeded', 'Succeeded')], 'Status', readonly=True),
64 'file': fields.binary('Saved File', readonly=True),
65 'note': fields.text('Creation Log', readonly=True),
66 'create_date': fields.datetime('Creation Date', required=True, readonly=True),
67 'create_uid': fields.many2one('res.users', 'Creation User', required=True, readonly=True),
68 }
69invoice_export_log()
70
71# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
72
073
=== added file 'account_l10nbe_domiciliation/l10nbe_domiciliation_report.xml'
--- account_l10nbe_domiciliation/l10nbe_domiciliation_report.xml 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/l10nbe_domiciliation_report.xml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,16 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <report auto="False" id="account.account_invoices" menu="False"
5 model="account.invoice" name="account.invoice.domiciliated"
6 rml="account_l10nbe_domiciliation/report/invoice.rml"
7 string="Invoices"
8 />
9<!-- <report auto="False" id="invoice_domiciliation_save"-->
10<!-- model="account.invoice" name="invoice.domiciliation.dom"-->
11<!-- rml="account_l10nbe_domiciliation/report/domiciliations.rml"-->
12<!-- string="Rapport domiciliations" multi="True" header="False"-->
13<!-- />-->
14
15 </data>
16</openerp>
017
=== added file 'account_l10nbe_domiciliation/l10nbe_domiciliation_view.xml'
--- account_l10nbe_domiciliation/l10nbe_domiciliation_view.xml 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/l10nbe_domiciliation_view.xml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,121 @@
1<?xml version="1.0" ?>
2<openerp>
3 <data>
4<!-- Account Invoice object view (inherited) -->
5 <record model="ir.ui.view" id="invoice_form_domicile">
6 <field name="name">account.invoice.domicile.form</field>
7 <field name="type">form</field>
8 <field name="model">account.invoice</field>
9 <field name="inherit_id" ref="account.invoice_form"/>
10 <field name="arch" type="xml">
11 <field name="period_id" position="before">
12 <field name="domiciled"/>
13 <field name="domiciled_send_date"/>
14 </field>
15 </field>
16 </record>
17
18 <record model="ir.ui.view" id="invoice_form_partner_domiciled">
19 <field name="name">account.invoice.partner.domicile.form</field>
20 <field name="type">form</field>
21 <field name="model">account.invoice</field>
22 <field name="inherit_id" ref="account.invoice_form"/>
23 <field name="arch" type="xml">
24 <field name="partner_id" position="replace">
25 <field name="partner_id" on_change="on_change_partner_id(type, partner_id, date_invoice,payment_term)"/>
26 </field>
27 </field>
28 </record>
29
30
31 <record model="ir.ui.view" id="supplier_invoice_form_domicile">
32 <field name="name">supplier.invoice.domicile.form</field>
33 <field name="type">form</field>
34 <field name="model">account.invoice</field>
35 <field name="inherit_id" ref="account.invoice_supplier_form"/>
36 <field name="arch" type="xml">
37 <field name="period_id" position="before">
38 <field name="domiciled"/>
39 <field name="domiciled_send_date"/>
40 </field>
41 </field>
42 </record>
43
44
45<!-- Partner object view (inherited) -->
46 <record model="ir.ui.view" id="view_partner_domicile_form">
47 <field name="name">res.partner.domicile.form</field>
48 <field name="type">form</field>
49 <field name="model">res.partner</field>
50 <field name="inherit_id" ref="base.view_partner_form"/>
51 <field name="arch" type="xml">
52 <field name="date" position="after">
53 <field name="domiciliation"/>
54 </field>
55 </field>
56 </record>
57
58 <record model="ir.ui.view" id="view_partner_form_inherit_code">
59 <field name="name">res.partner.form.insti.code.inherit</field>
60 <field name="model">res.partner</field>
61 <field name="type">form</field>
62 <field name="inherit_id" ref="base.view_partner_form"/>
63 <field name="arch" type="xml">
64 <field name="bank" position="before">
65 <field name="institution_code" select="1"/>
66 <newline/>
67 </field>
68 </field>
69 </record>
70
71<!-- Export Logs views and menuitems-->
72
73 <record model="ir.ui.view" id="view_account_pay_tree">
74 <field name="name">invoice.export.log.tree</field>
75 <field name="model">invoice.export.log</field>
76 <field name="type">tree</field>
77 <field name="arch" type="xml">
78 <tree string="Payment Export Logs">
79 <field name="file"/>
80 <field name="create_date"/>
81 <field name="create_uid"/>
82 <field name="note"/>
83 <field name="state"/>
84 </tree>
85 </field>
86 </record>
87
88 <record model="ir.ui.view" id="view_payment_mode_form">
89 <field name="name">invoice.export.log.form</field>
90 <field name="model">invoice.export.log</field>
91 <field name="type">form</field>
92 <field name="arch" type="xml">
93 <form string="Payment Export Logs">
94 <field name="create_date" select="1"/>
95 <field name="create_uid" select="2"/>
96 <newline/>
97 <field name="file" colspan="4" select="1"/>
98 <newline/>
99 <field name="note" colspan="4"/>
100 <newline/>
101 <field name="state" select="2"/>
102 </form>
103 </field>
104 </record>
105 <record model="ir.actions.act_window" id="action_account_invoice_log_tree">
106 <field name="name">Invoice Export Logs</field>
107 <field name="res_model">invoice.export.log</field>
108 <field name="view_type">form</field>
109 <field name="view_mode">tree,form</field>
110 </record>
111
112 <menuitem
113 name="Invoice Export" parent="account.menu_finance_configuration"
114 id="menu_action_action_invoice_export" />
115
116 <menuitem
117 parent="menu_action_action_invoice_export"
118 id="menu_action_action_invoice_export_tree" action="action_account_invoice_log_tree"/>
119
120 </data>
121</openerp>
0122
=== added file 'account_l10nbe_domiciliation/l10nbe_domiciliation_wizard.xml'
--- account_l10nbe_domiciliation/l10nbe_domiciliation_wizard.xml 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/l10nbe_domiciliation_wizard.xml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,18 @@
1<?xml version="1.0"?>
2<openerp>
3 <data>
4
5 <wizard
6 string="Export Domiciliated Invoices"
7 model="account.invoice"
8 name="invoice.export.dom"
9 id="wizard_invoice_export_dom"
10 menu="False"
11 />
12
13 <menuitem name="Export Domiciliated Invoices" action="wizard_invoice_export_dom" parent="account.menu_finance_periodical_processing"
14 type="wizard" id="menu_account_coda_wizard" sequence="15"/>
15
16
17 </data>
18</openerp>
019
=== added directory 'account_l10nbe_domiciliation/report'
=== added file 'account_l10nbe_domiciliation/report/Rapport.sxw'
1Binary 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 differ20Binary 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
=== added file 'account_l10nbe_domiciliation/report/__init__.py'
--- account_l10nbe_domiciliation/report/__init__.py 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/report/__init__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,27 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
6# $Id$
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23import account_invoice
24import report_domiciliations
25
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
27
028
=== added file 'account_l10nbe_domiciliation/report/account_invoice.py'
--- account_l10nbe_domiciliation/report/account_invoice.py 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/report/account_invoice.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,37 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
6# $Id$
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23import time
24from report import report_sxw
25
26class account_invoice(report_sxw.rml_parse):
27 def __init__(self, cr, uid, name, context):
28 super(account_invoice, self).__init__(cr, uid, name, context)
29 self.localcontext.update({
30 'time': time,
31 })
32report_sxw.report_sxw(
33 'report.account.invoice.domiciliated',
34 'account.invoice',
35 'addons/account_l10nbe_domiciliation/report/invoice.rml',
36 parser=account_invoice
37)
0\ No newline at end of file38\ No newline at end of file
139
=== added file 'account_l10nbe_domiciliation/report/domiciliations.rml'
--- account_l10nbe_domiciliation/report/domiciliations.rml 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/report/domiciliations.rml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,261 @@
1<?xml version="1.0"?>
2<document filename="dom80.pdf">
3 <template pageSize="(595.0,842.0)" title="dom80" author="Martin Simon" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
6 </pageTemplate>
7 </template>
8 <stylesheet>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
12 </blockTableStyle>
13 <blockTableStyle id="Table1">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
16 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
17 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
18 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
19 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
20 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
21 </blockTableStyle>
22 <blockTableStyle id="Table3">
23 <blockAlignment value="LEFT"/>
24 <blockValign value="TOP"/>
25 </blockTableStyle>
26 <blockTableStyle id="Table4">
27 <blockAlignment value="LEFT"/>
28 <blockValign value="TOP"/>
29 <lineStyle kind="LINEBELOW" colorName="#ececec" start="0,-1" stop="4,-1"/>
30 </blockTableStyle>
31
32 <blockTableStyle id="TableH1">
33 <blockAlignment value="LEFT"/>
34 <blockValign value="TOP"/>
35 <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
36 <lineStyle kind="LINEAFTER" colorName="#000000" start="0,0" stop="0,-1"/>
37 <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
38 <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
39 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
40 <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
41 <lineStyle kind="LINEAFTER" colorName="#000000" start="2,0" stop="2,-1"/>
42 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
43 </blockTableStyle>
44
45 <blockTableStyle id="TableC1">
46 <blockAlignment value="LEFT"/>
47 <blockValign value="TOP"/>
48 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
49 <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
50 <lineStyle kind="LINEAFTER" colorName="#000000" start="0,0" stop="0,-1"/>
51 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
52 <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
53 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
54 <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,0" stop="2,-1"/>
55 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
56 <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,0" stop="3,-1"/>
57 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
58 <lineStyle kind="LINEBEFORE" colorName="#000000" start="4,0" stop="4,-1"/>
59 <lineStyle kind="LINEAFTER" colorName="#000000" start="4,0" stop="4,-1"/>
60 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
61 <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,1" stop="0,-1"/>
62 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
63 <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,1" stop="1,-1"/>
64 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
65 <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,1" stop="2,-1"/>
66 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
67 <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,1" stop="3,-1"/>
68 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
69 <lineStyle kind="LINEBEFORE" colorName="#000000" start="4,1" stop="4,-1"/>
70 <lineStyle kind="LINEAFTER" colorName="#000000" start="4,1" stop="4,-1"/>
71 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
72 <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,2" stop="0,-1"/>
73 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
74 <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,2" stop="1,-1"/>
75 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
76 <lineStyle kind="LINEBEFORE" colorName="#000000" start="2,2" stop="2,-1"/>
77 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
78 <lineStyle kind="LINEBEFORE" colorName="#000000" start="3,2" stop="3,-1"/>
79 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
80 <lineStyle kind="LINEBEFORE" colorName="#000000" start="4,2" stop="4,-1"/>
81 <lineStyle kind="LINEAFTER" colorName="#000000" start="4,2" stop="4,-1"/>
82 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
83 </blockTableStyle>
84
85 <initialize>
86 <paraStyle name="all" alignment="justify"/>
87 </initialize>
88
89 <paraStyle name="P1" fontName="Helvetica-Bold" fontSize="18.0" leading="17" alignment="CENTER"/>
90 <paraStyle name="P2" fontName="Helvetica" fontSize="15.0" leading="14" alignment="LEFT"/>
91 <paraStyle name="P3" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT"/>
92 <paraStyle name="P4" fontName="Helvetica-BoldOblique" fontSize="6.0" leading="8" alignment="LEFT"/>
93 <paraStyle name="P5" fontName="Helvetica-Oblique" fontSize="9" alignment="LEFT"/>
94 <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/>
95 <paraStyle name="P7" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
96 <paraStyle name="P8" fontName="Helvetica-BoldOblique" fontSize="8.0" leading="10" alignment="CENTER"/>
97 <paraStyle name="P9" fontName="Helvetica-BoldOblique" fontSize="8.0" leading="10" alignment="CENTER"/>
98 <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/>
99 <paraStyle name="P11" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT"/>
100 <paraStyle name="P12" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="CENTER"/>
101 <paraStyle name="P13" fontName="Helvetica-BoldOblique" fontSize="8.0" leading="10" alignment="LEFT"/>
102 <paraStyle name="P14" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT"/>
103 <paraStyle name="P15" fontName="Helvetica-BoldOblique" fontSize="2.0" leading="3" alignment="CENTER"/>
104 <paraStyle name="P16" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
105 <paraStyle name="P17" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="5.0" leading="7" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
106 <paraStyle name="P18" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
107 <paraStyle name="P19" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
108 <paraStyle name="Standard" fontName="Times-Roman"/>
109 <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
110 <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
111 <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
112 <paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
113 <paraStyle name="Index" fontName="Times-Roman"/>
114 <paraStyle name="Table Contents" fontName="Times-Roman"/>
115 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
116 <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"/>
117 <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
118 </stylesheet>
119 <images/>
120 <story>
121 <para style="P4">
122 <font color="white"> </font>
123 </para>
124 <para style="P1"><u>Liste des domiciliations préparées le [[ formatLang(time.strftime('%d-%m-%Y'),date_time = True) ]]</u></para>
125 <para style="P2">
126 <font color="white"> </font>
127 </para>
128 <para style="P2">
129 <font color="white"> </font>
130 </para>
131 <para style="P2">
132 <font color="white"> </font>
133 </para>
134 <blockTable colWidths="95.0,95.0,95.0,95.0,95.0" style="Table1">
135 <tr>
136 <td>
137 <para style="P3">Client</para>
138 </td>
139 <td>
140 <para style="P3">Numéro domiciliation</para>
141 </td>
142 <td>
143 <para style="P3">Montant (Euro)</para>
144 </td>
145 <td>
146 <para style="P3">Banque</para>
147 </td>
148 <td>
149 <para style="P3">Communication</para>
150 </td>
151 </tr>
152 </blockTable>
153 <blockTable colWidths="482.0" style="Table3">
154 <tr>
155 <td>
156 <para style="P17">[[ repeatIn(invoice_details(data['form']['inv_ids']), 'a') ]]</para>
157 <blockTable colWidths="95.0,95.0,95.0,95.0,95.0" style="Table4">
158 <tr>
159 <td>
160 <para style="P5">[[ a['client'] ]]</para>
161 </td>
162 <td>
163 <para style="P5">[[ a['number'] ]]</para>
164 </td>
165 <td>
166 <para style="P5">[[ a['amount'] ]]</para>
167 </td>
168 <td>
169 <para style="P5">[[ a['bank'] ]]</para>
170 </td>
171 <td>
172 <para style="P5">[[ a['communication'] ]]</para>
173 </td>
174 </tr>
175 </blockTable>
176 </td>
177 </tr>
178 </blockTable>
179 <para style="P16">
180 <font color="white"> </font>
181 </para>
182 <para style="P19">
183 <font color="white"> </font>
184 </para>
185 <para style="P19">
186 <font color="white"> </font>
187 </para>
188
189 <blockTable colWidths="100.0,200.0,200.0" style="TableH1">
190 <tr>
191 <td>
192 <para style="P17">[[ repeatIn(statastics_details(data['form']['account_bank_number'],data['form']['inv_ids']), 's') ]]</para>
193 </td>
194 <td>
195 <para style="P8">Banque [[ s['bank_name'] ]]</para>
196 </td>
197 <td>
198 <para style="P9">Autres banques</para>
199 </td>
200 </tr>
201 </blockTable>
202
203 <blockTable colWidths="100.0,100.0,100.0,100.0,100.0" style="TableC1">
204 <tr>
205 <td>
206 <para style="P17">[[ repeatIn(statastics_details(data['form']['account_bank_number'],data['form']['inv_ids']), 's') ]]</para>
207 </td>
208 <td>
209 <para style="P12">Nombre</para>
210 </td>
211 <td>
212 <para style="P12">Valeur totale</para>
213 </td>
214 <td>
215 <para style="P12">Nombre</para>
216 </td>
217 <td>
218 <para style="P12">Valeur totale</para>
219 </td>
220 </tr>
221 <tr>
222 <td>
223 <para style="P13">Recouvrements</para>
224 </td>
225 <td>
226 <para style="P10">[[ s['rec_bank_tot'] ]]</para>
227 </td>
228 <td>
229 <para style="P10">[[ s['rec_bank_val'] ]]</para>
230 </td>
231 <td>
232 <para style="P10">[[ s['rec_other_tot'] ]]</para>
233 </td>
234 <td>
235 <para style="P10">[[ s['rec_other_val'] ]]</para>
236 </td>
237 </tr>
238 <tr>
239 <td>
240 <para style="P13">Remboursements</para>
241 </td>
242 <td>
243 <para style="P10">[[ s['ref_bank_tot'] ]]</para>
244 </td>
245 <td>
246 <para style="P10">[[ s['ref_bank_val'] ]]</para>
247 </td>
248 <td>
249 <para style="P10">[[ s['ref_other_tot'] ]]</para>
250 </td>
251 <td>
252 <para style="P10">[[ s['ref_other_val'] ]]</para>
253 </td>
254 </tr>
255 </blockTable>
256
257 <para style="P19">
258 <font color="white"> </font>
259 </para>
260 </story>
261</document>
0262
=== added file 'account_l10nbe_domiciliation/report/invoice.rml'
--- account_l10nbe_domiciliation/report/invoice.rml 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/report/invoice.rml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,429 @@
1<?xml version="1.0"?>
2<document filename="test.pdf">
3 <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="34.0" y1="28.0" width="530" height="786"/>
6 </pageTemplate>
7 </template>
8 <stylesheet>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
12 </blockTableStyle>
13 <blockTableStyle id="Table_Partner_Address">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
16 </blockTableStyle>
17 <blockTableStyle id="Table_Invoice_General_Header">
18 <blockAlignment value="LEFT"/>
19 <blockValign value="TOP"/>
20 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
21 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
22 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
23 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
24 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
25 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
26 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
27 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
28 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
29 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
30 </blockTableStyle>
31 <blockTableStyle id="Table_General_Detail_Content">
32 <blockAlignment value="LEFT"/>
33 <blockValign value="TOP"/>
34 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
35 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
36 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
37 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
38 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
39 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
40 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
41 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
42 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
43 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
44 </blockTableStyle>
45 <blockTableStyle id="Table_Header_Invoice_Line">
46 <blockAlignment value="LEFT"/>
47 <blockValign value="TOP"/>
48 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
49 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
50 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
51 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
52 <lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
53 <lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
54 </blockTableStyle>
55 <blockTableStyle id="Table_Invoice_Line_Content">
56 <blockAlignment value="LEFT"/>
57 <blockValign value="TOP"/>
58 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
59 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
60 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
61 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
62 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="4,-1" stop="4,-1"/>
63 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="5,-1" stop="5,-1"/>
64 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="6,-1" stop="6,-1"/>
65 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="7,-1" stop="7,-1"/>
66 </blockTableStyle>
67 <blockTableStyle id="Table_Format_2">
68 <blockAlignment value="LEFT"/>
69 <blockValign value="TOP"/>
70 <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
71 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
72 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
73 <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="1,0" stop="1,-1"/>
74 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
75 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
76 <lineStyle kind="LINEAFTER" colorName="#ffffff" start="2,0" stop="2,-1"/>
77 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="2,0" stop="2,0"/>
78 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
79 <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="3,0" stop="3,-1"/>
80 <lineStyle kind="LINEAFTER" colorName="#ffffff" start="3,0" stop="3,-1"/>
81 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="3,0" stop="3,0"/>
82 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="3,-1" stop="3,-1"/>
83 <lineStyle kind="LINEABOVE" colorName="#000000" start="4,0" stop="4,0"/>
84 <lineStyle kind="LINEABOVE" colorName="#000000" start="5,0" stop="5,0"/>
85 <lineStyle kind="LINEABOVE" colorName="#000000" start="6,0" stop="6,0"/>
86 <lineStyle kind="LINEABOVE" colorName="#000000" start="10,0" stop="10,0"/>
87 <lineStyle kind="LINEABOVE" colorName="#000000" start="11,0" stop="11,0"/>
88 <lineStyle kind="LINEABOVE" colorName="#000000" start="12,0" stop="12,0"/>
89 <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,1" stop="0,-1"/>
90 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,1" stop="0,1"/>
91 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
92 <lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,1" stop="1,-1"/>
93 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,1" stop="1,1"/>
94 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
95 <lineStyle kind="LINEABOVE" colorName="#000000" start="0,2" stop="0,2"/>
96 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,2" stop="1,2"/>
97 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,2" stop="2,2"/>
98 <lineStyle kind="LINEABOVE" colorName="#000000" start="0,4" stop="0,4"/>
99 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,4" stop="1,4"/>
100 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,4" stop="2,4"/>
101 </blockTableStyle>
102 <blockTableStyle id="Table_format_Table_Line_total">
103 <blockAlignment value="LEFT"/>
104 <blockValign value="TOP"/>
105 <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
106 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
107 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
108 <lineStyle kind="LINEAFTER" colorName="#ffffff" start="1,0" stop="1,-1"/>
109 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
110 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
111 </blockTableStyle>
112 <blockTableStyle id="Table_eclu_Taxes_Total">
113 <blockAlignment value="LEFT"/>
114 <blockValign value="TOP"/>
115 <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
116 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
117 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
118 </blockTableStyle>
119 <blockTableStyle id="Table_Taxes_Total">
120 <blockAlignment value="LEFT"/>
121 <blockValign value="TOP"/>
122 </blockTableStyle>
123 <blockTableStyle id="Table_Total_Include_Taxes">
124 <blockAlignment value="LEFT"/>
125 <blockValign value="TOP"/>
126 <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
127 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
128 <lineStyle kind="LINEABOVE" colorName="#000000" start="2,0" stop="2,0"/>
129 </blockTableStyle>
130 <blockTableStyle id="Table_Main_Table">
131 <blockAlignment value="LEFT"/>
132 <blockValign value="TOP"/>
133 <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,0" stop="0,-1"/>
134 <lineStyle kind="LINEAFTER" colorName="#ffffff" start="0,0" stop="0,-1"/>
135 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
136 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
137 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
138 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
139 <lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
140 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
141 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
142 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
143 <lineStyle kind="LINEBEFORE" colorName="#ffffff" start="0,2" stop="0,-1"/>
144 <lineStyle kind="LINEAFTER" colorName="#ffffff" start="0,2" stop="0,-1"/>
145 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
146 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
147 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
148 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
149 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
150 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
151 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
152 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
153 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
154 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
155 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="3,-1" stop="3,-1"/>
156 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
157 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
158 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
159 </blockTableStyle>
160 <blockTableStyle id="Table_Tax_Header">
161 <blockAlignment value="LEFT"/>
162 <blockValign value="TOP"/>
163 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
164 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
165 <lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
166 </blockTableStyle>
167 <blockTableStyle id="Table_Tax_Content">
168 <blockAlignment value="LEFT"/>
169 <blockValign value="TOP"/>
170 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
171 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
172 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
173 </blockTableStyle>
174 <blockTableStyle id="Table_Table_Border_White">
175 <blockAlignment value="LEFT"/>
176 <blockValign value="TOP"/>
177 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,-1" stop="0,-1"/>
178 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="1,-1" stop="1,-1"/>
179 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="2,-1" stop="2,-1"/>
180 </blockTableStyle>
181 <blockTableStyle id="Table_Final_Border">
182 <blockAlignment value="LEFT"/>
183 <blockValign value="TOP"/>
184 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="0,0" stop="0,0"/>
185 <lineStyle kind="LINEABOVE" colorName="#ffffff" start="1,0" stop="1,0"/>
186 </blockTableStyle>
187 <blockTableStyle id="Table_Coment_Payment_Term">
188 <blockAlignment value="LEFT"/>
189 <blockValign value="TOP"/>
190 </blockTableStyle>
191 <blockTableStyle id="Table_Payment_Terms">
192 <blockAlignment value="LEFT"/>
193 <blockValign value="TOP"/>
194 </blockTableStyle>
195 <initialize>
196 <paraStyle name="all" alignment="justify"/>
197 </initialize>
198 <paraStyle name="Standard" fontName="Times-Roman"/>
199 <paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
200 <paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
201 <paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
202 <paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
203 <paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
204 <paraStyle name="Index" fontName="Times-Roman"/>
205 <paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
206 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
207 <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"/>
208 <paraStyle name="Footer" fontName="Times-Roman"/>
209 <paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="0.0"/>
210 <paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
211 <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
212 <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
213 <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
214 <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"/>
215 <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
216 <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
217 <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
218 <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
219 <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"/>
220 <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"/>
221 <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
222 <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
223 <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"/>
224 <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"/>
225 <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"/>
226 <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"/>
227 <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"/>
228 <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"/>
229 <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"/>
230 <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"/>
231 <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"/>
232 </stylesheet>
233 <images/>
234 <story>
235 <para style="terp_default_8">[[ repeatIn(objects,'o') ]]</para>
236 <para style="terp_default_8">[[ o.partner_id.name ]]</para>
237 <para style="terp_default_8">[[ setLang(o.partner_id.lang) ]] </para>
238 <blockTable colWidths="297.0,233.0" style="Table_Partner_Address">
239 <tr>
240 <td><para style="P8"><font color="white"> </font></para></td>
241 <td>
242 <para style="terp_default_8">[[ o.partner_id.title or '' ]] [[ o.partner_id.name ]]</para>
243 <para style="terp_default_8">[[ o.address_invoice_id.title or '' ]] [[ o.address_invoice_id.name ]]</para>
244 <para style="terp_default_8">[[ o.address_invoice_id.street ]]</para>
245 <para style="terp_default_8">[[ o.address_invoice_id.street2 or '' ]]</para>
246 <para style="terp_default_8">[[ o.address_invoice_id.zip or '' ]] [[ o.address_invoice_id.city or '' ]]</para>
247 <para style="terp_default_8">[[ o.address_invoice_id.state_id and o.address_invoice_id.state_id.name or '' ]]</para>
248 <para style="terp_default_8">[[ o.address_invoice_id.country_id and o.address_invoice_id.country_id.name or '' ]]</para>
249 <para style="P8"><font color="white"> </font></para>
250 <para style="terp_default_8">Tel. : [[ o.address_invoice_id.phone or removeParentNode('para') ]]</para>
251 <para style="terp_default_8">Fax : [[ o.address_invoice_id.fax or removeParentNode('para') ]]</para>
252 <para style="terp_default_8">VAT : [[ o.partner_id.vat or removeParentNode('para') ]]</para>
253 </td>
254 </tr>
255 </blockTable>
256 <para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
257 <para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
258 <para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
259 <para style="terp_header">Canceled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
260 <para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
261 <para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
262 <para style="terp_header">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
263 <para style="P8"><font color="white"> </font></para>
264 <blockTable colWidths="177.0,177.0,177.0" style="Table_Invoice_General_Header">
265 <tr>
266 <td><para style="terp_tblheader_General_Centre">Document</para></td>
267 <td><para style="terp_tblheader_General_Centre">Invoice Date</para></td>
268 <td><para style="terp_tblheader_General_Centre">Partner Ref.</para></td>
269 </tr>
270 </blockTable>
271 <blockTable colWidths="177.0,177.0,177.0" style="Table_General_Detail_Content">
272 <tr>
273 <td><para style="terp_default_Centre_9">[[ o.name ]]</para></td>
274 <td><para style="terp_default_Centre_9">[[ formatLang(o.date_invoice,date=True) ]]</para></td>
275 <td><para style="terp_default_Centre_9">[[ o.address_invoice_id.partner_id.ref or '' ]]</para></td>
276 </tr>
277 </blockTable>
278 <para style="P8"><font color="white"></font></para>
279 <para style="P8"><font color="white"> </font></para>
280 <blockTable colWidths="211.0,62.0,63.0,63.0,40.0,84.0" style="Table_Header_Invoice_Line">
281 <tr>
282 <td><para style="terp_tblheader_Details">Description</para></td>
283 <td><para style="terp_tblheader_Details">Taxes</para></td>
284 <td><para style="terp_tblheader_Details">Quantity</para></td>
285 <td><para style="terp_tblheader_Details_Centre">Unit Price</para></td>
286 <td><para style="terp_tblheader_Details">Disc.(%)</para></td>
287 <td><para style="terp_tblheader_Details_Centre">Price</para></td>
288 </tr>
289 </blockTable>
290 <section>
291 <para style="terp_default_8">[[ repeatIn(o.invoice_line,'l') ]]</para>
292 <blockTable colWidths="211.0,62.0,36.0,27.0,63.0,36.0,62.0,26.0" style="Table_Invoice_Line_Content">
293 <tr>
294 <td><para style="terp_default_9">[[ l.name ]]</para></td>
295 <td><para style="terp_default_9">[[ ', '.join([ lt.description or '' for lt in l.invoice_line_tax_id ]) ]]</para></td>
296 <td><para style="terp_default_Right_9">[[ formatLang(l.quantity)]]</para></td>
297 <td><para style="terp_default_Right_9">[[ (l.uos_id and l.uos_id.name) or '' ]]</para></td>
298 <td><para style="terp_default_Right_9">[[ formatLang(l.price_unit) ]]</para></td>
299 <td><para style="terp_default_Right_9">[[ formatLang(l.discount) ]] </para></td>
300 <td><para style="terp_default_Right_9">[[ formatLang(l.price_subtotal) ]]</para></td>
301 <td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
302 </tr>
303 <tr>
304 <td><para style="terp_default_Note">[[ format(l.note) or removeParentNode('tr') ]]</para></td>
305 <td><para style="terp_default_Note"><font color="white"> </font></para></td>
306 <td><para style="terp_default_Note"><font color="white"> </font></para></td>
307 <td><para style="terp_default_Note"><font color="white"> </font></para></td>
308 <td><para style="terp_default_Note"><font color="white"> </font></para></td>
309 <td><para style="terp_default_Note"><font color="white"> </font></para></td>
310 <td><para style="terp_default_Note"><font color="white"> </font></para></td>
311 <td><para style="terp_default_Note"><font color="white"> </font></para></td>
312 </tr>
313 </blockTable>
314 </section>
315 <blockTable colWidths="371.0,153.0" style="Table_Format_2">
316 <tr>
317 <td>
318 <blockTable colWidths="176.0,258.0" style="Table_format_Table_Line_total">
319 <tr>
320 <td><para style="terp_default_2"><font color="white"> </font></para></td>
321 <td><para style="terp_default_2"><font color="white"> </font></para></td>
322 </tr>
323 </blockTable>
324 </td>
325 <td>
326 <blockTable colWidths="62.0,59.0,25.0" style="Table_eclu_Taxes_Total">
327 <tr>
328 <td><para style="terp_default_Bold_9">Net Total:</para></td>
329 <td><para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]]</para></td>
330 <td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
331 </tr>
332 </blockTable>
333 <blockTable colWidths="63.0,58.0,26.0" style="Table_Taxes_Total">
334 <tr>
335 <td><para style="terp_default_Bold_9">Taxes:</para></td>
336 <td><para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]]</para></td>
337 <td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
338 </tr>
339 </blockTable>
340 <blockTable colWidths="63.0,58.0,26.0" style="Table_Total_Include_Taxes">
341 <tr>
342 <td><para style="terp_default_Bold_9">Total:</para></td>
343 <td><para style="terp_default_Right_9">[[ formatLang(o.amount_total) ]]</para></td>
344 <td><para style="terp_default_Right_9">[[ o.currency_id.code ]]</para></td>
345 </tr>
346 </blockTable>
347 </td>
348 </tr>
349 </blockTable>
350 <blockTable colWidths="530.0" style="Table_Main_Table">
351 <tr>
352 <td>
353 <blockTable colWidths="54.0,80.0,67.0" style="Table_Tax_Header">
354 <tr>
355 <td><para style="terp_tblheader_Details_Centre">Tax</para></td>
356 <td><para style="terp_tblheader_Details_Right">Base</para></td>
357 <td><para style="terp_tblheader_Details_Right">Amount</para></td>
358 </tr>
359 </blockTable>
360 </td>
361 </tr>
362 <tr>
363 <td>
364 <para style="terp_default_8">[[ repeatIn(o.tax_line,'t') ]]</para>
365 <blockTable colWidths="53.0,80.0,65.0" style="Table_Tax_Content">
366 <tr>
367 <td><para style="terp_default_Centre_8">[[ t.name ]] </para></td>
368 <td><para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para></td>
369 <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>
370 </tr>
371 </blockTable>
372 </td>
373 </tr>
374 <tr>
375 <td>
376 <blockTable colWidths="53.0,60.0,65.0" style="Table_Table_Border_White">
377 <tr>
378 <td><para style="terp_default_2"><font color="white"> </font></para></td>
379 <td><para style="terp_default_2"><font color="white"> </font></para></td>
380 <td><para style="terp_default_2"><font color="white"> </font></para></td>
381 </tr>
382 </blockTable>
383 </td>
384 </tr>
385 </blockTable>
386 <blockTable colWidths="180.0,350.0" style="Table_Final_Border">
387 <tr>
388 <td><para style="terp_default_2"><font color="white"> </font></para></td>
389 <td><para style="terp_default_2"><font color="white"> </font></para></td>
390 </tr>
391 </blockTable>
392 <blockTable colWidths="530.0" style="Table_Coment_Payment_Term">
393 <tr>
394 <td><para style="terp_default_9">[[ format(o.comment or removeParentNode('blockTable')) ]]</para></td>
395 </tr>
396 </blockTable>
397 <blockTable colWidths="530.0" style="Table_Coment_Payment_Term">
398 <tr>
399 <td><para style="terp_default_9">Domiciliated [[ ((o.domiciled== True or removeParentNode('para')) and '') ]]</para></td>
400 </tr>
401 </blockTable>
402
403 <para style="terp_default_2">
404 <font color="white"> </font>
405 </para>
406 <blockTable colWidths="530.0" style="Table_Payment_Terms">
407 <tr>
408 <td><para style="terp_default_9">[[ format((o.payment_term and o.payment_term.note) or removeParentNode('blockTable')) ]]</para></td>
409 </tr>
410 </blockTable>
411 <para style="terp_default_2">
412 <font color="white"> </font>
413 </para>
414 <blockTable colWidths="128.0,402.0" style="Standard_Outline">
415 <tr>
416 <td>
417 <para style="terp_default_Bold_9">Fiscal Position Remark :</para>
418 </td>
419 <td>
420 <para style="terp_default_9">[[ format(o.fiscal_position and o.fiscal_position.note or removeParentNode('blockTable')) ]]</para>
421 </td>
422 </tr>
423 </blockTable>
424 <para style="terp_default_2">
425 <font color="white"> </font>
426 </para>
427
428 </story>
429</document>
0430
=== added file 'account_l10nbe_domiciliation/report/invoice.sxw'
1Binary 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 differ431Binary 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
=== added file 'account_l10nbe_domiciliation/report/report_domiciliations.py'
--- account_l10nbe_domiciliation/report/report_domiciliations.py 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/report/report_domiciliations.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,121 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
6# $Id$
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23import time
24from report import report_sxw
25from osv import osv
26
27class invoice_domiciliations(report_sxw.rml_parse):
28 def __init__(self, cr, uid, name, context):
29 super(invoice_domiciliations, self).__init__(cr, uid, name, context)
30 self.localcontext.update({
31 'time': time,
32 'invoice_details' : self._get_invoice_details,
33 'statastics_details' : self._statastics_details,
34 })
35
36 def _get_invoice_details(self, inv_ids):
37 lines = []
38 inv_obj = self.pool.get('account.invoice')
39 for inv in inv_obj.browse(self.cr, self.uid, inv_ids):
40 res = {}
41 res['client'] = inv.partner_id.name
42 res['number'] = inv.partner_id.domiciliation
43 res['bank'] = inv.partner_bank and inv.partner_bank.name or ''
44 res['amount'] = (inv.type == 'out_refund') and -inv.residual or inv.residual
45 res['communication'] = inv.name or ''
46 lines.append(res)
47 return lines
48
49 def _statastics_details(self, bank_account_id, inv_ids):
50 lines = []
51 datas = ['rec_bank_tot', 'rec_bank_val', 'ref_bank_tot', 'ref_bank_val' , \
52 'rec_other_tot', 'rec_other_val', 'ref_other_tot', 'ref_other_val' ]
53 res = {}
54 user = self.pool.get('res.users').browse(self.cr, self.uid, self.uid)
55 bank = self.pool.get('res.partner.bank').browse(self.cr, self.uid, bank_account_id)
56 res['bank_name'] = ''
57 if not bank.bank:
58 bank_id = '0'
59 else:
60 bank_id = str(bank.bank.id)
61 res['bank_name'] = bank.bank.name
62 invoice_ids = ','.join(map(str,inv_ids))
63 self.cr.execute("select count(ai.id) as tot, coalesce(sum(residual),0)as val from account_invoice ai \
64 join res_partner_bank rpb on (ai.partner_bank=rpb.id)\
65 join res_bank bank on (rpb.bank=bank.id)\
66 where bank.id =%s \
67 and type not like '%%refund' \
68 and ai.id in (%s)" % (bank_id,invoice_ids))
69 val1= self.cr.dictfetchall()
70 if val1:
71 res['rec_bank_tot'] = val1[0]['tot'] # 1
72 res['rec_bank_val'] = val1[0]['val'] # 2
73
74 self.cr.execute("select count(ai.id) as tot, coalesce(sum(residual),0)as val from account_invoice ai \
75 join res_partner_bank rpb on (ai.partner_bank=rpb.id)\
76 join res_bank bank on (rpb.bank=bank.id)\
77 where bank.id =%s \
78 and type like '%%refund' \
79 and ai.id in (%s)" % (bank_id,invoice_ids))
80
81 val2= self.cr.dictfetchall()
82 if val2:
83 res['ref_bank_tot'] = val2[0]['tot'] # 5
84 res['ref_bank_val'] = val2[0]['val'] # 6
85
86 self.cr.execute("select count(ai.id) as tot, coalesce(sum(residual),0)as val from account_invoice ai \
87 join res_partner_bank rpb on (ai.partner_bank=rpb.id)\
88 join res_bank bank on (rpb.bank=bank.id)\
89 where bank.id !=%s \
90 and type not like '%%refund' \
91 and ai.id in (%s)" % (bank_id,invoice_ids))
92 val3= self.cr.dictfetchall()
93 if val3:
94 res['rec_other_tot'] = val3[0]['tot'] # 3
95 res['rec_other_val'] = val3[0]['val'] # 4
96
97 self.cr.execute("select count(ai.id) as tot, coalesce(sum(residual),0)as val from account_invoice ai \
98 join res_partner_bank rpb on (ai.partner_bank=rpb.id)\
99 join res_bank bank on (rpb.bank=bank.id)\
100 where bank.id !=%s \
101 and type like '%%refund' \
102 and ai.id in (%s)" % (bank_id,invoice_ids))
103 val4= self.cr.dictfetchall()
104 if val4:
105 res['ref_other_tot'] = val4[0]['tot'] # 7
106 res['ref_other_val'] = val4[0]['val'] # 8
107
108 for d in datas:
109 res.setdefault(0.0)
110
111 lines.append(res)
112 return lines
113
114report_sxw.report_sxw(
115 'report.invoice.domiciliation.dom',
116 'account.invoice',
117 'addons/account_l10nbe_domiciliation/report/domiciliations.rml',
118 parser=invoice_domiciliations, header=False
119)
120
121# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0122
=== added directory 'account_l10nbe_domiciliation/wizard'
=== added file 'account_l10nbe_domiciliation/wizard/__init__.py'
--- account_l10nbe_domiciliation/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/wizard/__init__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,26 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
6# $Id$
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23import export_invoice
24
25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
26
027
=== added file 'account_l10nbe_domiciliation/wizard/export_invoice.py'
--- account_l10nbe_domiciliation/wizard/export_invoice.py 1970-01-01 00:00:00 +0000
+++ account_l10nbe_domiciliation/wizard/export_invoice.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,382 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
6# $Id$
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22import pooler
23import wizard
24import base64
25from osv import osv
26import time
27from tools.translate import _
28
29form = """<?xml version="1.0"?>
30<form string="Export Invoices">
31<separator string="Export invoice to DOM80 format" colspan="4" />
32 <field name="ref_file" colspan="4" />
33 <field name="collection_date" colspan="4" />
34 <field name="account_bank_number" colspan="4" />
35 <field name="sender" colspan="4" />
36 <field name="credit_note" colspan="4" />
37</form>"""
38
39fields = {
40 'ref_file' : {
41 'string':'Reference of the file',
42 'type':'char',
43 'size' : 10,
44 'help' : "Reference of the file, Used for Dom80 header",
45 'required': True,
46 },
47 'collection_date' : {
48 'string':'Collection Date',
49 'type':'date',
50 'required': True,
51 'default' : time.strftime('%Y-%m-%d'),
52 'help' : "Requested collection date"
53 },
54 'sender': {
55 'string': 'Document Sender',
56 'type': 'many2one',
57 'relation': 'res.partner',
58 'help': 'This field have to be filled in cases where the sender is different from the creditor'
59 },
60 'account_bank_number': {
61 'string': 'Account Bank Number',
62 'type': 'many2one',
63 'relation': 'res.partner.bank',
64 'help': 'Select here the creditor account number',
65 'domain': "[('state','=','bank'),('partner_id','=',1)]", #to improve: partner of the company of the uid
66 'required': True
67 },
68 'credit_note': {
69 'string': 'With Credit Note?',
70 'type': 'boolean',
71 'help': 'Check if you want to export credit note'
72 },
73
74 }
75
76save_form = """<?xml version="1.0"?>
77<form string="Save File...">
78 <field name="invoice_file"/>
79 <separator string="Note" colspan="4" />
80 <field name="note" colspan="4" nolabel="1" readonly="1"/>
81 </form>"""
82
83save_fields = {
84 'invoice_file' : {
85 'string':'Export File',
86 'type':'binary',
87 'required': False,
88 'readonly':True,
89 },
90 'note' : {'string':'Log', 'type':'text'},
91}
92
93trans=[(u'ᅢᄅ', 'e'),
94 (u'ᅢᄄ', 'e'),
95 (u'ᅢᅠ', 'a'),
96 (u'ᅢᆰ', 'e'),
97 (u'ᅢᆴ', 'i'),
98 (u'ᅢᆵ', 'i'),
99 (u'ᅢᄁ', 'a'),
100 (u'ᅢᄂ', 'a')]
101
102def tr(s):
103 s= s.decode('utf-8')
104 for k in trans:
105 s = s.replace(k[0], k[1])
106 try:
107 res= s.encode('ascii', 'replace')
108 except:
109 res = s
110 return res
111
112class record:
113 def __init__(self, global_context_dict):
114
115 for i in global_context_dict:
116 global_context_dict[i]= global_context_dict[i] and tr(global_context_dict[i])
117 self.fields = []
118 self.global_values = global_context_dict
119 self.pre={'padding':'', 'seg_num1':'0', 'seg_num2':'1',
120 'seg_num3':'1', 'seg_num4':'1', 'seg_num5':'1', 'seg_num8':'1', 'seg_num_t':'9',
121 'flag':'0', 'flag1':'\n'
122 }
123 self.init_local_context()
124
125 def init_local_context(self):
126 """
127 Must instanciate a fields list, field = (name,size)
128 and update a local_values dict.
129 """
130 raise "not implemented"
131
132 def generate(self):
133 res=''
134 value=0
135 go=True
136 for field in self.fields :
137 if self.pre.has_key(field[0]):
138 value = self.pre[field[0]]
139 elif self.global_values.has_key(field[0]):
140 value = self.global_values[field[0]]
141 else :
142 continue
143 #raise Exception(field[0]+' not found !')
144 try:
145 res = res + c_ljust(value, field[1])
146 except :
147 pass
148
149 return res
150
151class record_header(record):
152 def init_local_context(self):
153 self.fields=[
154 #Header record start
155 ('identification', 1),
156 ('zeros', 4), ('creation_date', 6),
157 ('institution_code', 3), ('app_code', 2), ('ref_file', 10), ('id_sender', 11), ('id_creditor', 11),
158 ('acc_num_creditor', 12), ('version_code', 1), ('if_duplicate', 1), ('collection_date', 6), ('blanks', 60)
159 ]
160
161class record_trailer(record):
162 def init_local_context(self):
163 self.fields=[
164 #Trailer record start
165 ('identification', 1),
166 ('tot_collection', 4), ('tot_amount_collection', 12) ,
167 ('tot_collection_direct_debit_num', 15),
168 ('tot_reversal_inst', 4), ('tot_amount_reversal_inst', 12),
169 ('tot_reversal_direct_debit_num', 15),
170 ('blanks', 65),
171 ]
172
173class record_invoice_data(record):
174 def init_local_context(self):
175 self.fields=[
176 ('identification', 1), ('serial_num', 4), ('direct_debit_num', 12),
177 ('type_code', 1),
178 ('amount_collection', 12), ('creditor', 26), ('msg_payer_1', 15),
179 ('msg_payer_2', 15), ('creditor_ref', 12), ('blanks', 30),
180 ]
181
182def c_ljust(s, size):
183 """
184 check before calling ljust
185 """
186 s= s or ''
187 if len(s) > size:
188 s= s[:size]
189 s = s.decode('utf-8').encode('latin1', 'replace').ljust(size)
190 return s
191
192class Log:
193 def __init__(self):
194 self.content= ""
195 self.error= False
196 def add(self, s, error=True):
197 self.content= self.content + s
198 if error:
199 self.error= error
200 def __call__(self):
201 return self.content
202
203def _create_file(self, cr, uid, data, context):
204 v1 = {}
205 v2 = {}
206 v3 = {}
207 log=''
208 log = Log()
209 blank_space = ' '
210
211 seq = 0
212 inv_seq = 0
213 total = 0
214 inv_total = 0
215 invoice_data = ''
216
217 pool = pooler.get_pool(cr.dbname)
218 partner_obj = pool.get('res.partner')
219 bank_obj = pool.get('res.partner.bank')
220 invoice_obj = pool.get('account.invoice')
221 obj_cmpny = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid).company_id
222
223 #Header Record Start
224
225 v1['identification']='0' #1
226 v1['zeros']='0000' # 2-5
227 v1['creation_date']= time.strftime('%d%m%y') #6-11
228 code = bank_obj.browse(cr, uid, data['form']['account_bank_number']).institution_code
229 if not code:
230 return {'note':_('Please provide Institution Code number for the bank of the creditor.'), 'invoice_file': False, 'state':'' }
231
232 v1['institution_code'] = code # 12-14
233 v1['app_code']= '02' # 15-16
234 v1['ref_file']= data['form']['ref_file'] or '' # 17-26
235
236 id_creditor = obj_cmpny.partner_id.vat
237 if not id_creditor:
238 return {'note': _('Please Provide VAT number for the creditor.'), 'invoice_file': False, 'state':'failed' }
239 v1['id_creditor']= '0' + id_creditor[-10:]
240
241 sender_rec = data['form']['sender'] and partner_obj.browse(cr, uid, data['form']['sender']) or obj_cmpny.partner_id
242 id_sender = sender_rec.vat
243 if not id_sender:
244 return {'note': _('Please Provide VAT number for the Sender.'), 'invoice_file': False, 'state':'failed' }
245 v1['id_sender']= '0' + id_sender[-10:] # 27-37
246
247 #Taken bank account num of main company
248 partner_bank = bank_obj.browse(cr, uid, data['form']['account_bank_number']).acc_number
249
250 if partner_bank:
251 v1['acc_num_creditor'] = partner_bank
252 else:
253 return {'note':_('Please Provide Bank number for the creditor.'), 'invoice_file': False, 'state':'failed' }
254
255 v1['version_code']='5' #61
256 v1['if_duplicate']=' ' # 62
257 collection_date = time.strptime(data['form']['collection_date'], '%Y-%m-%d')
258 v1['collection_date'] = time.strftime('%d%m%y', collection_date)
259 v1['blanks'] = ' '*60
260 file_header =record_header(v1).generate()
261 #Header Record End
262
263 #Data Record Start
264 direct_debit_num_tot = 0
265 inv_direct_debit_num_tot = 0
266 if data['form']['credit_note']:
267 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'")
268 else:
269 cr.execute("select id from account_invoice where domiciled=True and domiciled_send_date is null and type in('out_invoice') and state ='open'")
270
271 inv_ids = map(lambda x:x[0], cr.fetchall())
272 if not inv_ids:
273 return {'note': _('There is no no invoices to export'), 'invoice_file': False, 'state':'failed' }
274
275 collected_invoice_ids = []
276 for inv in invoice_obj.browse(cr, uid, inv_ids):
277 seq=seq+1
278 v2['identification'] = '1'
279 v2['serial_num'] = str(seq)[-4:].rjust(4, '0')
280 v2['direct_debit_num'] = inv.partner_id.domiciliation
281 v2['amount_collection'] = (('%.2f' % inv.residual).replace('.', '')).rjust(12, '0')
282 v2['msg_payer_1'] = inv.name
283 v2['msg_payer_2'] = ''
284 v2['creditor_ref' ] = '0' * 12
285 v2['blanks' ] = ' ' * 30
286
287 if inv.type == 'out_refund':
288 v2['type_code'] = '1'
289 inv_total += inv.residual
290 inv_seq += 1
291 inv_direct_debit_num_tot += int(v2['direct_debit_num'])
292 v2['creditor'] = inv.partner_id.name
293 else:
294 total += inv.residual
295 direct_debit_num_tot += int(v2['direct_debit_num'])
296 v2['type_code'] = '0'
297 v2['creditor'] = obj_cmpny.partner_id.name#inv.partner_id.name#.ljust(26 , ' ')
298
299 invoice_data = invoice_data+ '\n' + record_invoice_data(v2).generate()
300 collected_invoice_ids.append(inv.id)
301 #Data Record End
302
303 #Trailer Record Start
304 v3['identification'] = '9'
305 v3['tot_collection'] = str(seq-inv_seq).rjust(4, '0')
306 v3['tot_amount_collection'] = (('%.2f' % total).replace('.', '')).rjust(12, '0')
307 v3['tot_collection_direct_debit_num'] = str(direct_debit_num_tot).rjust(15, '0')
308
309 v3['tot_reversal_inst'] = str(inv_seq).rjust(4, '0')
310 v3['tot_amount_reversal_inst'] = (('%.2f' % inv_total).replace('.','')).rjust(12, '0')
311 v3['tot_reversal_direct_debit_num'] = str(inv_direct_debit_num_tot).rjust(15, '0')
312
313 v3['blanks' ] = ' ' * 65
314
315 file_trailer = '\n' + record_trailer(v3).generate()
316
317 #Trailer Record End
318
319 dom_data = file_header + invoice_data + file_trailer
320 log.add("Successfully Exported\n--------------------\nSummary:\n\nTotal amount collected : %.2f \nTotal Number of collection : %d \n-------------------- " %(total, seq))
321 invoice_obj.write(cr, uid, collected_invoice_ids,{'domiciled_send_date': time.strftime('%Y-%m-%d')},context=context)
322 return {'note':log(), 'invoice_file': base64.encodestring(dom_data), 'state':'succeeded', 'inv_ids':collected_invoice_ids}
323
324
325def float2str(lst):
326 return str(lst).rjust(16).replace('.', '')
327
328def _log_create(self, cr, uid, data, context):
329 pool = pooler.get_pool(cr.dbname)
330 pool.get('invoice.export.log').create(cr, uid, {
331 'note': data['form']['note'],
332 'file': data['form']['invoice_file'] and data['form']['invoice_file'] or False,
333 'state': data['form']['state'],
334 })
335
336 return {}
337
338def _check(self, cr, uid, data, context):
339 if data['form']['state'] == 'failed':
340 return 'failed'
341 return 'close'
342
343class wizard_pay_create(wizard.interface):
344
345 states = {
346 'init' : {
347 'actions' : [],
348 'result' : {'type' : 'form',
349 'arch' : form,
350 'fields' : fields,
351 'state' : [('end', 'Cancel'), ('export', 'Export') ]}
352 },
353 'export' : {
354 'actions' : [_create_file],
355 'result' : {'type' : 'form',
356 'arch' : save_form,
357 'fields' : save_fields,
358 'state' : [('next_state_check', 'Ok', 'gtk-ok') ]}
359 },
360 'next_state_check': {
361 'actions': [_log_create],
362 'result' : {'type': 'choice', 'next_state': _check }
363 },
364 'failed': {
365 'actions': [],
366 'result': {'type': 'state', 'state':'end'}
367 },
368
369 'close': {
370 'actions': [],
371 'result': {'type': 'state', 'state':'report'}
372 },
373 'report': {
374 'actions': [],
375 'result': {'type':'print', 'report':'invoice.domiciliation.dom', 'state':'end'}
376 }
377 }
378wizard_pay_create('invoice.export.dom')
379
380# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
381
382
0383
=== added directory 'account_report_aged_partner_balance_v6'
=== added file 'account_report_aged_partner_balance_v6/__init__.py'
--- account_report_aged_partner_balance_v6/__init__.py 1970-01-01 00:00:00 +0000
+++ account_report_aged_partner_balance_v6/__init__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,26 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import account_move_line
23import wizard
24import report
25
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
027
=== added file 'account_report_aged_partner_balance_v6/__terp__.py'
--- account_report_aged_partner_balance_v6/__terp__.py 1970-01-01 00:00:00 +0000
+++ account_report_aged_partner_balance_v6/__terp__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,42 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22
23{
24 'name': 'Backport of the accounting report \'aged partner balance\' of v6',
25 'version': '1.1',
26 'category': 'Generic Modules/Accounting',
27 '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.
28 """,
29 'author': 'OpenERP SA',
30 'website': 'http://www.openerp.com',
31 'depends': ['account', 'account_report_bs_pl'],
32 'init_xml': [],
33 'update_xml': [
34 'wizard/account_report_aged_partner_balance_view.xml',
35 ],
36 'demo_xml': [],
37 'test': [],
38 'installable': True,
39 'active': False,
40 'certificate': '00544170409926159389',
41}
42# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
043
=== added file 'account_report_aged_partner_balance_v6/account_move_line.py'
--- account_report_aged_partner_balance_v6/account_move_line.py 1970-01-01 00:00:00 +0000
+++ account_report_aged_partner_balance_v6/account_move_line.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,136 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from osv import fields, osv
23
24class account_account(osv.osv):
25 _inherit = "account.account"
26
27 def _get_level(self, cr, uid, ids, field_name, arg, context={}):
28 res={}
29 accounts = self.browse(cr, uid, ids)
30 for account in accounts:
31 level = 0
32 if account.parent_id:
33 obj = self.browse(cr, uid, account.parent_id.id)
34 level = obj.level + 1
35 res[account.id] = level
36 return res
37
38 _columns = {
39 'level': fields.function(_get_level, string='Level', method=True, store=True, type='integer'),
40 }
41account_account()
42
43#modifications on class account_period and account_move_line are deprecated because of code in account_report_bs_pl module
44#class account_period(osv.osv):
45# _inherit = "account.period"
46#
47# def build_ctx_periods(self, cr, uid, period_from_id, period_to_id):
48# period_from = self.browse(cr, uid, period_from_id)
49# period_date_start = period_from.date_start
50# #company1_id = period_from.company_id and period_from.company_id.id or False
51# period_to = self.browse(cr, uid, period_to_id)
52# period_date_stop = period_to.date_stop
53# #company2_id = period_to.company_id and period_from.company_id.id or False
54# #if company1_id != company2_id:
55# # raise osv.except_osv(_('Error'), _('You should have chosen periods that belongs to the same company'))
56# if period_date_start > period_date_stop:
57# raise osv.except_osv(_('Error'), _('Start period should be smaller then End period'))
58# return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop),])# ('company_id', '=', company1_id)])
59#account_period()
60#
61#class account_move_line(osv.osv):
62# _inherit = "account.move.line"
63#
64# def _query_get(self, cr, uid, obj='l', context=None):
65# fiscalyear_obj = self.pool.get('account.fiscalyear')
66# fiscalperiod_obj = self.pool.get('account.period')
67# account_obj = self.pool.get('account.account')
68# fiscalyear_ids = []
69# if context is None:
70# context = {}
71# initial_bal = context.get('initial_bal', False)
72# company_clause = " "
73# if context.get('company_id', False):
74# company_clause = " AND " +obj+".company_id = %s" % context.get('company_id', False)
75# if not context.get('fiscalyear', False):
76# if context.get('all_fiscalyear', False):
77# #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
78# fiscalyear_ids = fiscalyear_obj.search(cr, uid, [])
79# else:
80# fiscalyear_ids = fiscalyear_obj.search(cr, uid, [('state', '=', 'draft')])
81# else:
82# #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
83# fiscalyear_ids = [context['fiscalyear']]
84#
85# fiscalyear_clause = (','.join([str(x) for x in fiscalyear_ids])) or '0'
86# state = context.get('state', False)
87# where_move_state = ''
88# where_move_lines_by_date = ''
89#
90# if context.get('date_from', False) and context.get('date_to', False):
91# if initial_bal:
92# where_move_lines_by_date = " AND " +obj+".move_id IN (SELECT id FROM account_move WHERE date < '" +context['date_from']+"')"
93# else:
94# 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']+"')"
95#
96# if state:
97# if state.lower() not in ['all']:
98# where_move_state= " AND "+obj+".move_id IN (SELECT id FROM account_move WHERE account_move.state = '"+state+"')"
99#
100# if context.get('period_from', False) and context.get('period_to', False) and not context.get('periods', False):
101# if initial_bal:
102# period_company_id = fiscalperiod_obj.browse(cr, uid, context['period_from'], context=context).company_id.id
103# first_period = fiscalperiod_obj.search(cr, uid, [('company_id', '=', period_company_id)], order='date_start', limit=1)[0]
104# context['periods'] = fiscalperiod_obj.build_ctx_periods(cr, uid, first_period, context['period_from'])
105# else:
106# context['periods'] = fiscalperiod_obj.build_ctx_periods(cr, uid, context['period_from'], context['period_to'])
107# if context.get('periods', False):
108# if initial_bal:
109# 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)
110# period_ids = fiscalperiod_obj.search(cr, uid, [('id', 'in', context['periods'])], order='date_start', limit=1)
111# if period_ids and period_ids[0]:
112# first_period = fiscalperiod_obj.browse(cr, uid, period_ids[0], context=context)
113# # Find the old periods where date start of those periods less then Start period
114# periods = fiscalperiod_obj.search(cr, uid, [('date_start', '<', first_period.date_start)])
115# periods = ','.join([str(x) for x in periods])
116# if periods:
117# 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)
118# else:
119# ids = ','.join([str(x) for x in context['periods']])
120# 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)
121# else:
122# 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)
123#
124# if context.get('journal_ids', False):
125# query += ' AND '+obj+'.journal_id IN (%s)' % ','.join(map(str, context['journal_ids']))
126#
127# if context.get('chart_account_id', False):
128# child_ids = account_obj._get_children_and_consol(cr, uid, [context['chart_account_id']], context=context)
129# query += ' AND '+obj+'.account_id IN (%s)' % ','.join(map(str, child_ids))
130#
131# query += company_clause
132#
133# return query
134#account_move_line()
135
136# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0137
=== added directory 'account_report_aged_partner_balance_v6/report'
=== added file 'account_report_aged_partner_balance_v6/report/__init__.py'
--- account_report_aged_partner_balance_v6/report/__init__.py 1970-01-01 00:00:00 +0000
+++ account_report_aged_partner_balance_v6/report/__init__.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,23 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21import common_report_header
22import account_aged_partner_balance
23# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
024
=== added file 'account_report_aged_partner_balance_v6/report/account_aged_partner_balance.py'
--- account_report_aged_partner_balance_v6/report/account_aged_partner_balance.py 1970-01-01 00:00:00 +0000
+++ account_report_aged_partner_balance_v6/report/account_aged_partner_balance.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,382 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from report import report_sxw
24from common_report_header import common_report_header
25
26class aged_trial_report(report_sxw.rml_parse, common_report_header):
27
28 def __init__(self, cr, uid, name, context):
29 super(aged_trial_report, self).__init__(cr, uid, name, context=context)
30 print "v6 report"
31 self.total_account = []
32 self.localcontext.update({
33 'time': time,
34 'get_lines_with_out_partner': self._get_lines_with_out_partner,
35 'get_lines': self._get_lines,
36 'get_total': self._get_total,
37 'get_direction': self._get_direction,
38 'get_for_period': self._get_for_period,
39 'get_company': self._get_company,
40 'get_currency': self._get_currency,
41 'get_partners':self._get_partners,
42 'get_account': self._get_account,
43 'get_fiscalyear': self._get_fiscalyear,
44 'get_target_move': self._get_target_move,
45 })
46
47 def set_context(self, objects, data, ids, report_type=None):
48 obj_move = self.pool.get('account.move.line')
49 ctx = data['form'].get('used_context', {})
50 ctx.update({'fiscalyear': False, 'all_fiscalyear': True})
51 self.query = obj_move._query_get(self.cr, self.uid, obj='l', context=ctx)
52 self.direction_selection = data['form'].get('direction_selection', 'past')
53 self.target_move = data['form'].get('target_move', 'all')
54 self.date_from = data['form'].get('date_from', time.strftime('%Y-%m-%d'))
55 if (data['form']['result_selection'] == 'customer' ):
56 self.ACCOUNT_TYPE = ['receivable']
57 elif (data['form']['result_selection'] == 'supplier'):
58 self.ACCOUNT_TYPE = ['payable']
59 else:
60 self.ACCOUNT_TYPE = ['payable','receivable']
61 return super(aged_trial_report, self).set_context(objects, data, ids, report_type=report_type)
62
63 def _get_lines(self, form):
64 res = []
65 move_state = ['draft','posted']
66 if self.target_move == 'posted':
67 move_state = ['posted']
68 self.cr.execute('SELECT DISTINCT res_partner.id AS id,\
69 res_partner.name AS name \
70 FROM res_partner,account_move_line AS l, account_account, account_move am\
71 WHERE (l.account_id=account_account.id) \
72 AND (l.move_id=am.id) \
73 AND (am.state IN %s)\
74 AND (account_account.type IN %s)\
75 AND account_account.active\
76 AND ((reconcile_id IS NULL)\
77 OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
78 AND (l.partner_id=res_partner.id)\
79 AND (l.date <= %s)\
80 AND ' + self.query + ' \
81 ORDER BY res_partner.name', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from,))
82 partners = self.cr.dictfetchall()
83 ## mise a 0 du total
84 for i in range(7):
85 self.total_account.append(0)
86 #
87 # Build a string like (1,2,3) for easy use in SQL query
88 partner_ids = [x['id'] for x in partners]
89 if not partner_ids:
90 return []
91 # This dictionary will store the debit-credit for all partners, using partner_id as key.
92
93 totals = {}
94 self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit) \
95 FROM account_move_line AS l, account_account, account_move am \
96 WHERE (l.account_id = account_account.id) AND (l.move_id=am.id) \
97 AND (am.state IN %s)\
98 AND (account_account.type IN %s)\
99 AND (l.partner_id IN %s)\
100 AND ((l.reconcile_id IS NULL)\
101 OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
102 AND ' + self.query + '\
103 AND account_account.active\
104 AND (l.date <= %s)\
105 GROUP BY l.partner_id ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from, self.date_from,))
106 t = self.cr.fetchall()
107 for i in t:
108 totals[i[0]] = i[1]
109
110 # This dictionary will store the future or past of all partners
111 future_past = {}
112 if self.direction_selection == 'future':
113 self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit) \
114 FROM account_move_line AS l, account_account, account_move am \
115 WHERE (l.account_id=account_account.id) AND (l.move_id=am.id) \
116 AND (am.state IN %s)\
117 AND (account_account.type IN %s)\
118 AND (COALESCE(l.date_maturity, l.date) < %s)\
119 AND (l.partner_id IN %s)\
120 AND ((l.reconcile_id IS NULL)\
121 OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
122 AND '+ self.query + '\
123 AND account_account.active\
124 AND (l.date <= %s)\
125 GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids),self.date_from, self.date_from,))
126 t = self.cr.fetchall()
127 for i in t:
128 future_past[i[0]] = i[1]
129 elif self.direction_selection == 'past': # Using elif so people could extend without this breaking
130 self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit) \
131 FROM account_move_line AS l, account_account, account_move am \
132 WHERE (l.account_id=account_account.id) AND (l.move_id=am.id)\
133 AND (am.state IN %s)\
134 AND (account_account.type IN %s)\
135 AND (COALESCE(l.date_maturity,l.date) > %s)\
136 AND (l.partner_id IN %s)\
137 AND ((l.reconcile_id IS NULL)\
138 OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
139 AND '+ self.query + '\
140 AND account_account.active\
141 AND (l.date <= %s)\
142 GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from, self.date_from,))
143 t = self.cr.fetchall()
144 for i in t:
145 future_past[i[0]] = i[1]
146
147 # Use one query per period and store results in history (a list variable)
148 # Each history will contain: history[1] = {'<partner_id>': <partner_debit-credit>}
149 history = []
150 for i in range(5):
151 args_list = (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids),self.date_from,)
152 dates_query = '(COALESCE(l.date_maturity,l.date)'
153 if form[str(i)]['start'] and form[str(i)]['stop']:
154 dates_query += ' BETWEEN %s AND %s)'
155 args_list += (form[str(i)]['start'], form[str(i)]['stop'])
156 elif form[str(i)]['start']:
157 dates_query += ' > %s)'
158 args_list += (form[str(i)]['start'],)
159 else:
160 dates_query += ' < %s)'
161 args_list += (form[str(i)]['stop'],)
162 args_list += (self.date_from,)
163 self.cr.execute('''SELECT l.partner_id, SUM(l.debit-l.credit)
164 FROM account_move_line AS l, account_account, account_move am
165 WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)
166 AND (am.state IN %s)
167 AND (account_account.type IN %s)
168 AND (l.partner_id IN %s)
169 AND ((l.reconcile_id IS NULL)
170 OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))
171 AND ''' + self.query + '''
172 AND account_account.active
173 AND ''' + dates_query + '''
174 AND (l.date <= %s)
175 GROUP BY l.partner_id''', args_list)
176 t = self.cr.fetchall()
177 d = {}
178 for i in t:
179 d[i[0]] = i[1]
180 history.append(d)
181
182 for partner in partners:
183 values = {}
184 ## If choise selection is in the future
185 if self.direction_selection == 'future':
186 # Query here is replaced by one query which gets the all the partners their 'before' value
187 before = False
188 if future_past.has_key(partner['id']):
189 before = [ future_past[partner['id']] ]
190 self.total_account[6] = self.total_account[6] + (before and before[0] or 0.0)
191 values['direction'] = before and before[0] or 0.0
192 elif self.direction_selection == 'past': # Changed this so people could in the future create new direction_selections
193 # Query here is replaced by one query which gets the all the partners their 'after' value
194 after = False
195 if future_past.has_key(partner['id']): # Making sure this partner actually was found by the query
196 after = [ future_past[partner['id']] ]
197
198 self.total_account[6] = self.total_account[6] + (after and after[0] or 0.0)
199 values['direction'] = after and after[0] or 0.0
200
201 for i in range(5):
202 during = False
203 if history[i].has_key(partner['id']):
204 during = [ history[i][partner['id']] ]
205 # Ajout du compteur
206 self.total_account[(i)] = self.total_account[(i)] + (during and during[0] or 0)
207 values[str(i)] = during and during[0] or 0.0
208 total = False
209 if totals.has_key( partner['id'] ):
210 total = [ totals[partner['id']] ]
211 values['total'] = total and total[0] or 0.0
212 ## Add for total
213 self.total_account[(i+1)] = self.total_account[(i+1)] + (total and total[0] or 0.0)
214 values['name'] = partner['name']
215
216 res.append(values)
217
218 total = 0.0
219 totals = {}
220 for r in res:
221 total += float(r['total'] or 0.0)
222 for i in range(5)+['direction']:
223 totals.setdefault(str(i), 0.0)
224 totals[str(i)] += float(r[str(i)] or 0.0)
225 return res
226
227 def _get_lines_with_out_partner(self, form):
228 res = []
229 move_state = ['draft','posted']
230 if self.target_move == 'posted':
231 move_state = ['posted']
232
233 ## mise a 0 du total
234 for i in range(7):
235 self.total_account.append(0)
236 totals = {}
237 self.cr.execute('SELECT SUM(l.debit-l.credit) \
238 FROM account_move_line AS l, account_account, account_move am \
239 WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\
240 AND (am.state IN %s)\
241 AND (l.partner_id IS NULL)\
242 AND (account_account.type IN %s)\
243 AND ((l.reconcile_id IS NULL) \
244 OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
245 AND ' + self.query + '\
246 AND (l.date <= %s)\
247 AND account_account.active ',(tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from,))
248 t = self.cr.fetchall()
249 for i in t:
250 totals['Unknown Partner'] = i[0]
251 future_past = {}
252 if self.direction_selection == 'future':
253 self.cr.execute('SELECT SUM(l.debit-l.credit) \
254 FROM account_move_line AS l, account_account, account_move am\
255 WHERE (l.account_id=account_account.id) AND (l.move_id=am.id)\
256 AND (am.state IN %s)\
257 AND (l.partner_id IS NULL)\
258 AND (account_account.type IN %s)\
259 AND (COALESCE(l.date_maturity, l.date) < %s)\
260 AND ((l.reconcile_id IS NULL)\
261 OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
262 AND '+ self.query + '\
263 AND account_account.active ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from))
264 t = self.cr.fetchall()
265 for i in t:
266 future_past['Unknown Partner'] = i[0]
267 elif self.direction_selection == 'past': # Using elif so people could extend without this breaking
268 self.cr.execute('SELECT SUM(l.debit-l.credit) \
269 FROM account_move_line AS l, account_account, account_move am \
270 WHERE (l.account_id=account_account.id) AND (l.move_id=am.id)\
271 AND (am.state IN %s)\
272 AND (l.partner_id IS NULL)\
273 AND (account_account.type IN %s)\
274 AND (COALESCE(l.date_maturity,l.date) > %s)\
275 AND ((l.reconcile_id IS NULL)\
276 OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
277 AND '+ self.query + '\
278 AND account_account.active ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from))
279 t = self.cr.fetchall()
280 for i in t:
281 future_past['Unknown Partner'] = i[0]
282 history = []
283
284 for i in range(5):
285 args_list = (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from,)
286 dates_query = '(COALESCE(l.date_maturity,l.date)'
287 if form[str(i)]['start'] and form[str(i)]['stop']:
288 dates_query += ' BETWEEN %s AND %s)'
289 args_list += (form[str(i)]['start'], form[str(i)]['stop'])
290 elif form[str(i)]['start']:
291 dates_query += ' > %s)'
292 args_list += (form[str(i)]['start'],)
293 else:
294 dates_query += ' < %s)'
295 args_list += (form[str(i)]['stop'],)
296 args_list += (self.date_from,)
297 self.cr.execute('SELECT SUM(l.debit-l.credit)\
298 FROM account_move_line AS l, account_account, account_move am \
299 WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\
300 AND (am.state IN %s)\
301 AND (account_account.type IN %s)\
302 AND (l.partner_id IS NULL)\
303 AND ((l.reconcile_id IS NULL)\
304 OR (l.reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
305 AND '+ self.query + '\
306 AND account_account.active\
307 AND ' + dates_query + '\
308 AND (l.date <= %s)\
309 GROUP BY l.partner_id', args_list)
310 t = self.cr.fetchall()
311 d = {}
312 for i in t:
313 d['Unknown Partner'] = i[0]
314 history.append(d)
315
316 values = {}
317 if self.direction_selection == 'future':
318 before = False
319 if future_past.has_key('Unknown Partner'):
320 before = [ future_past['Unknown Partner'] ]
321 self.total_account[6] = self.total_account[6] + (before and before[0] or 0.0)
322 values['direction'] = before and before[0] or 0.0
323 elif self.direction_selection == 'past':
324 after = False
325 if future_past.has_key('Unknown Partner'):
326 after = [ future_past['Unknown Partner'] ]
327 self.total_account[6] = self.total_account[6] + (after and after[0] or 0.0)
328 values['direction'] = after and after[0] or 0.0
329
330 for i in range(5):
331 during = False
332 if history[i].has_key('Unknown Partner'):
333 during = [ history[i]['Unknown Partner'] ]
334 self.total_account[(i)] = self.total_account[(i)] + (during and during[0] or 0)
335 values[str(i)] = during and during[0] or 0.0
336
337 total = False
338 if totals.has_key( 'Unknown Partner' ):
339 total = [ totals['Unknown Partner'] ]
340 values['total'] = total and total[0] or 0.0
341 ## Add for total
342 self.total_account[(i+1)] = self.total_account[(i+1)] + (total and total[0] or 0.0)
343 values['name'] = 'Unknown Partner'
344
345 if values['total']:
346 res.append(values)
347
348 total = 0.0
349 totals = {}
350 for r in res:
351 total += float(r['total'] or 0.0)
352 for i in range(5)+['direction']:
353 totals.setdefault(str(i), 0.0)
354 totals[str(i)] += float(r[str(i)] or 0.0)
355 return res
356
357 def _get_total(self,pos):
358 period = self.total_account[int(pos)]
359 return period or 0.0
360
361 def _get_direction(self,pos):
362 period = self.total_account[int(pos)]
363 return period or 0.0
364
365 def _get_for_period(self,pos):
366 period = self.total_account[int(pos)]
367 return period or 0.0
368
369 def _get_partners(self,data):
370 if data['form']['result_selection'] == 'customer':
371 return 'Receivable Accounts'
372 elif data['form']['result_selection'] == 'supplier':
373 return 'Payable Accounts'
374 elif data['form']['result_selection'] == 'customer_supplier':
375 return 'Receivable and Payable Accounts'
376 return ''
377
378report_sxw.report_sxw('report.v6.account.aged_trial_balance', 'res.partner',
379 'addons/account_report_aged_partner_balance_v6/report/account_aged_partner_balance.rml',parser=aged_trial_report, header=False)
380
381
382# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0383
=== added file 'account_report_aged_partner_balance_v6/report/account_aged_partner_balance.rml'
--- account_report_aged_partner_balance_v6/report/account_aged_partner_balance.rml 1970-01-01 00:00:00 +0000
+++ account_report_aged_partner_balance_v6/report/account_aged_partner_balance.rml 2012-06-28 13:21:29 +0000
@@ -0,0 +1,290 @@
1<?xml version="1.0"?>
2<document filename="Aged Trial Balance.pdf">
3 <template pageSize="(842.0,595.0)" title="Aged Trial Balance" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
4<pageTemplate>
5 <frame id="first" x1="28.0" y1="28.0" width="786" height="525"/>
6 <pageGraphics>
7 <fill color="black"/>
8 <stroke color="black"/>
9 <drawString x="25" y="555"> [[ formatLang(time.strftime("%Y-%m-%d"), date=True) ]] [[ time.strftime("%H:%M") ]]</drawString>
10 <drawString x="382" y="555">[[ company.partner_id.name ]]</drawString>
11 <stroke color="#000000"/>
12 <lines>25 550 818 550</lines>
13 </pageGraphics>
14 </pageTemplate>
15 </template>
16 <stylesheet>
17 <blockTableStyle id="Standard_Outline">
18 <blockAlignment value="LEFT"/>
19 <blockValign value="TOP"/>
20 </blockTableStyle>
21 <blockTableStyle id="Table1">
22 <blockAlignment value="LEFT"/>
23 <blockValign value="TOP"/>
24 <blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
25 <blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
26 <blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
27 <blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
28 <blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
29 <blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
30 </blockTableStyle>
31 <blockTableStyle id="Table_header_Content">
32 <blockAlignment value="LEFT"/>
33 <blockValign value="TOP"/>
34 </blockTableStyle>
35 <blockTableStyle id="Tableau1">
36 <blockAlignment value="LEFT"/>
37 <blockValign value="TOP"/>
38 <lineStyle kind="GRID" colorName="black"/>
39 </blockTableStyle>
40 <blockTableStyle id="Table2">
41 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
42 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
43 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
44
45 <blockValign value="TOP"/>
46 <blockAlignment value="LEFT" start="2,1" stop="-1,-1"/>
47 </blockTableStyle>
48 <blockTableStyle id="Table8">
49 <blockAlignment value="LEFT"/>
50 <blockValign value="TOP"/>
51 <lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="-1,-1"/>
52 <lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="-1,-1"/>
53 <lineStyle kind="LINEAFTER" colorName="#cccccc" start="0,0" stop="-1,-1"/>
54 <lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,-1"/>
55 </blockTableStyle>
56
57 <blockTableStyle id="Tableau3">
58 <blockAlignment value="LEFT"/>
59 <blockValign value="TOP"/>
60 <lineStyle kind="GRID" colorName="black"/>
61 </blockTableStyle>
62 <initialize>
63 <paraStyle name="all" alignment="justify"/>
64 </initialize>
65 <paraStyle name="P1" fontName="Helvetica" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
66 <paraStyle name="P2" fontName="Helvetica" fontSize="8.3" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
67 <paraStyle name="P2_content" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
68 <paraStyle name="Total" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
69 <paraStyle name="Total_right" fontName="Helvetica-Bold" fontSize="8.5" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
70 <paraStyle name="P3" fontName="Helvetica" fontSize="15.0" leading="20" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
71 <paraStyle name="P4" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
72 <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
73 <paraStyle name="P6" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
74 <paraStyle name="P7" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
75 <paraStyle name="P8" fontName="Helvetica" fontSize="8.3" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
76 <paraStyle name="content" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
77 <paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
78 <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
79 <paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
80 <paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="0.0"/>
81 <paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="0.0"/>
82 <paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
83 <paraStyle name="P10" fontName="Helvetica" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
84 <paraStyle name="Standard" fontName="Helvetica"/>
85 <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
86 <paraStyle name="Heading" fontName="Helvetica" fontSize="8.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
87 <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
88 <paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
89 <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
90 <paraStyle name="Caption" fontName="Helvetica" fontSize="8.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
91 <paraStyle name="Index" fontName="Helvetica"/>
92 <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
93 <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
94 <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
95 <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
96 <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
97 <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
98 <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
99 <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
100 <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
101 <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
102 <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
103 <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
104 <paraStyle name="terp_default_9_italic" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
105 <paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
106 <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
107 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
108
109 </stylesheet>
110 <story>
111
112 <blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content">
113 <tr>
114 <td><para style="terp_header"><font color="white"> </font></para>
115 </td>
116 <td><para style="terp_header_Centre">Aged Trial Balance</para></td>
117 <td><para style="terp_header"><font color="white"> </font></para></td>
118 </tr>
119 </blockTable>
120 <blockTable colWidths="110.0,110.0,110.0,110.0,128.0,93.0,110.0" style="Table8">
121 <tr>
122 <td>
123 <para style="terp_tblheader_General_Centre">Chart of Account</para>
124 </td>
125 <td>
126 <para style="terp_tblheader_General_Centre">Fiscal Year</para>
127 </td>
128 <td>
129 <para style="terp_tblheader_General_Centre">Start Date</para>
130 </td>
131 <td>
132 <para style="terp_tblheader_General_Centre">Period Length(days)</para>
133 </td>
134 <td>
135 <para style="terp_tblheader_General_Centre">Partner's</para>
136 </td>
137 <td>
138 <para style="terp_tblheader_General_Centre">Analysis Direction</para>
139 </td>
140 <td>
141 <para style="terp_tblheader_General_Centre">Target Moves</para>
142 </td>
143 </tr>
144 <tr>
145 <td>
146 <para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para>
147 </td>
148 <td>
149 <para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
150 </td>
151 <td>
152 <para style="terp_default_Centre_8">[[ formatLang(data['form']['date_from'],date=True) ]]</para>
153 </td>
154 <td>
155 <para style="terp_default_Centre_8">[[ data['form']['period_length'] ]]</para>
156 </td>
157 <td>
158 <para style="terp_default_Centre_8">[[ get_partners(data) ]]</para>
159 </td>
160 <td>
161 <para style="terp_default_Centre_8">[[ data['form']['direction_selection'] ]]</para>
162 </td>
163 <td>
164 <para style="terp_default_Centre_8">[[ get_target_move(data) ]]</para>
165 </td>
166 </tr>
167 </blockTable>
168 <para style="P9">
169 <font color="white"> </font>
170 </para>
171 <blockTable colWidths="135.0,90.0,90.0,90.0,90.0,90.0,90.0,90.0" style="Table2" repeatRows="1">
172 <tr>
173 <td>
174 <para style="terp_tblheader_Details">Partners</para>
175 </td>
176 <td>
177 <para style="terp_tblheader_Details_Right">[[ data['form']['direction_selection'] == 'future' and 'Due' or 'Not due' ]]</para>
178 </td>
179 <td>
180 <para style="terp_tblheader_Details_Right">[[ data['form']['4']['name'] ]]</para>
181 </td>
182 <td>
183 <para style="terp_tblheader_Details_Right">[[ data['form']['3']['name'] ]]</para>
184 </td>
185 <td>
186 <para style="terp_tblheader_Details_Right">[[ data['form']['2']['name'] ]]</para>
187 </td>
188 <td>
189 <para style="terp_tblheader_Details_Right">[[ data['form']['1']['name'] ]]</para>
190 </td>
191 <td>
192 <para style="terp_tblheader_Details_Right">[[ data['form']['0']['name'] ]]</para>
193 </td>
194 <td>
195 <para style="terp_tblheader_Details_Right">Total</para>
196 </td>
197 </tr>
198
199 <tr>
200
201 <td>
202 <para style="P3"> <font color="white">[[ (get_lines(data['form']), 'partner') == False or removeParentNode('para') ]]</font></para>
203 <para style="P3"> <font color="white">[[ (get_lines_with_out_partner(data['form']), 'not_partner') == False or removeParentNode('para') ]]</font></para>
204 <para style="Total">Account Total</para>
205 </td>
206 <td>
207 <para style="Total_right">[[ formatLang(get_direction('6')) ]] [[ company.currency_id.code ]]</para>
208 </td>
209 <td>
210 <para style="Total_right">[[ formatLang(get_for_period('4')) ]] [[ company.currency_id.code ]]</para>
211 </td>
212 <td>
213 <para style="Total_right">[[ formatLang(get_for_period('3')) ]] [[ company.currency_id.code ]]</para>
214 </td>
215 <td>
216 <para style="Total_right">[[ formatLang(get_for_period('2')) ]] [[ company.currency_id.code ]]</para>
217 </td>
218 <td>
219 <para style="Total_right">[[ formatLang(get_for_period('1')) ]] [[ company.currency_id.code ]]</para>
220 </td>
221 <td>
222 <para style="Total_right">[[ formatLang(get_for_period('0')) ]] [[ company.currency_id.code ]]</para>
223 </td>
224 <td>
225 <para style="Total_right">[[ formatLang(get_total('5')) ]] [[ company.currency_id.code ]]</para>
226 </td>
227 </tr>
228
229 <tr>
230 <td>
231 <para style="P3">[[ repeatIn(get_lines(data['form']), 'partner') ]]</para>
232 <para style="P2_content">[[ partner['name'] ]]</para>
233 </td>
234 <td>
235 <para style="content">[[ formatLang(partner['direction']) ]] [[ company.currency_id.code ]]</para>
236 </td>
237 <td>
238 <para style="content">[[ formatLang(partner['4'])]] [[ company.currency_id.code ]]</para>
239 </td>
240 <td>
241 <para style="content">[[ formatLang(partner['3'])]] [[ company.currency_id.code ]]</para>
242 </td>
243 <td>
244 <para style="content">[[ formatLang(partner['2']) ]] [[ company.currency_id.code ]]</para>
245 </td>
246 <td>
247 <para style="content">[[ formatLang(partner['1']) ]] [[ company.currency_id.code ]]</para>
248 </td>
249 <td>
250 <para style="content">[[ formatLang(partner['0']) ]] [[ company.currency_id.code ]]</para>
251 </td>
252 <td>
253 <para style="content">[[ formatLang(partner['total']) ]] [[ company.currency_id.code ]]</para>
254 </td>
255 </tr>
256 <tr>
257 <td>
258 <para style="P3">[[ repeatIn(get_lines_with_out_partner(data['form']), 'not_partner') ]]</para>
259 <para style="P2_content">[[ not_partner['name'] ]]</para>
260 </td>
261 <td>
262 <para style="content">[[ formatLang(not_partner['direction']) ]] [[ company.currency_id.code ]]</para>
263 </td>
264 <td>
265 <para style="content">[[ formatLang(not_partner['4'])]] [[ company.currency_id.code ]]</para>
266 </td>
267 <td>
268 <para style="content">[[ formatLang(not_partner['3'])]] [[ company.currency_id.code ]]</para>
269 </td>
270 <td>
271 <para style="content">[[ formatLang(not_partner['2']) ]] [[ company.currency_id.code ]]</para>
272 </td>
273 <td>
274 <para style="content">[[ formatLang(not_partner['1']) ]] [[ company.currency_id.code ]]</para>
275 </td>
276 <td>
277 <para style="content">[[ formatLang(not_partner['0']) ]] [[ company.currency_id.code ]]</para>
278 </td>
279 <td>
280 <para style="content">[[ formatLang(not_partner['total']) ]] [[ company.currency_id.code ]]</para>
281 </td>
282 </tr>
283 </blockTable>
284
285 <para style="P9">
286 <font color="white"> </font>
287 </para>
288 </story>
289</document>
290
0291
=== added file 'account_report_aged_partner_balance_v6/report/common_report_header.py'
--- account_report_aged_partner_balance_v6/report/common_report_header.py 1970-01-01 00:00:00 +0000
+++ account_report_aged_partner_balance_v6/report/common_report_header.py 2012-06-28 13:21:29 +0000
@@ -0,0 +1,143 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import pooler
23from tools.translate import _
24
25class common_report_header(object):
26
27 def _sum_debit(self, period_id=False, journal_id=False):
28 if journal_id and isinstance(journal_id, int):
29 journal_id = [journal_id]
30 if period_id and isinstance(period_id, int):
31 period_id = [period_id]
32 if not journal_id:
33 journal_id = self.journal_ids
34 if not period_id:
35 period_id = self.period_ids
36 if not (period_id and journal_id):
37 return 0.0
38 self.cr.execute('SELECT SUM(debit) FROM account_move_line l '
39 'WHERE period_id IN %s AND journal_id IN %s ' + self.query_get_clause + ' ',
40 (tuple(period_id), tuple(journal_id)))
41 return self.cr.fetchone()[0] or 0.0
42
43 def _sum_credit(self, period_id=False, journal_id=False):
44 if journal_id and isinstance(journal_id, int):
45 journal_id = [journal_id]
46 if period_id and isinstance(period_id, int):
47 period_id = [period_id]
48 if not journal_id:
49 journal_id = self.journal_ids
50 if not period_id:
51 period_id = self.period_ids
52 if not (period_id and journal_id):
53 return 0.0
54 self.cr.execute('SELECT SUM(credit) FROM account_move_line l '
55 'WHERE period_id IN %s AND journal_id IN %s '+ self.query_get_clause+'',
56 (tuple(period_id), tuple(journal_id)))
57 return self.cr.fetchone()[0] or 0.0
58
59 def _get_start_date(self, data):
60 if data.get('form', False) and data['form'].get('date_from', False):
61 return data['form']['date_from']
62 return ''
63
64 def _get_target_move(self, data):
65 if data.get('form', False) and data['form'].get('target_move', False):
66 if data['form']['target_move'] == 'all':
67 return 'All Entries'
68 return 'All Posted Entries'
69 return ''
70
71 def _get_end_date(self, data):
72 if data.get('form', False) and data['form'].get('date_to', False):
73 return data['form']['date_to']
74 return ''
75
76 def get_start_period(self, data):
77 if data.get('form', False) and data['form'].get('period_from', False):
78 return pooler.get_pool(self.cr.dbname).get('account.period').browse(self.cr,self.uid,data['form']['period_from']).name
79 return ''
80
81 def get_end_period(self, data):
82 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: