diff options
| author | Moisés López <moylop260@vauxoo.com> | 2017-07-10 21:52:35 -0500 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2017-07-13 17:15:51 +0200 |
| commit | ca82c77d48f88ea4de708fcbc8dedfde30e30269 (patch) | |
| tree | 8421b82214fbe129145e8cd32ccc893c3bacad1a /doc | |
| parent | 3073bf0f542402dea034f74012a3c1f90ea70412 (diff) | |
[IMP] doc: remove <data> tag from xml files
Because now is no longer required
Closes #18144
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/howtos/backend.rst | 4 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-access-rights | 4 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-access-rules | 2 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-basic-action | 4 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-creation | 8 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-dashboard | 4 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-demo | 4 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-domain-advanced | 2 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-formview | 2 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-model-inheritance | 4 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-report | 4 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-session | 2 | ||||
| -rw-r--r-- | doc/howtos/backend/exercise-wizard-launch | 2 | ||||
| -rw-r--r-- | doc/howtos/themes.rst | 20 | ||||
| -rw-r--r-- | doc/howtos/website/course-product | 6 | ||||
| -rw-r--r-- | doc/howtos/website/demo-data | 4 | ||||
| -rw-r--r-- | doc/howtos/website/module-empty | 8 | ||||
| -rw-r--r-- | doc/howtos/website/teachers-menu | 4 | ||||
| -rw-r--r-- | doc/howtos/website/template | 2 | ||||
| -rw-r--r-- | doc/howtos/website/website-support | 2 | ||||
| -rw-r--r-- | doc/reference/guidelines.rst | 4 |
21 files changed, 48 insertions, 48 deletions
diff --git a/doc/howtos/backend.rst b/doc/howtos/backend.rst index 992388c57f7..a42a92261ca 100644 --- a/doc/howtos/backend.rst +++ b/doc/howtos/backend.rst @@ -230,11 +230,11 @@ record. .. code-block:: xml <odoo> - <data> + <record model="{model name}" id="{record identifier}"> <field name="{a field name}">{a value}</field> </record> - </data> + </odoo> * ``model`` is the name of the Odoo model for the record. diff --git a/doc/howtos/backend/exercise-access-rights b/doc/howtos/backend/exercise-access-rights index 65165f14b29..465dffea804 100644 --- a/doc/howtos/backend/exercise-access-rights +++ b/doc/howtos/backend/exercise-access-rights @@ -32,9 +32,9 @@ Index: addons/openacademy/security/security.xml +++ addons/openacademy/security/security.xml 2014-08-26 17:26:18.135783102 +0200 @@ -0,0 +1,7 @@ +<odoo> -+ <data> ++ + <record id="group_manager" model="res.groups"> + <field name="name">OpenAcademy / Manager</field> + </record> -+ </data> ++ +</odoo> diff --git a/doc/howtos/backend/exercise-access-rules b/doc/howtos/backend/exercise-access-rules index 40cdacfe03e..1d78adb984e 100644 --- a/doc/howtos/backend/exercise-access-rules +++ b/doc/howtos/backend/exercise-access-rules @@ -23,5 +23,5 @@ Index: addons/openacademy/security/security.xml + ('responsible_id','=',user.id)] + </field> + </record> - </data> + </odoo> diff --git a/doc/howtos/backend/exercise-basic-action b/doc/howtos/backend/exercise-basic-action index b8876a1f9e8..537554b6cd7 100644 --- a/doc/howtos/backend/exercise-basic-action +++ b/doc/howtos/backend/exercise-basic-action @@ -19,7 +19,7 @@ Index: addons/openacademy/views/openacademy.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<odoo> -+ <data> ++ + <!-- window action --> + <!-- + The following tag is an action definition for a "window action", @@ -50,5 +50,5 @@ Index: addons/openacademy/views/openacademy.xml + <!-- Full id location: + action="openacademy.course_list_action" + It is not required when it is the same module --> -+ </data> ++ +</odoo> diff --git a/doc/howtos/backend/exercise-creation b/doc/howtos/backend/exercise-creation index 490f7fd7a02..a6ffeda8602 100644 --- a/doc/howtos/backend/exercise-creation +++ b/doc/howtos/backend/exercise-creation @@ -79,7 +79,7 @@ Index: addons/openacademy/demo.xml +++ addons/openacademy/demo.xml 2014-08-26 17:25:49.791783523 +0200 @@ -0,0 +1,25 @@ +<odoo> -+ <data> ++ + <!-- --> + <!-- <record id="object0" model="openacademy.openacademy"> --> + <!-- <field name="name">Object 0</field> --> @@ -101,7 +101,7 @@ Index: addons/openacademy/demo.xml + <!-- <field name="name">Object 4</field> --> + <!-- </record> --> + <!-- --> -+ </data> ++ +</odoo> Index: addons/openacademy/models.py =================================================================== @@ -129,7 +129,7 @@ Index: addons/openacademy/templates.xml +++ addons/openacademy/templates.xml 2014-08-26 17:25:49.791783523 +0200 @@ -0,0 +1,22 @@ +<odoo> -+ <data> ++ + <!-- <template id="listing"> --> + <!-- <ul> --> + <!-- <li t-foreach="objects" t-as="object"> --> @@ -148,5 +148,5 @@ Index: addons/openacademy/templates.xml + <!-- </t> --> + <!-- </dl> --> + <!-- </template> --> -+ </data> ++ +</odoo> diff --git a/doc/howtos/backend/exercise-dashboard b/doc/howtos/backend/exercise-dashboard index 91bc239dd7a..eda27131096 100644 --- a/doc/howtos/backend/exercise-dashboard +++ b/doc/howtos/backend/exercise-dashboard @@ -28,7 +28,7 @@ Index: addons/openacademy/views/session_board.xml @@ -0,0 +1,66 @@ +<?xml version="1.0"?> +<odoo> -+ <data> ++ + <record model="ir.actions.act_window" id="act_session_graph"> + <field name="name">Attendees by course</field> + <field name="res_model">openacademy.session</field> @@ -90,5 +90,5 @@ Index: addons/openacademy/views/session_board.xml + action="open_board_session" + sequence="1" + id="menu_board_session" icon="terp-graph"/> -+ </data> ++ +</odoo> diff --git a/doc/howtos/backend/exercise-demo b/doc/howtos/backend/exercise-demo index a03007d7fe9..69b202db15d 100644 --- a/doc/howtos/backend/exercise-demo +++ b/doc/howtos/backend/exercise-demo @@ -7,7 +7,7 @@ Index: addons/openacademy/demo.xml +++ addons/openacademy/demo.xml 2014-08-26 17:25:52.679783480 +0200 @@ -1,25 +1,19 @@ <odoo> - <data> + - <!-- --> - <!-- <record id="object0" model="openacademy.openacademy"> --> - <!-- <field name="name">Object 0</field> --> @@ -44,5 +44,5 @@ Index: addons/openacademy/demo.xml + <field name="name">Course 2</field> + <field name="description">Course 2's description</field> + </record> - </data> + </odoo> diff --git a/doc/howtos/backend/exercise-domain-advanced b/doc/howtos/backend/exercise-domain-advanced index bed90880dcd..db7b89f5d81 100644 --- a/doc/howtos/backend/exercise-domain-advanced +++ b/doc/howtos/backend/exercise-domain-advanced @@ -39,5 +39,5 @@ Index: addons/openacademy/views/partner.xml + <record model="res.partner.category" id="teacher2"> + <field name="name">Teacher / Level 2</field> + </record> - </data> + </odoo> diff --git a/doc/howtos/backend/exercise-formview b/doc/howtos/backend/exercise-formview index 8de3e69f7e6..c42d451b1ea 100644 --- a/doc/howtos/backend/exercise-formview +++ b/doc/howtos/backend/exercise-formview @@ -8,7 +8,7 @@ Index: addons/openacademy/views/openacademy.xml @@ -1,6 +1,21 @@ <?xml version="1.0" encoding="UTF-8"?> <odoo> - <data> + + <record model="ir.ui.view" id="course_form_view"> + <field name="name">course.form</field> + <field name="model">openacademy.course</field> diff --git a/doc/howtos/backend/exercise-model-inheritance b/doc/howtos/backend/exercise-model-inheritance index f74e5e95c33..073d706c89a 100644 --- a/doc/howtos/backend/exercise-model-inheritance +++ b/doc/howtos/backend/exercise-model-inheritance @@ -46,7 +46,7 @@ Index: addons/openacademy/views/partner.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> + <odoo> -+ <data> ++ + <!-- Add instructor field to existing view --> + <record model="ir.ui.view" id="partner_instructor_form_view"> + <field name="name">partner.instructor</field> @@ -74,5 +74,5 @@ Index: addons/openacademy/views/partner.xml + <menuitem id="contact_menu" name="Contacts" + parent="configuration_menu" + action="contact_list_action"/> -+ </data> ++ +</odoo> diff --git a/doc/howtos/backend/exercise-report b/doc/howtos/backend/exercise-report index 351d34a92b2..2f8b5dfe5e8 100644 --- a/doc/howtos/backend/exercise-report +++ b/doc/howtos/backend/exercise-report @@ -19,7 +19,7 @@ Index: addons/openacademy/reports.xml +++ addons/openacademy/reports.xml 2014-08-29 08:41:12.663540061 +0200 @@ -0,0 +1,30 @@ +<odoo> -+<data> ++ + <report + id="report_session" + model="openacademy.session" @@ -46,5 +46,5 @@ Index: addons/openacademy/reports.xml + </t> + </t> + </template> -+</data> ++ +</odoo> diff --git a/doc/howtos/backend/exercise-session b/doc/howtos/backend/exercise-session index 9a6fe886932..a189a3d3a64 100644 --- a/doc/howtos/backend/exercise-session +++ b/doc/howtos/backend/exercise-session @@ -54,5 +54,5 @@ Index: addons/openacademy/views/openacademy.xml + <menuitem id="session_menu" name="Sessions" + parent="openacademy_menu" + action="session_list_action"/> - </data> + </odoo> diff --git a/doc/howtos/backend/exercise-wizard-launch b/doc/howtos/backend/exercise-wizard-launch index d864eef3f87..49b1c09191e 100644 --- a/doc/howtos/backend/exercise-wizard-launch +++ b/doc/howtos/backend/exercise-wizard-launch @@ -42,5 +42,5 @@ Index: addons/openacademy/views/openacademy.xml + view_mode="form" + target="new" + key2="client_action_multi"/> - </data> + </odoo> diff --git a/doc/howtos/themes.rst b/doc/howtos/themes.rst index 16c20408b63..4f57d88d9af 100644 --- a/doc/howtos/themes.rst +++ b/doc/howtos/themes.rst @@ -144,16 +144,16 @@ Odoo's XML files, an overview ----------------------------- Any Odoo XML file starts with encoding specifications. -After that, you have to write your code inside a ``<data>`` tag, placed into an ``</odoo>`` tag. +After that, you have to write your code inside a ``<odoo>`` tag. .. code-block:: xml [XML] <?xml version="1.0" encoding="utf-8" ?> <odoo> - <data> + ## YOUR CODE HERE - </data> + </odoo> Almost every element and option that you create has to be placed inside a ``<template>`` tag, like in this example. @@ -310,12 +310,12 @@ To do so, create a **layout.xml** file in your **views** folder and add the defa <?xml version="1.0" encoding="utf-8" ?> <odoo> - <data> - </data> + + </odoo> -Create a new template into the ``<data>`` tag, copy-pasting the following +Create a new template into the ``<odoo>`` tag, copy-pasting the following code. .. code-block:: xml @@ -373,14 +373,14 @@ Imagine that we want to create a specific layout for a Services page. For this page, we need to add a list of services to the top and give the client the possibility of setting the rest of the page’s layout using snippets. Inside your *views* folder, create a **pages.xml** file and add the -default Odoo markup. Inside ``<data>`` create a ``<template>`` tag, set the +default Odoo markup. Inside ``<odoo>`` create a ``<template>`` tag, set the ``page`` attribute to ``True`` and add your code into it. .. code-block:: xml <?xml version="1.0" encoding="utf-8" ?> <odoo> - <data> + <!-- === Services Page === --> <template name="Services page" id="website.services" page="True"> <h1>Our Services</h1> @@ -390,7 +390,7 @@ default Odoo markup. Inside ``<data>`` create a ``<template>`` tag, set the <li>Unlimited space</li> </ul> </template> - </data> + </odoo> The page title will be the template ID. In our case *Services* (from ``website.services``) @@ -430,7 +430,6 @@ can fill with snippets. To achieve this, just create a ``div`` with <?xml version="1.0" encoding="utf-8" ?> <odoo> - <data> <!-- === Services Page === --> <template name="Services page" id="website.services" page="True"> @@ -450,7 +449,6 @@ can fill with snippets. To achieve this, just create a ``div`` with </t> </template> - </data> </odoo> .. tip:: diff --git a/doc/howtos/website/course-product b/doc/howtos/website/course-product index f5b25e36068..0508da60851 100644 --- a/doc/howtos/website/course-product +++ b/doc/howtos/website/course-product @@ -18,12 +18,12 @@ new file mode 100644 --- /dev/null +++ b/academy/data.xml @@ -0,0 +1,6 @@ -+<odoo><data> ++<odoo> + <record model="product.public.category" id="category_courses"> + <field name="name">Courses</field> + <field name="parent_id" ref="website_sale.categ_others"/> + </record> -+</data></odoo> ++</odoo> diff --git a/academy/demo.xml b/academy/demo.xml --- a/academy/demo.xml +++ b/academy/demo.xml @@ -56,7 +56,7 @@ diff --git a/academy/demo.xml b/academy/demo.xml + <field name="list_price" type="float">0</field> + <field name="type">service</field> + </record> - </data> + </odoo> diff --git a/academy/models.py b/academy/models.py --- a/academy/models.py diff --git a/doc/howtos/website/demo-data b/doc/howtos/website/demo-data index 18da4bcdf79..0e34b57463b 100644 --- a/doc/howtos/website/demo-data +++ b/doc/howtos/website/demo-data @@ -7,7 +7,7 @@ diff --git a/academy/demo.xml b/academy/demo.xml +++ b/academy/demo.xml @@ -1,25 +1,13 @@ <odoo> - <data> + - <!-- --> - <!-- <record id="object0" model="academy.academy"> --> - <!-- <field name="name">Object 0</field> --> @@ -38,5 +38,5 @@ diff --git a/academy/demo.xml b/academy/demo.xml + <record id="vaughn" model="academy.teachers"> + <field name="name">Lester Vaughn</field> + </record> - </data> + </odoo> diff --git a/doc/howtos/website/module-empty b/doc/howtos/website/module-empty index 71d56e6fc71..4b6c69c2908 100644 --- a/doc/howtos/website/module-empty +++ b/doc/howtos/website/module-empty @@ -80,7 +80,7 @@ new file mode 100644 +++ b/academy/demo.xml @@ -0,0 +1,25 @@ +<odoo> -+ <data> ++ + <!-- --> + <!-- <record id="object0" model="academy.academy"> --> + <!-- <field name="name">Object 0</field> --> @@ -102,7 +102,7 @@ new file mode 100644 + <!-- <field name="name">Object 4</field> --> + <!-- </record> --> + <!-- --> -+ </data> ++ +</odoo> diff --git a/academy/models.py b/academy/models.py new file mode 100644 @@ -130,7 +130,7 @@ new file mode 100644 +++ b/academy/templates.xml @@ -0,0 +1,22 @@ +<odoo> -+ <data> ++ + <!-- <template id="listing"> --> + <!-- <ul> --> + <!-- <li t-foreach="objects" t-as="object"> --> @@ -149,5 +149,5 @@ new file mode 100644 + <!-- </t> --> + <!-- </dl> --> + <!-- </template> --> -+ </data> ++ +</odoo> diff --git a/doc/howtos/website/teachers-menu b/doc/howtos/website/teachers-menu index f5db4a0fd0e..6e7bdbc1aaa 100644 --- a/doc/howtos/website/teachers-menu +++ b/doc/howtos/website/teachers-menu @@ -19,7 +19,7 @@ new file mode 100644 +++ b/academy/views.xml @@ -0,0 +1,13 @@ +<odoo> -+ <data> ++ + <record id="action_academy_teachers" model="ir.actions.act_window"> + <field name="name">Academy teachers</field> + <field name="res_model">academy.teachers</field> @@ -31,5 +31,5 @@ new file mode 100644 + <menuitem id="menu_academy_content_teachers" + parent="menu_academy_content" + action="action_academy_teachers"/> -+ </data> ++ +</odoo> diff --git a/doc/howtos/website/template b/doc/howtos/website/template index 541e39513fe..705eb4c4165 100644 --- a/doc/howtos/website/template +++ b/doc/howtos/website/template @@ -21,7 +21,7 @@ diff --git a/academy/templates.xml b/academy/templates.xml +++ b/academy/templates.xml @@ -1,14 +1,11 @@ <odoo> - <data> + - <!-- <template id="listing"> --> - <!-- <ul> --> - <!-- <li t-foreach="objects" t-as="object"> --> diff --git a/doc/howtos/website/website-support b/doc/howtos/website/website-support index 49b2d7e88d7..3fadb435430 100644 --- a/doc/howtos/website/website-support +++ b/doc/howtos/website/website-support @@ -31,7 +31,7 @@ diff --git a/academy/templates.xml b/academy/templates.xml +++ b/academy/templates.xml @@ -1,9 +1,15 @@ <odoo> - <data> + <template id="index"> - <title>Academy</title> - <t t-foreach="teachers" t-as="teacher"> diff --git a/doc/reference/guidelines.rst b/doc/reference/guidelines.rst index 207faa082bb..058fe7ffb1c 100644 --- a/doc/reference/guidelines.rst +++ b/doc/reference/guidelines.rst @@ -163,7 +163,9 @@ To declare a record in XML, the **record** notation (using *<record>*) is recomm - Try to group the record by model. In case of dependencies between action/menu/views, this convention may not be applicable. - Use naming convention defined at the next point -- The tag *<data>* is only used to set not-updatable data with ``noupdate=1`` +- The tag *<data>* is only used to set not-updatable data with ``noupdate=1``. + If there is only not-updatable data in the file, the ``noupdate=1`` can be + set on the ``<odoo>`` tag and do not set a ``<data>`` tag. .. code-block:: xml |
