diff --git a/pos_print_receipt_backend/models/pos_order.py b/pos_print_receipt_backend/models/pos_order.py
index 83e3864..809c196 100644
--- a/pos_print_receipt_backend/models/pos_order.py
+++ b/pos_print_receipt_backend/models/pos_order.py
@@ -5,6 +5,7 @@ class PosOrder(models.Model):
_inherit = "pos.order"
receipt_sent = fields.Boolean(
+ string="Receipt sent by backend interface",
readonly=True,
default=False,
copy=False,
@@ -61,3 +62,15 @@ def action_receipt_sent(self):
"target": "new",
"context": ctx,
}
+
+ @api.model
+ def send_mail_receipt(self, pos_reference, email, body_from_ui, force=True):
+ order = self.search([("pos_reference", "=", pos_reference)])
+
+ order.note = "{}\n{} UTC Attempting to send mail receipt ".format(
+ order.note or "", fields.datetime.now()
+ )
+
+ return super(PosOrder, self).send_mail_receipt(
+ pos_reference, email, body_from_ui, force=True
+ )
diff --git a/pos_print_receipt_backend/views/pos_order_view.xml b/pos_print_receipt_backend/views/pos_order_view.xml
index e1cf039..caa50fe 100644
--- a/pos_print_receipt_backend/views/pos_order_view.xml
+++ b/pos_print_receipt_backend/views/pos_order_view.xml
@@ -7,6 +7,9 @@
+
+
+