[FIX] developer/*: code blocks linting & fixes
invalid xml invalid python correct indentation closes odoo/documentation#3001 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
parent
387cf15e7f
commit
b2121b7891
@ -355,8 +355,8 @@ complete list):
|
|||||||
.. code-block:: xml
|
.. code-block:: xml
|
||||||
|
|
||||||
<tree decoration-success="is_partner==True">
|
<tree decoration-success="is_partner==True">
|
||||||
<field name="name">
|
<field name="name"/>
|
||||||
<field name="is_partner" invisible="1">
|
<field name="is_partner" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
|
|
||||||
The records where ``is_partner`` is ``True`` will be displayed in green.
|
The records where ``is_partner`` is ``True`` will be displayed in green.
|
||||||
|
@ -152,7 +152,6 @@ After that, you have to write your code inside a ``<odoo>`` tag.
|
|||||||
|
|
||||||
.. code-block:: xml
|
.. code-block:: xml
|
||||||
|
|
||||||
[XML]
|
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
@ -164,7 +163,6 @@ Almost every element and option that you create has to be placed inside a ``<tem
|
|||||||
|
|
||||||
.. code-block:: xml
|
.. code-block:: xml
|
||||||
|
|
||||||
[XML]
|
|
||||||
<template id="my_title" name="My title">
|
<template id="my_title" name="My title">
|
||||||
<h1>This is an HTML block</h1>
|
<h1>This is an HTML block</h1>
|
||||||
<h2 class="lead">And this is a subtitle</h2>
|
<h2 class="lead">And this is a subtitle</h2>
|
||||||
|
@ -1394,7 +1394,7 @@ merge all those contexts before sending them to the server.
|
|||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def my_method(self):
|
def my_method(self):
|
||||||
print self.env.context
|
print(self.env.context)
|
||||||
// will print: {'lang': 'en_US', 'new_key': 'key_value', 'tz': 'Europe/Brussels', 'uid': 1}
|
// will print: {'lang': 'en_US', 'new_key': 'key_value', 'tz': 'Europe/Brussels', 'uid': 1}
|
||||||
|
|
||||||
You can see the dictionary in the argument ``context`` contains some keys that
|
You can see the dictionary in the argument ``context`` contains some keys that
|
||||||
|
@ -419,7 +419,7 @@ Actions triggered automatically on a predefined frequency.
|
|||||||
Number of *interval_type* uom between two executions of the action
|
Number of *interval_type* uom between two executions of the action
|
||||||
|
|
||||||
``interval_type``
|
``interval_type``
|
||||||
Unit of measure of frequency interval (``minutes``, ``hours``, ``days``, ``weeks``, ``months``,
|
Unit of measure of frequency interval (``minutes``, ``hours``, ``days``, ``weeks``, ``months``)
|
||||||
|
|
||||||
``numbercall``
|
``numbercall``
|
||||||
Number of times this action has to be run.
|
Number of times this action has to be run.
|
||||||
|
@ -20,8 +20,8 @@ of an XML data file is the following:
|
|||||||
|
|
||||||
.. code-block:: xml
|
.. code-block:: xml
|
||||||
|
|
||||||
<!-- the root elements of the data file -->
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- the root elements of the data file -->
|
||||||
<odoo>
|
<odoo>
|
||||||
<operation/>
|
<operation/>
|
||||||
...
|
...
|
||||||
@ -188,7 +188,7 @@ values).
|
|||||||
</data>
|
</data>
|
||||||
|
|
||||||
<record id="model_form_view" model="ir.ui.view">
|
<record id="model_form_view" model="ir.ui.view">
|
||||||
|
...
|
||||||
</record>
|
</record>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ an impact on all view types.
|
|||||||
<tree decoration-info="state == 'draft'"
|
<tree decoration-info="state == 'draft'"
|
||||||
decoration-danger="state == 'help_needed'"
|
decoration-danger="state == 'help_needed'"
|
||||||
decoration-bf="state='busy'">
|
decoration-bf="state='busy'">
|
||||||
<TREE_VIEW_CONTENT>
|
<!-- TREE_VIEW_CONTENT -->
|
||||||
</tree>
|
</tree>
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
@ -1739,6 +1739,8 @@ root can have the following attributes:
|
|||||||
.. code-block:: xml
|
.. code-block:: xml
|
||||||
|
|
||||||
<tree default_order="sequence,name desc">
|
<tree default_order="sequence,name desc">
|
||||||
|
...
|
||||||
|
</tree>
|
||||||
|
|
||||||
``decoration-{$name}``
|
``decoration-{$name}``
|
||||||
allow changing the style of a row's text based on the corresponding
|
allow changing the style of a row's text based on the corresponding
|
||||||
@ -2485,7 +2487,7 @@ Possible children elements of the search view are:
|
|||||||
<searchpanel>
|
<searchpanel>
|
||||||
<field name="department_id"/>
|
<field name="department_id"/>
|
||||||
<field name="manager_id" select="multi" domain="[('department_id', '=', department_id)]"/>
|
<field name="manager_id" select="multi" domain="[('department_id', '=', department_id)]"/>
|
||||||
<searchpanel/>
|
</searchpanel>
|
||||||
|
|
||||||
In the above example, the range of values for manager_id (manager names) available at screen
|
In the above example, the range of values for manager_id (manager names) available at screen
|
||||||
will depend on the value currently selected for the field ``department_id``.
|
will depend on the value currently selected for the field ``department_id``.
|
||||||
|
@ -2068,7 +2068,7 @@ one2many (FieldOne2Many)
|
|||||||
|
|
||||||
.. code-block:: xml
|
.. code-block:: xml
|
||||||
|
|
||||||
<field name="turtles" options="{\'create_text\': \'Add turtle\'}">
|
<field name="turtles" options="{\'create_text\': \'Add turtle\'}"/>
|
||||||
|
|
||||||
statusbar (FieldStatus)
|
statusbar (FieldStatus)
|
||||||
This is a really specialized widget for the form views. It is the bar on top
|
This is a really specialized widget for the form views. It is the bar on top
|
||||||
@ -2096,7 +2096,7 @@ week_days (WeekDays)
|
|||||||
|
|
||||||
.. code-block:: xml
|
.. code-block:: xml
|
||||||
|
|
||||||
<widget name="week_days">
|
<widget name="week_days"/>
|
||||||
|
|
||||||
Client actions
|
Client actions
|
||||||
==============
|
==============
|
||||||
|
Loading…
Reference in New Issue
Block a user