[IMP] event_booth_sale: use order pricelist

Harmonize _get_display_price between event_sale &
event_booth_sale.
Do not rely on contextual stuff when information is
available without using contextual data.

closes odoo/odoo#110833

Related: odoo/upgrade#4256
Related: odoo/enterprise#36210
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
Victor Feyens
2023-02-03 05:09:06 +01:00
parent 963ffed514
commit c2dbf302f3
@@ -93,8 +93,7 @@ class SaleOrderLine(models.Model):
def _get_display_price(self):
if self.event_booth_pending_ids and self.event_id:
company = self.event_id.company_id or self.env.company
product = self.event_booth_pending_ids.booth_category_id.product_id
pricelist = product.product_tmpl_id._get_contextual_pricelist()
pricelist = self.order_id.pricelist_id
if pricelist.discount_policy == "with_discount":
total_price = sum([booth.booth_category_id.price_reduce for booth in self.event_booth_pending_ids])
else: