Browse Source

[FIX] pos_order_mgmt: Load payment for old orders

pull/354/head
Carlos 6 years ago
parent
commit
02ba2d890d
  1. 2
      pos_order_mgmt/models/pos_order.py
  2. 1
      pos_order_mgmt/readme/CONTRIBUTORS.rst
  3. 2
      pos_order_mgmt/static/src/js/widgets.js

2
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): def _prepare_done_order_payment_for_pos(self, payment_line):
self.ensure_one() self.ensure_one()
return { return {
'statement_id': payment_line.statement_id.id,
'journal_id': payment_line.journal_id.id,
'amount': payment_line.amount, 'amount': payment_line.amount,
} }

1
pos_order_mgmt/readme/CONTRIBUTORS.rst

@ -1,2 +1,3 @@
* David Vidal <david.vidal@tecnativa.com> * David Vidal <david.vidal@tecnativa.com>
* Sylvain LE GAL (https://twitter.com/legalsylvain) * Sylvain LE GAL (https://twitter.com/legalsylvain)
* Carlos Martínez <carlos@domatix.com>

2
pos_order_mgmt/static/src/js/widgets.js

@ -247,7 +247,7 @@ odoo.define('pos_order_mgmt.widgets', function (require) {
line = line[2]; line = line[2];
} }
_.each(self.pos.cashregisters, function (cashregister) { _.each(self.pos.cashregisters, function (cashregister) {
if (cashregister.id === line.statement_id) {
if (cashregister.journal.id === line.journal_id) {
if (line.amount > 0) { if (line.amount > 0) {
// If it is not change // If it is not change
order.add_paymentline(cashregister); order.add_paymentline(cashregister);

Loading…
Cancel
Save