Skip to content

Commit

Permalink
[WIP]pms: old field price produt.template -> standard_price?
Browse files Browse the repository at this point in the history
  • Loading branch information
DarioLodeiros committed Oct 1, 2024
1 parent bbb2ec7 commit b2b8355
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pms/models/pms_reservation_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def _get_display_price(self, product):
if self.reservation_id.pricelist_id.discount_policy == "with_discount":
return product.with_context(
pricelist=self.reservation_id.pricelist_id.id
).price
).standard_price
product_context = dict(
self.env.context,
partner_id=self.reservation_id.partner_id.id,
Expand Down
2 changes: 1 addition & 1 deletion pms/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _pms_get_display_price(
pricelist = self.env["product.pricelist"].browse(pricelist_id)
partner = self.env["res.partner"].browse(partner_id) if partner_id else False
if pricelist.discount_policy == "with_discount":
return product.price
return product.standard_price
final_price, rule_id = pricelist.with_context(
product._context
).get_product_price_rule(product, product_qty or 1.0, partner)
Expand Down
2 changes: 1 addition & 1 deletion pms/wizards/pms_booking_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def _get_price_by_room_type(
uom=product.uom_id.id,
property=pms_property_id,
)
room_type_total_price_per_room += product.price
room_type_total_price_per_room += product.standard_price

if board_service_room_id:
board_service_room = self.env["pms.board.service.room.type"].browse(
Expand Down

0 comments on commit b2b8355

Please sign in to comment.