Merge lp:~openerp-dev/openobject-addons/trunk-eval-action-context-pna into lp:openobject-addons

Proposed by Pinakin Nayi (OpenERP)
Status: Work in progress
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-eval-action-context-pna
Merge into: lp:openobject-addons
Diff against target: 42 lines (+6/-3)
3 files modified
account/account_move_line.py (+2/-0)
account/account_view.xml (+1/-1)
account/wizard/account_chart.py (+3/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-eval-action-context-pna
Reviewer Review Type Date Requested Status
Richard Mathot (Odoo, formerly OpenERP) Pending
Review via email: mp+214691@code.launchpad.net

Description of the change

Hello Sir,

I fixed issue regarding filter on fiscal year in CoA tree.I also improved CoA wizard so if user select future fiscal year then set starting period of that FY and leave end period field as empty.

To Reproduce :
 Create 2 fiscal years ex. 2013,2014. Now create invoices both in 2013 and 2014 FY and validate. Now go to chart of account and open for any fiscal year(suppose 2014), select any account(click on account that will display all list of journal items of that account), now if we notice it will get all the journal items of all fiscal years(including 2013 FY).

Expected : Only related fiscal year(2014) journal items should display of that account.

Thanks,
pna

To post a comment you must log in.
9257. By Pinakin Nayi (OpenERP)

[IMP]improve code as per suggestion

9258. By Pinakin Nayi (OpenERP)

[IMP]reduce code

9259. By Richard Mathot (Odoo, formerly OpenERP)

[MERGE] from trunk

Unmerged revisions

9259. By Richard Mathot (Odoo, formerly OpenERP)

[MERGE] from trunk

9258. By Pinakin Nayi (OpenERP)

[IMP]reduce code

9257. By Pinakin Nayi (OpenERP)

[IMP]improve code as per suggestion

9256. By Pinakin Nayi (OpenERP)

[Merge]with trunk

9255. By Pinakin Nayi (OpenERP)

[MERGE]with trunk

9254. By Pinakin Nayi (OpenERP)

[IMP]account_chart: onchange of fiscalyear in coa if there is future fiscal year then pass only starting period

9253. By Pinakin Nayi (OpenERP)

[MERGE]with main

9252. By Pinakin Nayi (OpenERP)

[MERGE]with main

9251. By Pinakin Nayi (OpenERP)

[Merge]with trunk

9250. By Pinakin Nayi (OpenERP)

[FIX]Accounting: filter on fiscal year in CoA tree

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_move_line.py'
2--- account/account_move_line.py 2014-01-15 21:44:54 +0000
3+++ account/account_move_line.py 2014-04-23 10:26:35 +0000
4@@ -724,6 +724,8 @@
5 def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
6 if context is None:
7 context = {}
8+ if context and context.get('fiscalyear', False):
9+ args.append(('period_id.fiscalyear_id', '=', context.get('fiscalyear', False)))
10 if context and context.get('next_partner_only', False):
11 if not context.get('partner_id', False):
12 partner = self.list_partners_to_reconcile(cr, uid, context=context)
13
14=== modified file 'account/account_view.xml'
15--- account/account_view.xml 2014-04-18 11:59:13 +0000
16+++ account/account_view.xml 2014-04-23 10:26:35 +0000
17@@ -351,7 +351,7 @@
18 <act_window
19 id="action_account_items"
20 name="Journal Items"
21- context="{'search_default_account_id': [active_id]}"
22+ context="{'search_default_account_id': [active_id], 'fiscalyear': context.get('fiscalyear')}"
23 res_model="account.move.line"
24 src_model="account.account"
25 key2="tree_but_open"/>
26
27=== modified file 'account/wizard/account_chart.py'
28--- account/wizard/account_chart.py 2013-10-27 12:31:04 +0000
29+++ account/wizard/account_chart.py 2014-04-23 10:26:35 +0000
30@@ -62,9 +62,10 @@
31 ORDER BY p.date_stop DESC
32 LIMIT 1) AS period_stop''', (fiscalyear_id, fiscalyear_id))
33 periods = [i[0] for i in cr.fetchall()]
34- if periods and len(periods) > 1:
35+ if periods:
36 start_period = periods[0]
37- end_period = periods[1]
38+ if len(periods) > 1:
39+ end_period = periods[1]
40 res['value'] = {'period_from': start_period, 'period_to': end_period}
41 else:
42 res['value'] = {'period_from': False, 'period_to': False}

Subscribers

People subscribed via source and target branches

to all changes: