Merge lp:~openerp-dev/openobject-addons/7.0-opw-595714-chandni into lp:openobject-addons/7.0

Proposed by Chandni Machchhar(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-595714-chandni
Merge into: lp:openobject-addons/7.0
Diff against target: 33 lines (+2/-3)
2 files modified
account_budget/account_budget.py (+1/-2)
account_budget/account_budget_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-595714-chandni
Reviewer Review Type Date Requested Status
Houssine (community) Approve
Vinay Rana (OpenERP) Pending
Naresh(OpenERP) Pending
OpenERP Core Team Pending
Review via email: mp+178299@code.launchpad.net

Description of the change

Hello,

  I have Fix the problem in budget line, if you forgot to assign accounts to budgetary position saving your line will block your budget. You won't be able anymore to edit it.
  To reproduce :
   - create a budget -> budget line
   - for the budget line define a budgetary position without account.
    It gives error message.

Thanks,
Chandni.

To post a comment you must log in.
Revision history for this message
Houssine (houssine-bakkali) wrote :

this fix the bug! thanks!

review: Approve

Unmerged revisions

9338. By Chandni Machchhar(OpenERP)

[IMP] Remove Error Message and make the field required.

9337. By Chandni Machchhar(OpenERP)

[IMP] Improve the code for creating budget lines.

9336. By Chandni Machchhar(OpenERP)

[FIX] Bug when creating budget lines.

9335. By Chandni Machchhar(OpenERP)

[FIX] Bug when creating budget lines.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_budget/account_budget.py'
2--- account_budget/account_budget.py 2012-12-17 15:23:03 +0000
3+++ account_budget/account_budget.py 2013-08-02 13:48:29 +0000
4@@ -115,8 +115,6 @@
5 context = {}
6 for line in self.browse(cr, uid, ids, context=context):
7 acc_ids = [x.id for x in line.general_budget_id.account_ids]
8- if not acc_ids:
9- raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % str(line.general_budget_id.name))
10 date_to = line.date_to
11 date_from = line.date_from
12 if context.has_key('wizard_date_from'):
13@@ -202,6 +200,7 @@
14 'company_id': fields.related('crossovered_budget_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
15 }
16
17+
18 crossovered_budget_lines()
19
20 class account_analytic_account(osv.osv):
21
22=== modified file 'account_budget/account_budget_view.xml'
23--- account_budget/account_budget_view.xml 2013-06-07 16:09:27 +0000
24+++ account_budget/account_budget_view.xml 2013-08-02 13:48:29 +0000
25@@ -54,7 +54,7 @@
26 </group>
27 <notebook>
28 <page string="Accounts">
29- <field name="account_ids"/>
30+ <field name="account_ids" required="1"/>
31 </page>
32 <page string="Budget Lines">
33 <field name="crossovered_budget_line" widget="one2many_list" mode="tree">