diff --git a/pos_order_mgmt/models/pos_order.py b/pos_order_mgmt/models/pos_order.py index c2ae6382..641ac989 100644 --- a/pos_order_mgmt/models/pos_order.py +++ b/pos_order_mgmt/models/pos_order.py @@ -88,7 +88,7 @@ class PosOrder(models.Model): def _prepare_done_order_payment_for_pos(self, payment_line): self.ensure_one() return { - 'statement_id': payment_line.statement_id.id, + 'journal_id': payment_line.journal_id.id, 'amount': payment_line.amount, } diff --git a/pos_order_mgmt/readme/CONTRIBUTORS.rst b/pos_order_mgmt/readme/CONTRIBUTORS.rst index 9b6ff1a8..3020f433 100644 --- a/pos_order_mgmt/readme/CONTRIBUTORS.rst +++ b/pos_order_mgmt/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * David Vidal * Sylvain LE GAL (https://twitter.com/legalsylvain) +* Carlos Martínez diff --git a/pos_order_mgmt/static/src/js/widgets.js b/pos_order_mgmt/static/src/js/widgets.js index 369a1799..74ba42ed 100644 --- a/pos_order_mgmt/static/src/js/widgets.js +++ b/pos_order_mgmt/static/src/js/widgets.js @@ -247,7 +247,7 @@ odoo.define('pos_order_mgmt.widgets', function (require) { line = line[2]; } _.each(self.pos.cashregisters, function (cashregister) { - if (cashregister.id === line.statement_id) { + if (cashregister.journal.id === line.journal_id) { if (line.amount > 0) { // If it is not change order.add_paymentline(cashregister);