fix: prevent Odoo backend warnings by ensuring the returned dictionary contains a type key
This commit is contained in:
parent
bb7d9327ee
commit
dc8bd772b3
@ -65,6 +65,10 @@ class PosOrder(models.Model):
|
||||
for order in self:
|
||||
order.message_post(body=f"<strong>Order Cancelled</strong> by <strong>{employee_name}</strong>")
|
||||
|
||||
# Prevent Odoo backend warning regarding custom action properties
|
||||
if isinstance(res, dict) and 'type' not in res:
|
||||
res['type'] = ''
|
||||
|
||||
return res
|
||||
|
||||
def _prepare_pos_log(self, body):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user