diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-05-04 17:09:51 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-05-04 17:09:51 +0200 |
| commit | 0fbc92e0c4c07d61da55d0bbb3cadd55f51dc4d7 (patch) | |
| tree | 4be569ab0f86370fe9044a9b13d69c858c980de0 /doc | |
| parent | 858188f1a2a2207cf93cc0f2d0d2deb08bb7dbf6 (diff) | |
| parent | 1e86774207d09c901c61b148c5c0c23a511aa282 (diff) | |
[MERGE] forward port of branch saas-10 up to 1e86774
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/cla/corporate/initos.md | 8 | ||||
| -rw-r--r-- | doc/howtos/backend.rst | 3 | ||||
| -rw-r--r-- | doc/reference/guidelines.rst | 10 | ||||
| -rw-r--r-- | doc/reference/orm.rst | 1 | ||||
| -rw-r--r-- | doc/reference/views.rst | 17 |
5 files changed, 29 insertions, 10 deletions
diff --git a/doc/cla/corporate/initos.md b/doc/cla/corporate/initos.md index 0bede7135e2..3c95fe2d07f 100644 --- a/doc/cla/corporate/initos.md +++ b/doc/cla/corporate/initos.md @@ -1,6 +1,6 @@ -Germany, 2015-02-26 +Germany, 2016-04-20 -initOS GmbH & Co. KG agrees to the terms of the Odoo Corporate +initOS GmbH agrees to the terms of the Odoo Corporate Contributor License Agreement v1.0. I declare that I am authorized and able to make this agreement and sign this @@ -8,7 +8,7 @@ declaration. Signed, -Markus Schneider markus.schneider@initos.com https://github.com/OSguard +Frederik Kramer frederik.kramer@initos.com https://github.com/OSevangelist List of contributors: @@ -19,3 +19,5 @@ Frederik Kramer frederik.kramer@initos.com https://github.com/OSevangelist Nikolina Todorova nikolina.todorova@initos.com https://github.com/ntodorova Peter Hahn peter.hahn@initos.com https://github.com/codingforfun Claudia Haida claudia.haida@initos.com +Andreas Zöllner andreas.zoellner@initos.com https://github.com/azoellner +Rami Alwafaie rami.alwafaie@initos.com https://github.com/rami-wafaie diff --git a/doc/howtos/backend.rst b/doc/howtos/backend.rst index 17f3a4a986c..afde93b349d 100644 --- a/doc/howtos/backend.rst +++ b/doc/howtos/backend.rst @@ -643,7 +643,8 @@ instead of a single view its ``arch`` field is composed of any number of ``inside`` appends ``xpath``'s body at the end of the matched element ``replace`` - replaces the matched element by the ``xpath``'s body + replaces the matched element with the ``xpath``'s body, replacing any `$0` node occurrence + in the new body with the original element ``before`` inserts the ``xpath``'s body as a sibling before the matched element ``after`` diff --git a/doc/reference/guidelines.rst b/doc/reference/guidelines.rst index e4cfe1255ec..54a00097705 100644 --- a/doc/reference/guidelines.rst +++ b/doc/reference/guidelines.rst @@ -11,6 +11,14 @@ aim to improve the quality of the code (better readability of source, ...) and Odoo Apps. Indeed, proper code ought ease maintenance, aid debugging, lower complexity and promote reliability. +.. warning:: + + These guidelines are written with new modules and new files in mind. When + modifying existing files, the original style of the file strictly supersedes + any other style guidelines. In other words, never modify existing files in + order to apply these guidelines, to avoid disrupting the revision history of + each line. For more details, see our `pull request guide <https://odoo.com/submit-pr>`_. + Module structure ================ @@ -271,7 +279,7 @@ Idioms - Always favor *Readability* over *conciseness* or using the language features or idioms. - Use list comprehension, dict comprehension, and basic manipulation using ``map``, ``filter``, ``sum``, ... They make the code easier to read. - The same applies for recordset methods : use ``filtered``, ``mapped``, ``sorted``, ... -- Each python file should have ``# -*- coding: utf-8 -*-`` as first line +- Each python file should have ``# coding: utf-8 `` as first line - Use the ``UserError`` defined in ``openerp.exceptions`` instead of overriding ``Warning``, or find a more appropriate exception in *exceptions.py* - Document your code (docstring on methods, simple comments for the tricky part of the code) - Use meaningful variable/class/method names diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst index 9d232b417da..af5c3cb267f 100644 --- a/doc/reference/orm.rst +++ b/doc/reference/orm.rst @@ -678,6 +678,7 @@ Model Reference .. automethod:: write .. automethod:: read + .. automethod:: read_group .. rubric:: Research diff --git a/doc/reference/views.rst b/doc/reference/views.rst index 3c8eaa02126..6bed888f571 100644 --- a/doc/reference/views.rst +++ b/doc/reference/views.rst @@ -76,15 +76,19 @@ The result of applying children views yields the final ``arch`` Inheritance specs ----------------- -There are three types of inheritance specs: +Inheritance specs are comprised of an element locator, to match +the inherited element in the parent view, and children element that +will be used to modify the inherited element. + +There are three types of element locators for matching a target element: * An ``xpath`` element with an ``expr`` attribute. ``expr`` is an XPath_ expression\ [#hasclass]_ applied to the current ``arch``, the first node it finds is the match * a ``field`` element with a ``name`` attribute, matches the first ``field`` - with the same ``name`` -* any other element, the first element with the same name and identical - attributes (ignoring ``position``) is matched + with the same ``name``. All other attributes are ignored during matching +* any other element: the first element with the same name and identical + attributes (ignoring ``position`` and ``version`` attributes) is matched The inheritance spec may have an optional ``position`` attribute specifying how the matched node should be altered: @@ -92,7 +96,10 @@ how the matched node should be altered: ``inside`` (default) the content of the inheritance spec is appended to the matched node ``replace`` - the content of the inheritance spec replaces the matched node + the content of the inheritance spec replaces the matched node. + Any text node containing only `$0` within the contents of the spec will + be replaced by a complete copy of the matched node, effectively wrapping + the matched node. ``after`` the content of the inheritance spec is added to the matched node's parent, after the matched node |
