From f932670a4baccaaa0a7576687243aa568c25e9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Thu, 21 Jan 2021 00:37:45 +0100 Subject: [PATCH] [FIX] pricelist get items in services --- pms/models/product_pricelist.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pms/models/product_pricelist.py b/pms/models/product_pricelist.py index 280075afc..aead05b70 100644 --- a/pms/models/product_pricelist.py +++ b/pms/models/product_pricelist.py @@ -69,7 +69,12 @@ class ProductPricelist(models.Model): def _compute_price_rule_get_items( self, products_qty_partner, date, uom_id, prod_tmpl_ids, prod_ids, categ_ids ): - if "property" in self._context and self._context["property"]: + + if ( + "property" in self._context + and self._context["property"] + and "date_overnight" in self._context + ): self.env["product.pricelist.item"].flush( ["price", "currency_id", "company_id"] )