diff --git a/website_product_stock_information/__manifest__.py b/website_product_stock_information/__manifest__.py index 3ebac6bc2..e90c88e6d 100644 --- a/website_product_stock_information/__manifest__.py +++ b/website_product_stock_information/__manifest__.py @@ -21,7 +21,7 @@ ################################################################################ { 'name': "Website Product Stock", - 'version': '17.0.1.0.0', + 'version': '17.0.1.0.1', 'category': 'Website', 'summary': 'Allows users to see stock details of products from the website', 'description': """Helps to display the stock details of each product on diff --git a/website_product_stock_information/doc/RELEASE_NOTES.md b/website_product_stock_information/doc/RELEASE_NOTES.md index 88e6d1b8e..247669443 100644 --- a/website_product_stock_information/doc/RELEASE_NOTES.md +++ b/website_product_stock_information/doc/RELEASE_NOTES.md @@ -3,4 +3,9 @@ #### 24.11.2023 #### Version 17.0.1.0.0 #### ADD -- Initial commit for Website Product Stock \ No newline at end of file +- Initial commit for Website Product Stock + +#### 19.06.2024 +#### Version 17.0.1.0.1 +#### UPDT +- Updated function to get values in the 'res.config.settings' model \ No newline at end of file diff --git a/website_product_stock_information/models/res_config_settings.py b/website_product_stock_information/models/res_config_settings.py index 805ff107c..4765e54c5 100644 --- a/website_product_stock_information/models/res_config_settings.py +++ b/website_product_stock_information/models/res_config_settings.py @@ -54,13 +54,13 @@ class ResConfigSettings(models.TransientModel): def get_values(self): """to get values in settings""" res = super().get_values() - IrDefault = self.env['ir.default'].sudo() + IrDefaultGet = self.env['ir.default'].sudo()._get res.update( - location_type=IrDefault._get_model_defaults('product.template', - 'location_type') or 'all', - stock_location_id=IrDefault._get_model_defaults('product.template', - 'stock_location_id') or - self.env.ref('stock.stock_location_stock'), - stock_type=IrDefault._get_model_defaults('product.template', - 'stock_type') or 'on_hand') + location_type=IrDefaultGet('product.template', 'location_type') or + 'all', + stock_location_id=IrDefaultGet('product.template', + 'stock_location_id') or + self.env.ref('stock.stock_location_stock'), + stock_type=IrDefaultGet('product.template', 'stock_type') or + 'on_hand') return res