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