From 624a4ffed67856bc0638af77f6aae0d4aa5cb64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Sun, 20 Nov 2022 10:15:27 +0100 Subject: [PATCH] [ADD]pms_api_rest: pricelist pms enabled configuration --- pms_api_rest/services/pms_pricelist_service.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pms_api_rest/services/pms_pricelist_service.py b/pms_api_rest/services/pms_pricelist_service.py index 21061cdd1..3fa38af65 100644 --- a/pms_api_rest/services/pms_pricelist_service.py +++ b/pms_api_rest/services/pms_pricelist_service.py @@ -28,7 +28,11 @@ class PmsPricelistService(Component): auth="jwt_api_pms", ) def get_pricelists(self, pms_search_param, **args): - pricelists = self.env["product.pricelist"].search([]) + pricelists = self.env["product.pricelist"].search( + [ + ("is_pms_available", "=", True), + ] + ) if pms_search_param.pmsPropertyIds and pms_search_param.pmsPropertyId: raise ValidationError( _(