[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) <nim@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user