fix: prevent Odoo backend warnings by ensuring the returned dictionary contains a type key

This commit is contained in:
Suherdy Yacob 2026-06-01 21:35:54 +07:00
parent bb7d9327ee
commit dc8bd772b3

View File

@ -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):