跳至内容
菜单
此问题已终结
2 回复
3784 查看

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


形象
丢弃

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?

编写者 最佳答案

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