From 847cbc5733c1584b165ee2e15cbbb4a773c8fdf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 22 Jan 2019 14:15:31 +0100 Subject: [PATCH] Add search and read RPC access to ir.calendar* Those access are needed by the client to display the selection widget related to those models. They do not have it by default because they do not inherit from ModelView. issue7996 --- trytond/ir/calendar_.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trytond/ir/calendar_.py b/trytond/ir/calendar_.py index 76b8cecac3..e4b6cd6f06 100644 --- a/trytond/ir/calendar_.py +++ b/trytond/ir/calendar_.py @@ -3,6 +3,7 @@ from ..cache import Cache from ..model import ModelSQL, fields, Unique +from ..rpc import RPC from ..transaction import Transaction @@ -15,6 +16,12 @@ class _Calendar(ModelSQL): def __setup__(cls): super().__setup__() t = cls.__table__() + cls.__rpc__.update({ + 'read': RPC(), + 'search': RPC(), + 'search_count': RPC(), + 'search_read': RPC(), + }) cls.index.domain = [ ('index', '>=', cls._min_index), ('index', '<=', cls._max_index),