From 8071742959b03020ff2cf32670bb5495804eae57 Mon Sep 17 00:00:00 2001 From: Xavier Morel <xmo@odoo.com> Date: Tue, 10 Oct 2017 12:26:00 +0200 Subject: [PATCH] [FIX] doc: almost all warnings & drop mercurial dependency * fix all warnings wrt patch application & al, only warning left is only exercise-kanban being auto-guessed as an xml+django file and then lexing failed (because it's only a small snippet) * update sphinx-patchqueue to drop the requirement on mercurial for patch introspection and application, though that means application is significantly less forgiving (fuzzy application was not implemented) --- doc/howtos/backend/exercise-access-rules | 2 +- doc/howtos/backend/exercise-demo | 4 +- doc/howtos/backend/exercise-domain-advanced | 2 +- doc/howtos/backend/exercise-formview | 2 +- doc/howtos/backend/exercise-gantt | 2 +- doc/howtos/backend/exercise-graph | 2 +- doc/howtos/backend/exercise-kanban | 2 +- doc/howtos/backend/exercise-session | 2 +- doc/howtos/backend/exercise-wizard-action | 2 +- doc/howtos/backend/exercise-wizard-launch | 7 ++-- doc/howtos/backend/exercise-wizard-multi | 2 +- doc/howtos/website/chatter-backend | 2 +- doc/howtos/website/course-o2m | 4 +- doc/howtos/website/course-product | 9 ++--- doc/howtos/website/course-views | 2 +- doc/howtos/website/demo-data | 4 +- doc/howtos/website/teachers-formview | 2 +- doc/howtos/website/template | 2 +- doc/howtos/website/website-support | 2 +- doc/reference/views.rst | 41 +-------------------- doc/requirements.txt | 3 +- 21 files changed, 29 insertions(+), 71 deletions(-) diff --git a/doc/howtos/backend/exercise-access-rules b/doc/howtos/backend/exercise-access-rules index 1d78adb984ed..d6290dfdbe10 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> - + </odoo> diff --git a/doc/howtos/backend/exercise-demo b/doc/howtos/backend/exercise-demo index 69b202db15df..50a9564424ad 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> - + - <!-- --> - <!-- <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> - + </odoo> diff --git a/doc/howtos/backend/exercise-domain-advanced b/doc/howtos/backend/exercise-domain-advanced index db7b89f5d811..55d5e1da708b 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> - + </odoo> diff --git a/doc/howtos/backend/exercise-formview b/doc/howtos/backend/exercise-formview index c42d451b1eaa..9f80bc2f7680 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> - + + <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-gantt b/doc/howtos/backend/exercise-gantt index da37764a010c..63c3981f09ef 100644 --- a/doc/howtos/backend/exercise-gantt +++ b/doc/howtos/backend/exercise-gantt @@ -34,7 +34,7 @@ diff --git a/openacademy/models.py b/openacademy/models.py diff --git a/openacademy/views/openacademy.xml b/openacademy/views/openacademy.xml --- a/openacademy/views/openacademy.xml +++ b/openacademy/views/openacademy.xml -@@ -145,11 +145,23 @@ +@@ -143,11 +143,23 @@ </field> </record> diff --git a/doc/howtos/backend/exercise-graph b/doc/howtos/backend/exercise-graph index 07fdd467ef13..ca38438971d3 100644 --- a/doc/howtos/backend/exercise-graph +++ b/doc/howtos/backend/exercise-graph @@ -30,7 +30,7 @@ diff --git a/openacademy/models.py b/openacademy/models.py diff --git a/openacademy/views/openacademy.xml b/openacademy/views/openacademy.xml --- a/openacademy/views/openacademy.xml +++ b/openacademy/views/openacademy.xml -@@ -157,11 +157,22 @@ +@@ -155,11 +155,22 @@ </field> </record> diff --git a/doc/howtos/backend/exercise-kanban b/doc/howtos/backend/exercise-kanban index 14899f46a3df..a3387aa6e6c6 100644 --- a/doc/howtos/backend/exercise-kanban +++ b/doc/howtos/backend/exercise-kanban @@ -17,7 +17,7 @@ Index: addons/openacademy/views/openacademy.xml =================================================================== --- addons.orig/openacademy/views/openacademy.xml 2014-08-28 14:21:58.627015606 +0200 +++ addons/openacademy/views/openacademy.xml 2014-08-28 14:21:58.623015606 +0200 -@@ -168,11 +168,57 @@ +@@ -166,11 +166,57 @@ </field> </record> diff --git a/doc/howtos/backend/exercise-session b/doc/howtos/backend/exercise-session index a189a3d3a64b..9555847336b5 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"/> - + </odoo> diff --git a/doc/howtos/backend/exercise-wizard-action b/doc/howtos/backend/exercise-wizard-action index 23d6a0f26677..6cf27a3d41d2 100644 --- a/doc/howtos/backend/exercise-wizard-action +++ b/doc/howtos/backend/exercise-wizard-action @@ -2,7 +2,7 @@ Index: addons/openacademy/views/openacademy.xml =================================================================== --- addons.orig/openacademy/views/openacademy.xml 2014-08-28 14:34:19.255004611 +0200 +++ addons/openacademy/views/openacademy.xml 2014-08-28 14:34:19.251004612 +0200 -@@ -234,6 +234,12 @@ +@@ -232,6 +232,12 @@ <field name="session_id"/> <field name="attendee_ids"/> </group> diff --git a/doc/howtos/backend/exercise-wizard-launch b/doc/howtos/backend/exercise-wizard-launch index 7b5d65c80749..7f76c45cbaf5 100644 --- a/doc/howtos/backend/exercise-wizard-launch +++ b/doc/howtos/backend/exercise-wizard-launch @@ -17,11 +17,10 @@ Index: addons/openacademy/views/openacademy.xml =================================================================== --- addons.orig/openacademy/views/openacademy.xml 2014-08-28 14:34:07.879004780 +0200 +++ addons/openacademy/views/openacademy.xml 2014-08-28 14:34:07.871004780 +0200 -@@ -224,5 +224,26 @@ - <menuitem id="session_menu" name="Sessions" +@@ -223,4 +223,25 @@ parent="openacademy_menu" action="session_list_action"/> -+ + + <record model="ir.ui.view" id="wizard_form_view"> + <field name="name">wizard.form</field> + <field name="model">openacademy.wizard</field> @@ -42,5 +41,5 @@ Index: addons/openacademy/views/openacademy.xml + view_mode="form" + target="new" + key2="client_action_multi"/> - ++ </odoo> diff --git a/doc/howtos/backend/exercise-wizard-multi b/doc/howtos/backend/exercise-wizard-multi index f8ece6750902..4386dd90d902 100644 --- a/doc/howtos/backend/exercise-wizard-multi +++ b/doc/howtos/backend/exercise-wizard-multi @@ -2,7 +2,7 @@ Index: addons/openacademy/views/openacademy.xml =================================================================== --- addons.orig/openacademy/views/openacademy.xml 2014-08-28 14:34:28.583004473 +0200 +++ addons/openacademy/views/openacademy.xml 2014-08-28 14:34:28.579004473 +0200 -@@ -231,7 +231,7 @@ +@@ -229,7 +229,7 @@ <field name="arch" type="xml"> <form string="Add Attendees"> <group> diff --git a/doc/howtos/website/chatter-backend b/doc/howtos/website/chatter-backend index 8598be05bae9..1521a78a2723 100644 --- a/doc/howtos/website/chatter-backend +++ b/doc/howtos/website/chatter-backend @@ -16,7 +16,7 @@ diff --git a/academy/models.py b/academy/models.py diff --git a/academy/views.xml b/academy/views.xml --- a/academy/views.xml +++ b/academy/views.xml -@@ -60,6 +60,10 @@ +@@ -61,6 +61,10 @@ <label for="teacher_id"/> <field name="teacher_id"/> </sheet> diff --git a/doc/howtos/website/course-o2m b/doc/howtos/website/course-o2m index fca83fd50fd3..f68c0f90b90a 100644 --- a/doc/howtos/website/course-o2m +++ b/doc/howtos/website/course-o2m @@ -3,7 +3,7 @@ diff -r c3619e60d819 -r 957395d27f63 academy/models.py --- a/academy/models.py Wed Aug 13 14:29:45 2014 +0200 +++ b/academy/models.py Wed Aug 13 15:06:30 2014 +0200 -@@ -7,6 +7,8 @@ class Teachers(models.Model): +@@ -8,6 +8,8 @@ class Teachers(models.Model): name = fields.Char() biography = fields.Html() @@ -15,7 +15,7 @@ diff -r c3619e60d819 -r 957395d27f63 academy/models.py diff -r c3619e60d819 -r 957395d27f63 academy/views.xml --- a/academy/views.xml Wed Aug 13 14:29:45 2014 +0200 +++ b/academy/views.xml Wed Aug 13 15:06:30 2014 +0200 -@@ -11,8 +11,15 @@ +@@ -12,8 +12,15 @@ <form> <sheet> <label for="name"/> <field name="name"/> diff --git a/doc/howtos/website/course-product b/doc/howtos/website/course-product index 0508da608514..53aa555be52c 100644 --- a/doc/howtos/website/course-product +++ b/doc/howtos/website/course-product @@ -27,11 +27,10 @@ new file mode 100644 diff --git a/academy/demo.xml b/academy/demo.xml --- a/academy/demo.xml +++ b/academy/demo.xml -@@ -9,5 +9,30 @@ - <record id="vaughn" model="academy.teachers"> +@@ -10,4 +10,29 @@ <field name="name">Lester Vaughn</field> </record> -+ + + <record id="course0" model="product.template"> + <field name="name">Course 0</field> + <field name="teacher_id" ref="padilla"/> @@ -56,7 +55,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> - ++ </odoo> diff --git a/academy/models.py b/academy/models.py --- a/academy/models.py @@ -88,7 +87,7 @@ diff --git a/academy/security/ir.model.access.csv b/academy/security/ir.model.ac diff --git a/academy/views.xml b/academy/views.xml --- a/academy/views.xml +++ b/academy/views.xml -@@ -25,55 +25,9 @@ +@@ -26,55 +26,9 @@ </field> </record> diff --git a/doc/howtos/website/course-views b/doc/howtos/website/course-views index c1373b8df74c..a624ef9dc8b7 100644 --- a/doc/howtos/website/course-views +++ b/doc/howtos/website/course-views @@ -3,7 +3,7 @@ diff -r c687289c105f -r 1012f1736bb6 academy/views.xml --- a/academy/views.xml Thu Aug 14 12:58:50 2014 +0200 +++ b/academy/views.xml Thu Aug 14 13:00:19 2014 +0200 -@@ -18,9 +18,51 @@ +@@ -19,9 +19,51 @@ </field> </record> diff --git a/doc/howtos/website/demo-data b/doc/howtos/website/demo-data index 0e34b57463b1..bf50fd31632c 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> - + - <!-- --> - <!-- <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> - + </odoo> diff --git a/doc/howtos/website/teachers-formview b/doc/howtos/website/teachers-formview index 28dd3df9bd97..407938fde839 100644 --- a/doc/howtos/website/teachers-formview +++ b/doc/howtos/website/teachers-formview @@ -3,7 +3,7 @@ diff -r 0201053e995d -r c3705f93fcea academy/views.xml --- a/academy/views.xml Wed Aug 13 11:04:49 2014 +0200 +++ b/academy/views.xml Wed Aug 13 11:04:55 2014 +0200 -@@ -4,6 +4,20 @@ +@@ -5,6 +5,20 @@ <field name="res_model">academy.teachers</field> </record> diff --git a/doc/howtos/website/template b/doc/howtos/website/template index 705eb4c41657..a7e68254c650 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> - + - <!-- <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 3fadb435430b..8df46dc7a5ab 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> - + <template id="index"> - <title>Academy</title> - <t t-foreach="teachers" t-as="teacher"> diff --git a/doc/reference/views.rst b/doc/reference/views.rst index 2f41bb61a7ff..c24632459986 100644 --- a/doc/reference/views.rst +++ b/doc/reference/views.rst @@ -881,8 +881,6 @@ Possible children of the view element are: The kanban view uses mostly-standard :ref:`javascript qweb <reference/qweb/javascript>` and provides the following context variables: - ``instance`` - the current :ref:`reference/javascript/client` instance ``widget`` the current :js:class:`KanbanRecord`, can be used to fetch some meta-information. These methods are also available directly in the @@ -894,8 +892,6 @@ Possible children of the view element are: a :meth:`~odoo.models.Model.read` (except for date and datetime fields that are `formatted according to user's locale <https://github.com/odoo/odoo/blob/a678bd4e/addons/web_kanban/static/src/js/kanban_record.js#L102>`_) - ``formats`` - the :js:class:`web.formats` module to manipulate and convert values ``read_only_mode`` self-explanatory @@ -929,40 +925,7 @@ Possible children of the view element are: * kanban-specific CSS * kanban structures/widgets (vignette, details, ...) -Javascript API --------------- - -.. js:class:: KanbanRecord - - :js:class:`Widget` handling the rendering of a single record to a - card. Available within its own rendering as ``widget`` in the template - context. - - .. js:function:: kanban_color(raw_value) - - Converts a color segmentation value to a kanban color class - :samp:`oe_kanban_color_{color_index}`. The built-in CSS provides classes - up to a ``color_index`` of 9. - - .. js:function:: kanban_getcolor(raw_value) - - Converts a color segmentation value to a color index (between 0 and 9 by - default). Color segmentation values can be either numbers or strings. - - .. js:function:: kanban_image(model, field, id[, cache][, options]) - - Generates the URL to the specified field as an image access. - - :param String model: model hosting the image - :param String field: name of the field holding the image data - :param id: identifier of the record contaning the image to display - :param Number cache: caching duration (in seconds) of the browser - default should be overridden. ``0`` disables - caching entirely - :returns: an image URL - - .. warning:: - ``kanban_text_ellipsis`` has been removed in Odoo 9. CSS ``text-overflow`` should be used instead. +If you need to extend the Kanban view, see :js:class::`the JS API <KanbanRecord>`. .. _reference/views/calendar: @@ -1029,8 +992,6 @@ calendar view are: The kanban view uses mostly-standard :ref:`javascript qweb <reference/qweb/javascript>` and provides the following context variables: - ``instance`` - the current :ref:`reference/javascript/client` instance ``widget`` the current :js:class:`KanbanRecord`, can be used to fetch some meta-information. These methods are also available directly in the diff --git a/doc/requirements.txt b/doc/requirements.txt index 6c2a5df88c2b..4f8b5fa4bbf2 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,4 +1,3 @@ sphinx>=1.2 -mercurial==3.2.2 -sphinx-patchqueue==0.4.0 +sphinx-patchqueue>=1.0 PyJSDoc==0.9.1 -- GitLab