[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:
Victor Feyens 2022-11-21 16:29:59 +00:00
parent 387cf15e7f
commit b2121b7891
7 changed files with 62 additions and 62 deletions

View File

@ -355,8 +355,8 @@ complete list):
.. code-block:: xml
<tree decoration-success="is_partner==True">
<field name="name">
<field name="is_partner" invisible="1">
<field name="name"/>
<field name="is_partner" invisible="1"/>
</tree>
The records where ``is_partner`` is ``True`` will be displayed in green.

View File

@ -152,7 +152,6 @@ After that, you have to write your code inside a ``<odoo>`` tag.
.. code-block:: xml
[XML]
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
@ -164,7 +163,6 @@ Almost every element and option that you create has to be placed inside a ``<tem
.. code-block:: xml
[XML]
<template id="my_title" name="My title">
<h1>This is an HTML block</h1>
<h2 class="lead">And this is a subtitle</h2>

View File

@ -1394,7 +1394,7 @@ merge all those contexts before sending them to the server.
@api.model
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}
You can see the dictionary in the argument ``context`` contains some keys that

View File

@ -419,7 +419,7 @@ Actions triggered automatically on a predefined frequency.
Number of *interval_type* uom between two executions of the action
``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``
Number of times this action has to be run.

View File

@ -20,8 +20,8 @@ of an XML data file is the following:
.. code-block:: xml
<!-- the root elements of the data file -->
<?xml version="1.0" encoding="UTF-8"?>
<!-- the root elements of the data file -->
<odoo>
<operation/>
...
@ -188,7 +188,7 @@ values).
</data>
<record id="model_form_view" model="ir.ui.view">
...
</record>
</odoo>

View File

@ -116,7 +116,7 @@ an impact on all view types.
<tree decoration-info="state == 'draft'"
decoration-danger="state == 'help_needed'"
decoration-bf="state='busy'">
<TREE_VIEW_CONTENT>
<!-- TREE_VIEW_CONTENT -->
</tree>
.. warning::
@ -1739,6 +1739,8 @@ root can have the following attributes:
.. code-block:: xml
<tree default_order="sequence,name desc">
...
</tree>
``decoration-{$name}``
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>
<field name="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
will depend on the value currently selected for the field ``department_id``.

View File

@ -2068,7 +2068,7 @@ one2many (FieldOne2Many)
.. code-block:: xml
<field name="turtles" options="{\'create_text\': \'Add turtle\'}">
<field name="turtles" options="{\'create_text\': \'Add turtle\'}"/>
statusbar (FieldStatus)
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
<widget name="week_days">
<widget name="week_days"/>
Client actions
==============