Merge lp:~openerp-dev/openobject-addons/trunk-bug-1200021-bde into lp:openobject-addons

Proposed by Bharat Devnani (Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1200021-bde
Merge into: lp:openobject-addons
Diff against target: 40 lines (+8/-4)
2 files modified
account/report/account_tax_report.py (+7/-3)
account/wizard/account_vat_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1200021-bde
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+200089@code.launchpad.net

Description of the change

Hello,

I have fixed the issue of Tax Report chooses wrong data if both periods are not selected.

Thanks & Regards,
Devnani Bharat R.

To post a comment you must log in.
9029. By Bharat Devnani (Open ERP)

[FIX] [ACCOUNT] : Tax Report chooses wrong data if both periods are not selected

Unmerged revisions

9029. By Bharat Devnani (Open ERP)

[FIX] [ACCOUNT] : Tax Report chooses wrong data if both periods are not selected

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/report/account_tax_report.py'
2--- account/report/account_tax_report.py 2012-12-06 14:56:32 +0000
3+++ account/report/account_tax_report.py 2013-12-27 06:52:07 +0000
4@@ -31,6 +31,7 @@
5 new_ids = ids
6 res = {}
7 self.period_ids = []
8+ self.fiscalyear_id = data['form'].get('fiscalyear_id', False)
9 period_obj = self.pool.get('account.period')
10 self.display_detail = data['form']['display_detail']
11 res['periods'] = ''
12@@ -70,9 +71,12 @@
13 if period_list:
14 res = self._add_codes(based_on, res, period_list, context=context)
15 else:
16- self.cr.execute ("select id from account_fiscalyear")
17- fy = self.cr.fetchall()
18- self.cr.execute ("select id from account_period where fiscalyear_id = %s",(fy[0][0],))
19+ if self.fiscalyear_id:
20+ self.cr.execute ("select id from account_period where fiscalyear_id = %s", (self.fiscalyear_id,))
21+ else:
22+ self.cr.execute ("select id from account_fiscalyear")
23+ fy = self.cr.fetchall()
24+ self.cr.execute ("select id from account_period where fiscalyear_id = %s",(fy[0][0],))
25 periods = self.cr.fetchall()
26 for p in periods:
27 period_list.append(p[0])
28
29=== modified file 'account/wizard/account_vat_view.xml'
30--- account/wizard/account_vat_view.xml 2012-11-29 22:26:45 +0000
31+++ account/wizard/account_vat_view.xml 2013-12-27 06:52:07 +0000
32@@ -16,7 +16,7 @@
33 </group>
34
35 <group string="Periods" col="4">
36- <field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]"/>
37+ <field name="period_from" domain="[('fiscalyear_id', '=', fiscalyear_id)]"/>
38 <field name="period_to" domain="[('fiscalyear_id', '=', fiscalyear_id)]"/>
39 </group>
40 <footer>

Subscribers

People subscribed via source and target branches

to all changes: