mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[MIG] V13 properties menu
This commit is contained in:
@@ -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 ¿?
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user