Skip to content
Snippets Groups Projects
Commit e4f17d10 authored by rhe-odoo's avatar rhe-odoo Committed by Joseph Caburnay
Browse files

[FIX] pos_sale: correctly assign partners in the invoice


When settling a sale.order from the pos app, it's possible that the sale.order
have different partners assigned to it (partner_id, partner_shipping_id,
partner_invoice_id). After this commit, we are now properly assigning these
partners to the generated invoice.

Additionally, this commit makes the settling of sale.order more robust by
avoiding issue on having multiple incompatible sale.orders in a pos.order (more
than 2 sale.orders and their partners are not the same). After this commit, we
are only reusing the current pos.order as container of the new sale.order to
settle if the sale.order is compatible to the current pos.order. Basically, we
now only allow adding new sale order to the current order if the partner_id,
partner_invoice_id and partner_shipping_id of the new sale.order are the same to
the current pos.order's linked sale.order. In other words, if the new sale.order
to settle is incompatible to the current pos.order, we create a new pos.order to
settle that sale.order.

closes odoo/odoo#118492

Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
parent ea48b639
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment