diff --git a/addons/email_template/wizard/email_template_preview_view.xml b/addons/email_template/wizard/email_template_preview_view.xml
index 727f5e52450..8e86d72c91d 100644
--- a/addons/email_template/wizard/email_template_preview_view.xml
+++ b/addons/email_template/wizard/email_template_preview_view.xml
@@ -26,7 +26,7 @@
-
+
diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml
index 7bb9d28f65a..3f83927bb19 100644
--- a/addons/hr_payroll/hr_payroll_view.xml
+++ b/addons/hr_payroll/hr_payroll_view.xml
@@ -337,7 +337,7 @@
-
+
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 188bd20c4ea..856289bc45c 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -222,7 +222,7 @@
-
+
diff --git a/addons/survey/wizard/survey_email_compose_message.xml b/addons/survey/wizard/survey_email_compose_message.xml
index e9ff5ccbf34..2c04b5573b7 100644
--- a/addons/survey/wizard/survey_email_compose_message.xml
+++ b/addons/survey/wizard/survey_email_compose_message.xml
@@ -47,7 +47,7 @@
-
+
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index efc51a7b7f2..abe22a60563 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -1660,8 +1660,8 @@ $sheet-padding: 16px
font-size: 20px
margin: 15px 0px 10px 0px
color: $section-title-color
- .oe_horizontal_separator:empty
- height: 5px
+ &:empty
+ height: 5px
.oe_vertical_separator
border-left: 1px solid #666
padding: 0 4px 0 4px
diff --git a/addons/website_quote/views/website_quotation_backend.xml b/addons/website_quote/views/website_quotation_backend.xml
index c3af83a5bd4..b831a4554e9 100644
--- a/addons/website_quote/views/website_quotation_backend.xml
+++ b/addons/website_quote/views/website_quotation_backend.xml
@@ -110,7 +110,7 @@
-
+
diff --git a/doc/reference/data.rst b/doc/reference/data.rst
index 6e9a004f9ac..90121bfc03e 100644
--- a/doc/reference/data.rst
+++ b/doc/reference/data.rst
@@ -199,6 +199,8 @@ Groups
``id``
the menu item's :term:`external id`
+.. _reference/data/template:
+
``template``
------------
diff --git a/doc/reference/javascript.rst b/doc/reference/javascript.rst
index 668543a906d..ae7b02c63a4 100644
--- a/doc/reference/javascript.rst
+++ b/doc/reference/javascript.rst
@@ -7,3 +7,8 @@ Widgets
RPC
===
+
+.. _reference/javascript/client:
+
+Web Client
+==========
diff --git a/doc/reference/qweb.rst b/doc/reference/qweb.rst
index 53ca153d7d5..c993c0c3c22 100644
--- a/doc/reference/qweb.rst
+++ b/doc/reference/qweb.rst
@@ -28,6 +28,8 @@ Python
Bundles
-------
+.. _reference/qweb/javascript:
+
Javascript
==========
diff --git a/doc/reference/views.rst b/doc/reference/views.rst
index da9511ac241..cf4e5e8a804 100644
--- a/doc/reference/views.rst
+++ b/doc/reference/views.rst
@@ -115,6 +115,16 @@ A view's specs are applied sequentially.
Architecture structures
=======================
+Although they are all expressed as XML and have common points (most commonly
+the presence of ```` elements), each view has its own ``arch``
+structure with a specific root elements, semantics and affordances.
+
+Most views accept the ``create``, ``edit`` and ``delete`` attributes on their
+root element, when applicable this is used to disable the corresponding action
+from the view (hide the relevant buttons or avoid displaying an interface to
+perform it). May be set to ``true`` or ``false``. Setting them to ``true``
+will override their auto-generation from access-rights.
+
.. _reference/views/list:
Lists
@@ -129,7 +139,13 @@ root can have the following attributes:
the list view itself editable in-place.
Valid values are ``top`` and ``bottom``, making *new* records appear
- respectively at the top or bottom of the list
+ respectively at the top or bottom of the list.
+
+ The architecture for the inline :ref:`form view ` is
+ derived from the list view. Most attributes valid on a :ref:`form view
+ `'s fields and buttons are thus accepted by list
+ views although they may not have any meaning if the list view is
+ non-editable
``colors``
allows changing the color of a row's text based on the corresponding
record's attributes.
@@ -173,6 +189,8 @@ root can have the following attributes:
Possible children elements of the list view are:
+.. _reference/views/list/button:
+
``button``
displays a button in a list cell
@@ -233,47 +251,693 @@ Possible children elements of the list view are:
.. declared but unused: help
``field``
- displays a field's value in a list cell
+ defines a column where the corresponding field should be displayed for
+ each record. Can use the following attributes:
+
+ ``name``
+ the name of the field to display in the current model. A given name
+ can only be used once per view
+ ``string``
+ the title of the field's column (by default, uses the ``string`` of
+ the model's field)
+ ``invisible``
+ fetches and stores the field, but doesn't display the column in the
+ table. Necessary for fields which shouldn't be displayed but are
+ used by e.g. ``@colors``
+ ``groups``
+ lists the groups which should be able to see the field
+ ``widget``
+ alternate representations for a field's display. Possible list view
+ values are:
+
+ ``progressbar``
+ displays ``float`` fields as a progress bar.
+ ``many2onebutton``
+ replaces the m2o field's value by a checkmark if the field is
+ filled, and a cross if it is not
+ ``handle``
+ for ``sequence`` fields, instead of displaying the field's value
+ just displays a dra&drop icon
+ ``sum``, ``avg``
+ displays the corresponding aggregate at the bottom of the column. The
+ aggregation is only computed on *currently displayed* records. The
+ aggregation operation must match the corresponding field's
+ ``group_operator``
+ ``attrs``
+ dynamic attributes based on record values. Only effects the current
+ field, so e.g. ``invisible`` will hide the field but leave the same
+ field of other records visible, it will not hide the column itself
+
+ .. note:: if the list view is ``editable``, any field attribute from the
+ :ref:`form view ` is also valid and will
+ be used when setting up the inline form view
.. _reference/views/form:
Forms
-----
+Form views are used to display the data from a single record. Their root
+element is ``
-
+
diff --git a/openerp/addons/base/rng/view.rng b/openerp/addons/base/rng/view.rng
index 35101fcf248..d2742927c79 100644
--- a/openerp/addons/base/rng/view.rng
+++ b/openerp/addons/base/rng/view.rng
@@ -357,52 +357,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- day
- 3days
- week
- 3weeks
- month
- 3months
- year
- 3years
- 5years
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -681,15 +652,21 @@
-
-
-
-
-
-
-
+
+
+
+ bar
+ pie
+ line
+ pivot
+
+
+
+
+ True
+
-
+
diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py
index 84e749020b9..842855249e5 100644
--- a/openerp/tools/convert.py
+++ b/openerp/tools/convert.py
@@ -796,7 +796,6 @@ form: module.record_id""" % (xml_id,)
record.append(Field(name, name='name'))
record.append(Field("qweb", name='type'))
record.append(Field(el.get('priority', "16"), name='priority'))
- record.append(Field(el, name="arch", type="xml"))
if 'inherit_id' in el.attrib:
record.append(Field(name='inherit_id', ref=el.get('inherit_id')))
groups = el.attrib.pop('groups', None)
@@ -817,6 +816,9 @@ form: module.record_id""" % (xml_id,)
record.append(Field('primary', name='mode'))
if el.get('optional'):
record.append(Field(el.get('optional'), name='application'))
+ # inject complete element (after changing node name) into
+ # the ``arch`` field
+ record.append(Field(el, name="arch", type="xml"))
return self._tag_record(cr, record, data_node)