Add list-form view
issue8185 review255091002
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
==========
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user