diff --git a/pms/models/inherited_ir_http.py b/pms/models/inherited_ir_http.py index 3f4e89d0d..20dedc9a9 100644 --- a/pms/models/inherited_ir_http.py +++ b/pms/models/inherited_ir_http.py @@ -15,7 +15,11 @@ class IrHttp(models.AbstractModel): user = request.env.user res.update({ # current_pms_property should be default_property - "user_pms_properties": {'current_pms_property': (user.pms_property_id.id, user.pms_property_id.name), 'allowed_pms_properties': [(property.id, property.name) for property in user.pms_property_ids]}, + "user_pms_properties": { + 'current_pms_property': (user.pms_property_id.id, user.pms_property_id.name), + # TODO: filter all properties based on the current set of active companies + 'allowed_pms_properties': [(property.id, property.name) for property in user.pms_property_ids] + }, "display_switch_pms_property_menu": user.has_group('base.group_multi_company') and len(user.pms_property_ids) > 1, }) # TODO: This user context update should be placed in other function ¿? diff --git a/pms/static/src/js/session.js b/pms/static/src/js/session.js index 8e19784f9..ffa36b060 100644 --- a/pms/static/src/js/session.js +++ b/pms/static/src/js/session.js @@ -9,7 +9,6 @@ odoo.define('pms.session', function (require) { // TODO: require test and debug setPmsProperties: function (pms_main_property_id, pms_property_ids) { var hash = $.bbq.getState() - debugger; hash.pms_pids = pms_property_ids.sort(function(a, b) { if (a === pms_main_property_id) { return -1;