Hi !
I'm trying to create a server action that validate delivery order and confirm the backorder creation.
I have problem to interact with backorder wizard (?) ....
I tried so many different code but I tried this :
for rec in records:
action=rec.button_validate()
action=rec.env['\stock.backorder.confirmation'].process()
And this is the error I get :
File "/home/odoo/src/odoo/14.0/addons/web/controllers/main.py", line 1746, in run
return clean_action(result, env=action.env) if result else False
File "/home/odoo/src/odoo/14.0/addons/web/controllers/main.py", line 328, 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/14.0/odoo/http.py", line 640, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/14.0/odoo/http.py", line 316, in _handle_exception
raise exception.with_traceback(None) from new_cause
AttributeError: 'bool' object has no attribute 'setdefault'
Any Idea ?
Thanks