mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Multiproperty
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Copyright 2019 Pablo Quesada
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import api, fields, models
|
||||
from odoo.http import request
|
||||
|
||||
|
||||
class ResUsers(models.Model):
|
||||
@@ -27,3 +28,12 @@ class ResUsers(models.Model):
|
||||
string="Properties",
|
||||
default=_get_default_pms_property,
|
||||
)
|
||||
|
||||
@api.model
|
||||
def get_active_property_ids(self):
|
||||
# TODO: Require performance test and security
|
||||
# checks (Review lazy_property decorator?)
|
||||
active_property_ids = list(
|
||||
map(int, request.httprequest.cookies.get("pms_pids", "").split(","))
|
||||
)
|
||||
return active_property_ids
|
||||
|
||||
Reference in New Issue
Block a user