Merge lp:~akretion-team/openerp-french-localization/70-fec-AN-order into lp:openerp-french-localization/7.0

Proposed by Alexis de Lattre
Status: Merged
Merged at revision: 7
Proposed branch: lp:~akretion-team/openerp-french-localization/70-fec-AN-order
Merge into: lp:openerp-french-localization/7.0
Diff against target: 36 lines (+4/-5)
1 file modified
l10n_fr_fec/wizard/fec.py (+4/-5)
To merge this branch: bzr merge lp:~akretion-team/openerp-french-localization/70-fec-AN-order
Reviewer Review Type Date Requested Status
OpenERP FR Core Editors Pending
Review via email: mp+226784@code.launchpad.net

Description of the change

Some fixes to the module l10n_fr_fec about the order of the lines :
1) opening entries should come first
2) account move lines of the same account move should be grouped together

To post a comment you must log in.
Revision history for this message
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote :

It's work perfectly Merged

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'l10n_fr_fec/wizard/fec.py'
2--- l10n_fr_fec/wizard/fec.py 2014-03-25 17:10:43 +0000
3+++ l10n_fr_fec/wizard/fec.py 2014-07-15 08:01:17 +0000
4@@ -22,7 +22,6 @@
5
6 from openerp.osv import orm, fields
7 from openerp.tools.translate import _
8-#from tempfile import TemporaryFile
9 import base64
10 import unicodecsv
11 import StringIO
12@@ -122,12 +121,13 @@
13 am.period_id IN %s
14 AND am.state = 'posted'
15 AND am.company_id = %s
16- ORDER BY am.date
17+ ORDER BY
18+ am.date,
19+ CASE aj.type WHEN 'situation' THEN 1 ELSE 2 END,
20+ aml.id
21 '''
22 cr.execute(sql_query, (tuple(period_ids), company_id))
23
24-# f = TemporaryFile(prefix='openerp')
25-# f = open('/tmp/test2.csv', 'w')
26 fecfile = StringIO.StringIO()
27 w = unicodecsv.writer(fecfile, encoding='utf-8', delimiter='|')
28 w.writerow(header)
29@@ -180,7 +180,6 @@
30 action = {
31 'name': 'FEC',
32 'type': 'ir.actions.act_window',
33- 'view_type': 'form',
34 'view_mode': 'form',
35 'res_model': self._name,
36 'res_id': ids[0],

Subscribers

People subscribed via source and target branches