I am trying to 'validate' the 'delivery' of a sales order in Odoo14. The products and their respective quantities appear as 'reserved' and 'done'.
But when I click on the 'Validate' button I get the following error:
TypeError: _action_done() got an unexpected keyword argument 'cancel_backorder'
Can someone help me understand and resolve this error? Thank you very much for your attention.
The full text of the error is as follows:
Error:
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo14/odoo14/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/opt/odoo14/odoo14/odoo/http.py", line 685, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo14/odoo14/odoo/http.py", line 361, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo14/odoo14/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo14/odoo14/odoo/http.py", line 349, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo14/odoo14/odoo/http.py", line 914, in __call__
return self.method(*args, **kw)
File "/opt/odoo14/odoo14/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/opt/odoo14/odoo14/addons/web/controllers/main.py", line 1392, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo14/odoo14/addons/web/controllers/main.py", line 1380, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo14/odoo14/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo14/odoo14/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo14/odoo14/addons/stock/models/stock_picking.py", line 972, in button_validate
pickings_not_to_backorder.with_context(cancel_backorder=True)._action_done()
File "/opt/odoo14/odoo14/addons/sale_stock/models/stock.py", line 91, in _action_done
res = super()._action_done()
File "/opt/odoo14/odoo14/addons/stock/models/stock_picking.py", line 793, in _action_done
todo_moves._action_done(cancel_backorder=self.env.context.get('cancel_backorder'))
Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/odoo14/odoo14/odoo/http.py", line 641, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo14/odoo14/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
TypeError: _action_done() got an unexpected keyword argument 'cancel_backorder'