Merge lp:~openerp-dev/openobject-addons/7.0-opw-590479-rha into lp:openobject-addons/7.0

Proposed by Rifakat Husen (OpenERP)
Status: Rejected
Rejected by: Martin Trigaux (OpenERP)
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-590479-rha
Merge into: lp:openobject-addons/7.0
Diff against target: 13 lines (+2/-1)
1 file modified
project_long_term/project_long_term.py (+2/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-590479-rha
Reviewer Review Type Date Requested Status
Naresh(OpenERP) (community) Approve
Review via email: mp+155182@code.launchpad.net

Description of the change

Creating new project with Phases boolean checked, automatically creates 2 project with
the same name.

Reproduce:
1. install modules project and project_long_term
2. create new project, tick boolean filed 'Phases'
3. enter project name and save
3. you will see there are 2 projects with the same name.

Courtesy to Olivier Dony.(took reference from addons 7.0, r7289)
http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/revision/7289

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) :
review: Approve
Revision history for this message
Serge (sboivin) wrote :

This patch is approve, why not merged with the trunk ... already 7 days passed after approve

Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Serge,
It has been merged in 7.0,
http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/revision/9005

You may see Trunk fix on the related bug report and give feedback.

Thanks!

Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello
I reject this patch as this has already been fixed as you mentioned

Unmerged revisions

8924. By Rifakat Husen (OpenERP)

[FIX] project_long_term: creating a project with phases checked automatically creates 2 projects

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project_long_term/project_long_term.py'
2--- project_long_term/project_long_term.py 2012-12-17 14:43:06 +0000
3+++ project_long_term/project_long_term.py 2013-03-25 08:52:36 +0000
4@@ -284,8 +284,9 @@
5 return res
6
7 def _trigger_project_creation(self, cr, uid, vals, context=None):
8+ if context is None: context = {}
9 res= super(account_analytic_account, self)._trigger_project_creation(cr, uid, vals, context=context)
10- return res or vals.get('use_phases')
11+ return res or (vals.get('use_phases') and not 'project_creation_in_progress' in context)
12
13 account_analytic_account()
14