[WIP] Multiproperty

This commit is contained in:
Darío Lodeiros
2020-10-23 09:26:42 +02:00
parent a70dafc3c6
commit 2b40bad6fb
2 changed files with 20 additions and 8 deletions

View File

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