Skip to Content
Menu
This question has been flagged
2 Replies
3541 Views

Hi, I am trying to duplicate a project using server actions. I am able to duplicate tasks using the following code:

Project = env['project.task']
prj = Project.browse(71)
prj.copy(default=None)

But if I try to duplicate a project

Project = env['project.project']
prj = Project.browse(2321)
prj.copy(default=None)

It starts a loop that ends with the following errors in the log file:

.... "maximum recursion depth exceeded" while evaluating...

can you help me ?


Thank You


Avatar
Discard

Looks like a bug in Odoo to me. Could be possibly related to this one: https://github.com/odoo/odoo/issues/6037

Which version of Odoo are you using?

Author Best Answer

I am using odoo 10.0+e Enterprise.

Errors in log are very similar to the bug ones.

If I duplicate a project from  the web interface button it works well. If I use xml-rpc it works well.
The error  appear only if i try to use a server action




 

Avatar
Discard

I'll try to reproduce your issue later today. If it occurs in the community edition too, it's probably a bug.

Did you add any modifications to the project module?

Author

I added custom fields and installed some apps: Project Task Default Stage, Project Description and other.

If you are keen on experimenting: try to remove custom fields from project.project and check if it still happens. Also you could try to increase the recursion limit via sys.setrecursionlimit(limit).

Author

I removed custom fileds and apps but the problem still exists.

I definitively think that this is related tho the odoo bug.

Thank you