diff --git a/stock_request/__manifest__.py b/stock_request/__manifest__.py index 5cfa5353e..0935b9666 100644 --- a/stock_request/__manifest__.py +++ b/stock_request/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock Request", "summary": "Internal request for stock", - "version": "12.0.1.0.4", + "version": "12.0.1.1.0", "license": "LGPL-3", "website": "https://github.com/stock-logistics-warehouse", "author": "Eficent, " diff --git a/stock_request/models/res_config_settings.py b/stock_request/models/res_config_settings.py index d84887c6d..63231a8c4 100644 --- a/stock_request/models/res_config_settings.py +++ b/stock_request/models/res_config_settings.py @@ -1,7 +1,7 @@ # Copyright 2018 Creu Blanca # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). -from odoo import fields, models +from odoo import api, fields, models class ResConfigSettings(models.TransientModel): @@ -17,10 +17,17 @@ class ResConfigSettings(models.TransientModel): string='Stock Requests Kanban integration') stock_request_allow_virtual_loc = fields.Boolean( - related='company_id.stock_request_allow_virtual_loc') + related='company_id.stock_request_allow_virtual_loc', + readonly=False) module_stock_request_analytic = fields.Boolean( string='Stock Requests Analytic integration') module_stock_request_submit = fields.Boolean( string='Submitted state in Stock Requests') + + # Dependencies + @api.onchange('stock_request_allow_virtual_loc') + def _onchange_stock_request_allow_virtual_loc(self): + if self.stock_request_allow_virtual_loc: + self.group_stock_multi_locations = True diff --git a/stock_request/views/res_config_settings_views.xml b/stock_request/views/res_config_settings_views.xml index feceae54b..9028743d6 100644 --- a/stock_request/views/res_config_settings_views.xml +++ b/stock_request/views/res_config_settings_views.xml @@ -32,7 +32,7 @@