changeset ec9dd80cc0e5 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset&node=ec9dd80cc0e5
description:
Add RPC view_get method to View
This allows to extend the inherit mechanism of the view and support
inherit for
the board view.
Also the inherit is now applied to all element found by the xpath.
issue11107
issue11108
review389601002
diffstat:
CHANGELOG | 1 +
tryton/gui/window/board.py | 11 ++++-------
2 files changed, 5 insertions(+), 7 deletions(-)
diffs (37 lines):
diff -r 2186f2f3b872 -r ec9dd80cc0e5 CHANGELOG
--- a/CHANGELOG Sun Jan 23 13:27:52 2022 +0100
+++ b/CHANGELOG Sun Jan 23 13:32:59 2022 +0100
@@ -1,3 +1,4 @@
+* Call view_get for board view
* Limit board action domain to active id and ids
* Add support for Python 3.10
* Remove support for Python 3.6
diff -r 2186f2f3b872 -r ec9dd80cc0e5 tryton/gui/window/board.py
--- a/tryton/gui/window/board.py Sun Jan 23 13:27:52 2022 +0100
+++ b/tryton/gui/window/board.py Sun Jan 23 13:32:59 2022 +0100
@@ -4,7 +4,7 @@
import gettext
import xml.dom.minidom
-from tryton.common import MODELNAME, RPCException, RPCExecute
+from tryton.common import MODELNAME, RPCExecute
from tryton.gui import Main
from tryton.gui.window.view_board import ViewBoard
@@ -20,13 +20,10 @@
super(Board, self).__init__(**attributes)
context = attributes.get('context')
- self.view_ids = attributes.get('view_ids')
+ self.view_id, = attributes.get('view_ids')
- try:
- view, = RPCExecute('model', 'ir.ui.view', 'read',
- self.view_ids, ['arch'], context=context)
- except RPCException:
- raise
+ view = RPCExecute(
+ 'model', 'ir.ui.view', 'view_get', self.view_id, context=context)
xml_dom = xml.dom.minidom.parseString(view['arch'])
root, = xml_dom.childNodes