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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
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
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?
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).
I removed custom fileds and apps but the problem still exists.
I definitively think that this is related tho the odoo bug.
Thank you
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?