diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index d29dbadb5a1..576793273ce 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -89,7 +89,8 @@ class PosOrder(models.Model): return new_session def _match_payment_to_invoice(self, order): - account_precision = order.pricelist_id.currency_id.decimal_places + pricelist_id = self.env['product.pricelist'].browse(order.get('pricelist_id')) + account_precision = pricelist_id.currency_id.decimal_places # ignore orders with an amount_paid of 0 because those are returns through the POS if not float_is_zero(order['amount_return'], account_precision) and not float_is_zero(order['amount_paid'], account_precision):