Skip to content
Snippets Groups Projects
Commit b12f1c1b authored by jev-odoo's avatar jev-odoo Committed by jev
Browse files

[FIX] point_of_sale: close sessions via xml-rpc


Some of the support scripts use xml-rpc calls to work
on pos.session on Saas or SH databases
(especially when needed to upload lot of offline orders
in smaller batches)
These scripts should be allowed to close any rescue session
created during this process programmatically via xml-rpc.

Our xml-rpc protocol does not allow to call function that
return nothing

closes odoo/odoo#61988

Signed-off-by: default avatarRichard Mathot (rim) <rim@openerp.com>
parent 904a46f2
No related branches found
No related tags found
No related merge requests found
......@@ -259,6 +259,7 @@ class PosSession(models.Model):
session.write({'state': 'closing_control', 'stop_at': fields.Datetime.now()})
if not session.config_id.cash_control:
session.action_pos_session_close()
return True
@api.multi
def _check_pos_session_balance(self):
......@@ -271,6 +272,7 @@ class PosSession(models.Model):
def action_pos_session_validate(self):
self._check_pos_session_balance()
self.action_pos_session_close()
return True
@api.multi
def action_pos_session_close(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment