Merge lp:~acsone-openerp/account-financial-report/7.0-bug-1281579-sbi2 into lp:~account-report-core-editor/account-financial-report/7.0

Proposed by Stéphane Bidoul (Acsone) on 2014-07-04
Status: Needs review
Proposed branch: lp:~acsone-openerp/account-financial-report/7.0-bug-1281579-sbi2
Merge into: lp:~account-report-core-editor/account-financial-report/7.0
Diff against target: 41 lines (+33/-0)
1 file modified
account_financial_report_webkit/tests/general_ledger.yml (+33/-0)
To merge this branch: bzr merge lp:~acsone-openerp/account-financial-report/7.0-bug-1281579-sbi2
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza Resubmit on 2014-08-06
Laurent Mignon (Acsone) (community) code Approve on 2014-07-11
Leonardo Pistone 2014-07-04 Approve on 2014-07-07
Review via email: mp+225620@code.launchpad.net
To post a comment you must log in.
Leonardo Pistone (lepistone) wrote :

Stéphane,

Maybe you could refactor a bit with:

cur_year = time.strftime('%Y')
and then use it later?

being that a small change, I approve anyway

review: Approve
Laurent Mignon (Acsone) (lmi) wrote :

LGTM with the same remark as Leonardo

lmi

review: Approve (code)
95. By Stéphane Bidoul (Acsone) on 2014-07-11

[IMP] account_financial_report_webkit test: test for presence of opening period

The opening period is part of the demo data in 7.0 OCB and 8.0 offical and
the workaround is necessary only for 7.0 official.

Stéphane Bidoul (Acsone) (sbi) wrote :

I factored out cur_year and made the workaround compatible with OCB 7.0.

Pedro Manuel Baeza (pedro.baeza) wrote :
review: Resubmit

Unmerged revisions

95. By Stéphane Bidoul (Acsone) on 2014-07-11

[IMP] account_financial_report_webkit test: test for presence of opening period

The opening period is part of the demo data in 7.0 OCB and 8.0 offical and
the workaround is necessary only for 7.0 official.

94. By Stéphane Bidoul (Acsone) on 2014-07-04

[FIX] workaround to 7.0 demo data weirdness in account_financial_report_webkit test suite

Do not forward port to 8.0, as this has been fixed in odoo master.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_financial_report_webkit/tests/general_ledger.yml'
2--- account_financial_report_webkit/tests/general_ledger.yml 2012-03-06 09:13:59 +0000
3+++ account_financial_report_webkit/tests/general_ledger.yml 2014-07-11 15:03:17 +0000
4@@ -1,4 +1,37 @@
5 -
6+ I first fix the demo periods (7.0 only)
7+ see https://code.launchpad.net/~acsone-openerp/openobject-addons/7.0-bug-1281579-sbi/+merge/207311
8+ which was merged in 8.0
9+-
10+ !python {model: account.period}: |
11+ import time
12+ if not self.search(cr, uid, [('special', '=', False),
13+ ('fiscalyear_id', '=', ref('account.data_fiscalyear')),
14+ ('company_id', '=', ref('base.main_company'))]):
15+ cur_year = time.strftime('%Y')
16+ self.create(cr, uid, {
17+ 'code': '00/' + cur_year,
18+ 'name': 'X 00/' + cur_year,
19+ 'special': True,
20+ 'fiscalyear_id': ref('account.data_fiscalyear'),
21+ 'date_start': cur_year + '-01-01',
22+ 'date_stop': cur_year + '-01-01',
23+ 'company_id': ref('base.main_company'),
24+ })
25+ self.write(cr, uid, ref('account.period_1'), {'special': False})
26+ self.write(cr, uid, ref('account.period_2'), {'special': False})
27+ self.write(cr, uid, ref('account.period_3'), {'special': False})
28+ self.write(cr, uid, ref('account.period_4'), {'special': False})
29+ self.write(cr, uid, ref('account.period_5'), {'special': False})
30+ self.write(cr, uid, ref('account.period_6'), {'special': False})
31+ self.write(cr, uid, ref('account.period_7'), {'special': False})
32+ self.write(cr, uid, ref('account.period_8'), {'special': False})
33+ self.write(cr, uid, ref('account.period_9'), {'special': False})
34+ self.write(cr, uid, ref('account.period_10'), {'special': False})
35+ self.write(cr, uid, ref('account.period_11'), {'special': False})
36+ self.write(cr, uid, ref('account.period_12'), {'special': False})
37+
38+-
39 In order to test the PDF General Ledger webkit wizard I will print report with default setting
40 -
41 !python {model: account.account}: |