Merge lp:~openerp-dev/openobject-addons/trunk-bug-1149676-dharmraj into lp:openobject-addons

Proposed by Dharmraj Zala(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1149676-dharmraj
Merge into: lp:openobject-addons
Diff against target: 16 lines (+7/-0)
1 file modified
account_budget/account_budget.py (+7/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1149676-dharmraj
Reviewer Review Type Date Requested Status
Cristian Salamea (community) Needs Fixing
Numérigraphe Pending
Serpent Consulting Services Pending
OpenERP Core Team Pending
Review via email: mp+154922@code.launchpad.net

This proposal supersedes a proposal from 2013-03-13.

Description of the change

Hello,

  I have changed the code as per your suggestion.

Thanks,
Dharmraj.

To post a comment you must log in.
Revision history for this message
Numérigraphe (numerigraphe) wrote : Posted in a previous version of this proposal

Thanks,
It needs improvements:
Code: you must check whether defaults is None or not.
Style: please watch out for the spaces (no double space, space before+after '=' in assignments...), see PEP8.
Lionel Sausin

review: Needs Fixing
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote : Posted in a previous version of this proposal

The code should say:

default['crossovered_budget_line'] = [] #not a dictionary

Thanks.

review: Needs Fixing
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Hello this MP solves the problem just for account duplicated but not for all childs, check it please, the same redefinition exists in analytic module: http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/analytic/analytic.py#L264

I suggest clear in childs too.

review: Needs Fixing

Unmerged revisions

8620. By Dharmraj Zala(OpenERP)

[MERGE] with trunk

8619. By Dharmraj Zala(OpenERP)

[IMP] improvement in returning value

8618. By Dharmraj Zala(OpenERP)

[MERGE] merge with addons

8617. By Dharmraj Zala(OpenERP)

[IMP] assigned blank list instead of dictionary

8616. By Dharmraj Zala(OpenERP)

[IMP] added condition whether default is None or not

8615. By Dharmraj Zala(OpenERP)

[FIX] overrid the copy method of account_analytic_account

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-03-22 11:35:35 +0000
4@@ -210,6 +210,13 @@
5 _columns = {
6 'crossovered_budget_line': fields.one2many('crossovered.budget.lines', 'analytic_account_id', 'Budget Lines'),
7 }
8+ def copy(self, cr, uid, id, default=None, context=None):
9+ if context is None:
10+ context = {}
11+ if default is None:
12+ default = {}
13+ default['crossovered_budget_line'] = []
14+ return super(account_analytic_account, self).copy(cr, uid, id, default=default, context=context)
15
16 account_analytic_account()
17

Subscribers

People subscribed via source and target branches

to all changes: