Browse Source

Jun 20: [FIX] Bug Fixed 'website_product_stock_information'

pull/331/head
RisvanaCybro 10 months ago
parent
commit
a1b96ee8c2
  1. 2
      website_product_stock_information/__manifest__.py
  2. 7
      website_product_stock_information/doc/RELEASE_NOTES.md
  3. 16
      website_product_stock_information/models/res_config_settings.py

2
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

7
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
- 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

16
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

Loading…
Cancel
Save