OpenERP version 7.0 -- Duplicate tasks in the project created from template project with phases and tasks inside

Bug #1212860 reported by Pulsar Inheritance
40
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Medium
OpenERP R&D Addons Team 1

Bug Description

Hello,

We have noticed the same kind of issues has been reported for Version 6.1, but that fix is not working in Version 7.0, that's the reason we are raising this bug, please don't mark it as duplicate.

OpenERP version used: Version 7.0-20130710-231023

Below is the scenario:

Template Project Structure
==================
Phases in it:
-------------------
PH1
PH2

Tasks in PH1
-------------------
T1
T2

Tasks in PH2
-------------------
T3
T4

Now when we create a new project using this template project we get duplicate task of each task in the both newly created project and in template project also.

Below is what we are getting:

New Project and Template project structure after creating New project from Template project
=============================
Phases in it:
PH1
PH2

Tasks in PH1
-------------------
T1
T1
T2
T2

Tasks inside PH2
-------------------
T3
T3
T4
T4

As above you can see each task is created in new project with its exact copy. This problem only occurs when we use phases and assign tasks to them in template project.

Please let us know how can we help more on this.

description: updated
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Mirko Favre (m-favre) wrote :

Hi,

Constrains between phases are also mixed up. Phases from the template are linked to phases in the new project.

The function "New Project based on template" can't be use with the long_term addons and constrains betweeen phases.

Revision history for this message
Ivo Gorinov (ivo-3) wrote :

Furthermore, all tasks are created upon project creation rather than create tasks for each phase as it is launched.

tags: added: project
removed: 7.0 duplicate openerp task
Revision history for this message
Almas (almasd) wrote :

It might be caused by long term project addon. Any one fixed this?

Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Guys,

Will create a branch soon.

Meanwhile, please see the attached patch.

Thanks.

Revision history for this message
jbo (joern-bornhoeft) wrote :

Hi, we have the same issue and i was so happy to find a solution or patch because it is very important for our projects.
But when i apply the patch i get this information back.

patching file project.py
Hunk #1 succeeded at 352 (offset 9 lines).
Hunk #2 FAILED at 390.
1 out of 2 hunks FAILED -- saving rejects to file project.py.rej

Because i'am new on OpenERP i don't understand why. Has anybody an idea?

I've updated OpenERP over bzr today but there is nothing change with the duplicate task issue.

Thanks to everyone who will help me in advance and hopefully we get this solved.

Revision history for this message
David Lefever @ Taktik (dl-taktik) wrote :

Hello,

the patch seems fine, but IMHO we shouldn't copy the tasks when we copy the phase:

map_phase_id[phase.id] = phase_obj.copy(cr, uid, phase.id, {'project_id': new_project_id}, context=context)
should be
map_phase_id[phase.id] = phase_obj.copy(cr, uid, phase.id, {'project_id': new_project_id, 'task_ids': []}, context=context)

Because just after, we copy all the tasks to the new phase.
I attached the new patch if someone wants to give it a try.

Almas (almasd)
tags: added: pro
removed: project
tags: added: long project term
removed: pro
tags: added: phase
Revision history for this message
Almas (almasd) wrote :

Hello guys. This bug is half fixed. Can somebody complete this? There is also Parent and Deligation duplicated.

I attached screen shot here. I patched last patch for project.py. But now task duplication fixed and Task parent and deligate duplicated there.

Revision history for this message
David Lefever @ Taktik (dl-taktik) wrote :

Hello,

I had some contacts with the OpenERP support.
With the 7.0 trunk and this patch:
https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-590586-rha

Everything should work.

Can you try?

Revision history for this message
Almas (almasd) wrote :

Dear David Lefever,

I just found new bug on patch your given trunk.

https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-590586-rha

I patched by this one. But now other problem is there. Copy Project's tasks deligating to original Project's tasks.
Please fix this. Thank you.

Revision history for this message
David Lefever @ Taktik (dl-taktik) wrote :

Almas,

my advice is that you should contact the OpenERP support and explain them the problems you have.
If you have an OPW, they will certainly fix it.

You can also update the description of this bug report and hope it will be fixed.

Regards,
David.

Revision history for this message
Almas (almasd) wrote :

Oh found it :)
Last version working well. But I copied old projects I already created then problem happening. But I created new project and then it working well. Thank you all.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.