Help

0

v15 : duplicate copy method in sale.order

Avatar
"Vincent DUBREIL"

Hello,

I added a new menu (duplicate2) in action dropdown of the sale.order form view with the code below :


And below here is the method standard_copy()

(For now, it does nothing more than the original copy method)

When i selected this new menu "Duplicate2", i've got the following error :

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http\.py",\ line\ 237,\ in\ _dispatch
\ \ \ \ result\ =\ request\.dispatch\(\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 687,\ in\ dispatch
\ \ \ \ result\ =\ self\._call_function\(\*\*self\.params\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 359,\ in\ _call_function
\ \ \ \ return\ checked_call\(self\.db,\ \*args,\ \*\*kwargs\)
\ \ File\ "/home/odoo/src/odoo/odoo/service/model\.py",\ line\ 94,\ in\ wrapper
\ \ \ \ return\ f\(dbname,\ \*args,\ \*\*kwargs\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 348,\ in\ checked_call
\ \ \ \ result\ =\ self\.endpoint\(\*a,\ \*\*kw\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 916,\ in\ __call__
\ \ \ \ return\ self\.method\(\*args,\ \*\*kw\)
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 535,\ in\ response_wrap
\ \ \ \ response\ =\ f\(\*args,\ \*\*kw\)
\ \ File\ "/home/odoo/src/odoo/addons/web/controllers/main\.py",\ line\ 1629,\ in\ run
\ \ \ \ return\ clean_action\(result,\ env=action\.env\)\ if\ result\ else\ False
\ \ File\ "/home/odoo/src/odoo/addons/web/controllers/main\.py",\ line\ 233,\ in\ clean_action
\ \ \ \ action_type\ =\ action\.setdefault\('type',\ 'ir\.actions\.act_window_close'\)
Exception

The\ above\ exception\ was\ the\ direct\ cause\ of\ the\ following\ exception:

Traceback\ \(most\ recent\ call\ last\):
\ \ File\ "/home/odoo/src/odoo/odoo/http\.py",\ line\ 643,\ in\ _handle_exception
\ \ \ \ return\ super\(JsonRequest,\ self\)\._handle_exception\(exception\)
\ \ File\ "/home/odoo/src/odoo/odoo/http.py", line 301, in _handle_exception
raise exception.with_traceback(None) from new_cause
AttributeError: 'sale.order' object has no attribute 'setdefault'


Is anybody could explain me what is the problem because i don't understand this error !?

Thank you

Avatar
Discard