[FIX] point_of_sale: group invoice receivable lines by partner
Acronyms: SRL : receivable lines in the session's account move that balances the receivable lines in the session's invoices IRL : receivable lines of the invoices in the pos session When closing a pos session, a single account move is created to capture all the transactions, but, invoices are kept (each is an account move). During the construction of this single account move, SRLs are reconciled with IRLs. Prior to this commit, when closing a pos session, SRLs are grouped by `property_account_receivable_id` of the partners in the invoices. Because of this, SRLs are blind of the partners that they are linked to. This causes issues on tracking the 'due' in the partners that are invoiced using the pos application. To fix the issue, we now group the SRLs by partner before reconciling them the the IRLs. Same concept is employed for receivable lines generated from split cash payments, we also assigned partner to them if applicable. closes odoo/odoo#70580 X-original-commit: ebb4f30a Signed-off-by:agr-odoo <agr-odoo@users.noreply.github.com>
Showing
- addons/point_of_sale/models/pos_session.py 18 additions, 9 deletionsaddons/point_of_sale/models/pos_session.py
- addons/point_of_sale/tests/common.py 8 additions, 1 deletionaddons/point_of_sale/tests/common.py
- addons/point_of_sale/tests/test_pos_basic_config.py 50 additions, 0 deletionsaddons/point_of_sale/tests/test_pos_basic_config.py
Loading
Please register or sign in to comment