From 0d8d36d4687d738a14e010f0a45ea9fc9481f52c Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Fri, 10 Apr 2020 08:35:55 +0000 Subject: [PATCH] [FIX] point_of_sale: keyerror due to already reconciled entries 1. Install PoS and Accounting 2. In the PoS setting activate the Invoicing option 3. Sell an item X with Invoice toggle to client Y and pay it 4. Sell the same item X with Invoice toggle to the same client Y with quantity -1 5. Close the PoS session Traceback wil occur when trying to Validate Closing & Post Entries because in '_create_invoice_receivable_lines' already reconciled lines are already filtered out so invoice_receivable_lines is empty opw-2206625 closes odoo/odoo#49407 X-original-commit: e9f5e2b7fdd332ca0fc0f43c839118ef82d4eddb Signed-off-by: Nicolas Martinelli (nim) --- addons/point_of_sale/models/pos_session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py index 6eefec52618..537e54c3cb0 100644 --- a/addons/point_of_sale/models/pos_session.py +++ b/addons/point_of_sale/models/pos_session.py @@ -648,7 +648,7 @@ class PosSession(models.Model): # reconcile invoice receivable lines for account_id in order_account_move_receivable_lines: ( order_account_move_receivable_lines[account_id] - | invoice_receivable_lines[account_id] + | invoice_receivable_lines.get(account_id, self.env['account.move.line']) ).reconcile() # reconcile stock output lines