Browse Source
Merge pull request #354 from Domatix/11.0-fix-pos_order_mgmt-payment_not_loaded_in_orders_for_old_sessions
[11.0] [FIX] pos_order_mgmt: Load payment for old orders
pull/361/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
3 additions and
2 deletions
-
pos_order_mgmt/models/pos_order.py
-
pos_order_mgmt/readme/CONTRIBUTORS.rst
-
pos_order_mgmt/static/src/js/widgets.js
|
|
@ -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, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1,2 +1,3 @@ |
|
|
|
* David Vidal <david.vidal@tecnativa.com> |
|
|
|
* Sylvain LE GAL (https://twitter.com/legalsylvain) |
|
|
|
* Carlos Martínez <carlos@domatix.com> |
|
|
@ -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); |
|
|
|