Add list-form view

issue8185
review255091002
This commit is contained in:
Nicolas Évrard
2019-04-08 15:06:36 +02:00
parent 722db3252a
commit 9047bebdb9
3 changed files with 17 additions and 1 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add list-form view
* Do not set id for on_change calls if cached
* Add cache on RPC
* Remove support for Python 3.4
+13 -1
View File
@@ -29,12 +29,14 @@ the name of the XML file in the `view` directory:
</record>
There is three types of views:
There are different types of views:
* Form
* Tree
* List-Forms
* Graph
* Board
@@ -619,6 +621,16 @@ Display a button.
* ``help``: see in common-attributes-help_
List-Form view
==============
The list-form views use the same schema as the form views.
List-forms display records as a list of editable forms.
.. note:: The performance of the list-form does not allow to scale well for
large number of records
Graph view
==========
+3
View File
@@ -44,6 +44,7 @@ class View(ModelSQL, ModelView):
('graph', 'Graph'),
('calendar', 'Calendar'),
('board', 'Board'),
('list-form', "List Form"),
], 'View Type', select=True,
domain=[
If(Bool(Eval('inherit')),
@@ -100,6 +101,8 @@ class View(ModelSQL, ModelView):
key = (cls.__name__, type_)
rng = cls._get_rng_cache.get(key)
if rng is None:
if type_ == 'list-form':
type_ = 'form'
rng_name = os.path.join(os.path.dirname(__file__), type_ + '.rng')
with open(rng_name, 'rb') as fp:
rng = etree.fromstring(fp.read())