diff --git a/content/developer/tutorials/discover_js_framework/02_web_framework.rst b/content/developer/tutorials/discover_js_framework/02_web_framework.rst index eb6681f7b..1cc63c440 100644 --- a/content/developer/tutorials/discover_js_framework/02_web_framework.rst +++ b/content/developer/tutorials/discover_js_framework/02_web_framework.rst @@ -90,7 +90,8 @@ services, and components can import a service with the `useService()` hooks. #. A button `Customers`, which opens a kanban view with all customers (this action already exists, so you should use `its xml id - <{GITHUB_PATH}/odoo/addons/base/views/res_partner_views.xml#L513>`_). + `_). #. A button `New Orders`, which opens a list view with all orders created in the last 7 days. #. A button `Cancelled Order`, which opens a list of all orders created in the last 7 days, but already cancelled. @@ -155,7 +156,8 @@ Here is a short explanation on the various arguments: - `Code: rpc service <{GITHUB_PATH}/addons/web/static/src/core/network/rpc_service.js>`_ - `Example: calling a route in onWillStart - <{GITHUB_PATH}/addons/lunch/static/src/views/search_model.js#L21>`_ + `_ 4. Cache network calls, create a service ======================================== @@ -190,7 +192,8 @@ outside of the `Dashboard` component. This is a nice use case for a service! #. It should provide a function `loadStatistics` that, once called, performs the actual rpc, and always return the same information. #. Maybe use the `memoize - <{GITHUB_PATH}/addons/web/static/src/core/utils/functions.js#L11>`_ utility function from + `_ utility function from `@web/core/utils/functions` #. Use this service in the `Dashboard` component. #. Check that it works as expected @@ -213,7 +216,8 @@ chartjs code every time if they don't need it). .. exercise:: #. Load chartjs, you can use the `loadJs - <{GITHUB_PATH}/addons/web/static/src/core/assets.js#L23>`_ function to load + `_ function to load :file:`/web/static/lib/Chart/Chart.js`. #. In a `Card` (from previous exercises), display a `pie chart `_ in the dashboard that displays the @@ -226,9 +230,11 @@ chartjs code every time if they don't need it). .. seealso:: - `Example: lazy loading a js file - <{GITHUB_PATH}/addons/web/static/src/views/graph/graph_renderer.js#L57>`_ + `_ - `Example: rendering a chart in a component - <{GITHUB_PATH}/addons/web/static/src/views/graph/graph_renderer.js#L641>`_ + `_ 6. Going further ================ @@ -249,6 +255,8 @@ Here is a list of some small improvements you could try to do if you have the ti .. seealso:: - `Example: use of env._t function - <{GITHUB_PATH}/addons/account/static/src/components/bills_upload/bills_upload.js#L64>`_ + `_ - `Code: translation code in web/ - <{GITHUB_PATH}/addons/web/static/src/core/l10n/translation.js#L16>`_ + `_ diff --git a/content/developer/tutorials/master_odoo_web_framework/01_fields_and_views.rst b/content/developer/tutorials/master_odoo_web_framework/01_fields_and_views.rst index aff0fc403..b9c18beb2 100644 --- a/content/developer/tutorials/master_odoo_web_framework/01_fields_and_views.rst +++ b/content/developer/tutorials/master_odoo_web_framework/01_fields_and_views.rst @@ -195,7 +195,8 @@ insert arbitrary components in the form view. Let us see how we can use it. .. seealso:: - `Example: Using the tag in a form view - <{GITHUB_PATH}/addons/calendar/views/calendar_views.xml#L197>`_ + `_ - `Example: Implementation of a widget (JS) <{GITHUB_PATH}/addons/web/static/src/views/widgets/week_days/week_days.js>`_ - `Example: Implementation of a widget (XML) @@ -365,7 +366,8 @@ There is a service dedicated to calling models methods: `orm_service`, located i - `Example: Extending a view (XML) <{GITHUB_PATH}/addons/mass_mailing/static/src/views/mass_mailing_views.xml>`_ - `Example: Using a js_class attribute - <{GITHUB_PATH}/addons/mass_mailing/views/mailing_contact_views.xml#L44>`_ + `_ - `Code: orm service <{GITHUB_PATH}/addons/web/static/src/core/orm_service.js>`_ - `Example: Using the orm service <{GITHUB_PATH}/addons/account/static/src/components/open_move_widget/open_move_widget.js>`_ diff --git a/content/developer/tutorials/master_odoo_web_framework/02_miscellaneous.rst b/content/developer/tutorials/master_odoo_web_framework/02_miscellaneous.rst index c13b2f2b9..ccb686919 100644 --- a/content/developer/tutorials/master_odoo_web_framework/02_miscellaneous.rst +++ b/content/developer/tutorials/master_odoo_web_framework/02_miscellaneous.rst @@ -96,7 +96,8 @@ notifications and provide access to certain features. - `Example: Adding some information to the "session info" <{GITHUB_PATH}/addons/barcodes/models/ir_http.py>`_ - `Example: Reading the session information - <{GITHUB_PATH}/addons/barcodes/static/src/barcode_service.js#L5>`_ + `_ 3. Real life update =================== @@ -124,7 +125,8 @@ be done in various ways but, for this training, we choose to use the most *decla .. seealso:: - `Documentation on reactivity <{OWL_PATH}/doc/reference/reactivity.md>`_ - `Example: Use of reactive in a service - <{GITHUB_PATH}/addons/web/static/src/core/debug/profiling/profiling_service.js#L30>`_ + `_ 4. Add a command to the command palette ======================================= @@ -145,7 +147,8 @@ by pressing `CTRL+K` in the Odoo interface. .. seealso:: - `Example: Using the useCommand hook - <{GITHUB_PATH}/addons/web/static/src/core/debug/debug_menu.js#L15>`_ + `_ - `Code: The command service <{GITHUB_PATH}/addons/web/static/src/core/commands/command_service.js>`_ @@ -207,7 +210,9 @@ these terms?". :scale: 60% .. seealso:: - - `Code: The patch function <{GITHUB_PATH}/addons/web/static/src/core/utils/patch.js#L16>`_ + - `Code: The patch function + `_ - `Code: The ControlPanel component <{GITHUB_PATH}/addons/web/static/src/search/control_panel/control_panel.js>`_ - `The Font Awesome website `_ @@ -215,11 +220,14 @@ these terms?". - `Code: ConfirmationDialog <{GITHUB_PATH}/addons/web/static/src/core/confirmation_dialog/confirmation_dialog.js>`_ - `Example: Using the dialog service - <{GITHUB_PATH}/addons/board/static/src/board_controller.js#L88>`_ + `_ - `Example: XPath with t-inherit-mode="primary" - <{GITHUB_PATH}/addons/account/static/src/components/account_move_form/account_move_form_notebook.xml#L4>`_ + `_ - `Example: XPath with t-inherit-mode="extension" - <{GITHUB_PATH}/calendar/static/src/components/activity/activity.xml#L4>`_ + `_ 6. Fetching orders from a customer ================================== @@ -308,4 +316,6 @@ now, there is no client action registered in the action registry. .. seealso:: - :ref:`Documentation on assets ` - - `Code: LazyComponent <{GITHUB_PATH}/addons/web/static/src/core/assets.js#L255>`_ + - `Code: LazyComponent + `_ diff --git a/content/developer/tutorials/master_odoo_web_framework/03_custom_kanban_view.rst b/content/developer/tutorials/master_odoo_web_framework/03_custom_kanban_view.rst index a8f5270bb..09a9f7c52 100644 --- a/content/developer/tutorials/master_odoo_web_framework/03_custom_kanban_view.rst +++ b/content/developer/tutorials/master_odoo_web_framework/03_custom_kanban_view.rst @@ -135,7 +135,8 @@ customers with an active order. - `Code: The fuzzylookup function <{GITHUB_PATH}/addons/web/static/src/core/utils/search.js>`_ - `Example: Using fuzzyLookup - <{GITHUB_PATH}/addons/web/static/tests/core/utils/search_test.js#L17>`_ + `_ 7. Refactor the code to use `t-model` ===================================== diff --git a/content/developer/tutorials/master_odoo_web_framework/04_creating_view_from_scratch.rst b/content/developer/tutorials/master_odoo_web_framework/04_creating_view_from_scratch.rst index 4fa344749..25ca7cb78 100644 --- a/content/developer/tutorials/master_odoo_web_framework/04_creating_view_from_scratch.rst +++ b/content/developer/tutorials/master_odoo_web_framework/04_creating_view_from_scratch.rst @@ -171,7 +171,8 @@ to learn how to structure code in Odoo. Also, this will scale better with changi .. seealso:: `Code: The switchView function - <{GITHUB_PATH}/addons/web/static/src/webclient/actions/action_service.js#L1329>`_ + `_ 8. Add an optional tooltip ==========================