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

Am trying to duplicate a project I created as a template.

So I go to Project -> Configuration -> Projects , click on the template project and select actions-> duplicate

Result is the following error:

Error:
Odoo Server Error

Traceback (most recent call last):
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 619, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 309, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/odoo/src/odoo/13.0/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 664, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 345, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/13.0/odoo/service/model.py", line 93, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 338, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 909, in __call__
return self.method(*args, **kw)
File "/home/odoo/src/odoo/13.0/odoo/http.py", line 510, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/odoo/13.0/addons/web/controllers/main.py", line 1319, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/13.0/addons/web/controllers/main.py", line 1311, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/13.0/odoo/api.py", line 395, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/13.0/odoo/api.py", line 382, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/13.0/addons/project/models/project.py", line 286, in copy
project = super(Project, self).copy(default)
File "/home/odoo/src/odoo/13.0/odoo/models.py", line 4538, in copy
new = self.with_context(lang=None).create(vals)
File "<decorator-gen-340>", line 2, in create
File "/home/odoo/src/odoo/13.0/odoo/api.py", line 343, in _model_create_multi
return create(self, [arg])
File "/home/odoo/src/odoo/13.0/addons/base_automation/models/base_automation.py", line 254, in create
action._process(action._filter_post(records))
File "/home/odoo/src/odoo/13.0/addons/base_automation/models/base_automation.py", line 207, in _process
self.action_server_id.with_context(**ctx).run()
File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/ir_actions.py", line 561, in run
res = func(action, eval_context=eval_context)
File "/home/odoo/src/odoo/13.0/odoo/addons/base/models/ir_actions.py", line 455, in run_action_object_write
self.env[action.model_id.model].browse(self._context.get('active_id')).write(res)
File "/home/odoo/src/enterprise/13.0/sale_timesheet_enterprise/models/project_task.py", line 31, in write
result = super(Project, self).write(values)
File "/home/odoo/src/odoo/13.0/addons/hr_timesheet/models/project.py", line 57, in write
result = super(Project, self).write(values)
File "/home/odoo/src/odoo/13.0/addons/project/models/project.py", line 311, in write
res = super(Project, self).write(vals) if vals else True
File "/home/odoo/src/odoo/13.0/addons/mail/models/mail_thread.py", line 322, in write
result = super(MailThread, self).write(values)
File "/home/odoo/src/odoo/13.0/odoo/models.py", line 3522, in write
field.write(self, vals[fname])
File "/home/odoo/src/odoo/13.0/odoo/fields.py", line 2745, in write
return self.write_batch([(records, value)])
File "/home/odoo/src/odoo/13.0/odoo/fields.py", line 2761, in write_batch
raise ValueError("Wrong value for %s: %s" % (self, value))
ValueError: Wrong value for project.project.type_ids: 9

Avatar
Discard
Best Answer

it seems that your custom add on, for project type(looks like) on duplicate take same id. so if you allowed to duplicate but on save you get this error, try to change project type.

also, try to uninstall add on and check if problem exist. if no, you now where the problem.

Avatar
Discard
Best Answer

Hello,

It seems that error is throwing from any custom addon. If there is any custom module which inherits the functionality of 'project.project' then trace its code to check for error otherwise make sure that you are using latest version of 13.0+e

Thank you!


Regards,




Email:   odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

Avatar
Discard