[MOV] content/*: move resource files into their related page's directory
Since odoo/documentation#903, the guideline for the location of new resource (images, downloadable files, RST includes...) files is to place those inside the directory of the RST page that references them. For example, if `doc1.rst` has a reference to `image.png` and to `download.zip`, the file structure should look like this: ├── parent_doc/ │ └── doc1/ │ │ └── image.png │ │ └── download.zip │ └── doc1.rst │ └── doc2.rst ├── parent_doc.rst Before this commit, most of the resource files were still located inside 'media' directories holding all the resource files referenced by RST pages located at the same level as these directories. In the example above, a single 'media' directory would hold all the resource files referenced by both `doc1.rst` and `doc2.rst`. Doing so prevented us from figuring out easily which resource file was referenced by which RST page and, thus, lead to unused resource files piling up in the repository. It also made it more complicated to define codeowners regex rules because a team could not simply be assigned to `/some_page.*` but needed to be assigned to both `/some_page\.rst` and to the location of 'media'. In order to help new content writers figure out the guideline when taking examples from other RST pages, this commit retroactively applies the guideline to existing resource files and 'media' directories. The left-over resource files that are not referenced by any RST page are removed. task-2497965 Part-of: odoo/documentation#2026
@@ -540,7 +540,7 @@ The second inheritance mechanism (delegation) allows to link every record of a
|
||||
model to a record in a parent model, and provides transparent access to the
|
||||
fields of the parent record.
|
||||
|
||||
.. image:: ../images/inheritance_methods.png
|
||||
.. image:: ../reference/addons/orm/inheritance_methods.png
|
||||
:align: center
|
||||
|
||||
.. seealso::
|
||||
|
||||
@@ -123,7 +123,7 @@ To open profile.svg you should use browser, because other viewer may not
|
||||
support interactive part.
|
||||
|
||||
|
||||
.. image:: profile/flamegraph.svg
|
||||
.. image:: profilecode/flamegraph.svg
|
||||
|
||||
|
||||
.. _py-spy: https://github.com/benfred/py-spy
|
||||
|
||||
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
@@ -11,7 +11,7 @@ Odoo follows a `multitier architecture`_, meaning that the presentation, the bus
|
||||
logic and the data storage are separated. More specifically, it uses a three-tier architecture
|
||||
(image from Wikipedia):
|
||||
|
||||
.. image:: 01_architecture/media/three_tier.svg
|
||||
.. image:: 01_architecture/three_tier.svg
|
||||
:align: center
|
||||
:alt: Three-tier architecture
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |
@@ -64,20 +64,20 @@ In Github:
|
||||
|
||||
- In the upper-right corner of any page, click your profile photo, then click Settings
|
||||
|
||||
.. image:: 02_setup/media/userbar-account-settings.png
|
||||
.. image:: 02_setup/userbar-account-settings.png
|
||||
|
||||
- In the user settings sidebar, click SSH and GPG keys.
|
||||
|
||||
.. image:: 02_setup/media/settings-sidebar-ssh-keys.png
|
||||
.. image:: 02_setup/settings-sidebar-ssh-keys.png
|
||||
|
||||
- Click New SSH key or Add SSH key.
|
||||
|
||||
.. image:: 02_setup/media/ssh-add-ssh-key.png
|
||||
.. image:: 02_setup/ssh-add-ssh-key.png
|
||||
|
||||
- In the "Title" field, add a descriptive label for the new key.
|
||||
- Paste your key into the "Key" field.
|
||||
|
||||
.. image:: 02_setup/media/ssh-key-paste.png
|
||||
.. image:: 02_setup/ssh-key-paste.png
|
||||
|
||||
- Click Add SSH key.
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@@ -18,7 +18,7 @@ to answer the specific business case.
|
||||
|
||||
Here is an overview of the main list view containing some advertisements:
|
||||
|
||||
.. image:: 03_newapp/media/overview_list_view_01.png
|
||||
.. image:: 03_newapp/overview_list_view_01.png
|
||||
:align: center
|
||||
:alt: List view 01
|
||||
|
||||
@@ -26,14 +26,14 @@ The top area of the form view summarizes important information for the property,
|
||||
the property type, the postcode and so on. The first tab contains information describing the
|
||||
property: bedrooms, living area, garage, garden...
|
||||
|
||||
.. image:: 03_newapp/media/overview_form_view_01.png
|
||||
.. image:: 03_newapp/overview_form_view_01.png
|
||||
:align: center
|
||||
:alt: Form view 01
|
||||
|
||||
The second tab lists the offers for the property. We can see here that potential buyers can make
|
||||
offers above or below the expected selling price. It is up to the seller to accept an offer.
|
||||
|
||||
.. image:: 03_newapp/media/overview_form_view_02.png
|
||||
.. image:: 03_newapp/overview_form_view_02.png
|
||||
:align: center
|
||||
:alt: Form view 02
|
||||
|
||||
@@ -52,7 +52,7 @@ Prepare the addon directory
|
||||
**Goal**: the goal of this section is to have Odoo recognize our new module, which will
|
||||
be an empty shell for now. It will be listed in the Apps:
|
||||
|
||||
.. image:: 03_newapp/media/app_in_list.png
|
||||
.. image:: 03_newapp/app_in_list.png
|
||||
:align: center
|
||||
:alt: The new module appears in the list
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
@@ -113,15 +113,15 @@ Menus
|
||||
**Goal**: at the end of this section, three menus should be created and the default view is
|
||||
displayed:
|
||||
|
||||
.. image:: 06_firstui/media/estate_menu_root.png
|
||||
.. image:: 06_firstui/estate_menu_root.png
|
||||
:align: center
|
||||
:alt: Root menus
|
||||
|
||||
.. image:: 06_firstui/media/estate_menu_action.png
|
||||
.. image:: 06_firstui/estate_menu_action.png
|
||||
:align: center
|
||||
:alt: First level and action menus
|
||||
|
||||
.. image:: 06_firstui/media/estate_form_default.png
|
||||
.. image:: 06_firstui/estate_form_default.png
|
||||
:align: center
|
||||
:alt: Default form view
|
||||
|
||||
@@ -145,11 +145,11 @@ However, menus always follow an architecture, and in practice there are three le
|
||||
2. The first level menu, displayed in the top bar
|
||||
3. The action menus
|
||||
|
||||
.. image:: 06_firstui/media/menu_01.png
|
||||
.. image:: 06_firstui/menu_01.png
|
||||
:align: center
|
||||
:alt: Root menus
|
||||
|
||||
.. image:: 06_firstui/media/menu_02.png
|
||||
.. image:: 06_firstui/menu_02.png
|
||||
:align: center
|
||||
:alt: First level and action menus
|
||||
|
||||
@@ -186,7 +186,7 @@ Fields, Attributes And View
|
||||
of bedrooms and the availability date should have default values. Additionally the selling price
|
||||
and availability date values won't be copied when the record is duplicated.
|
||||
|
||||
.. image:: 06_firstui/media/attribute_and_default.gif
|
||||
.. image:: 06_firstui/attribute_and_default.gif
|
||||
:align: center
|
||||
:alt: Interaction between model and view
|
||||
|
||||
@@ -266,7 +266,7 @@ not be listed! ``active`` is an example of a reserved field with a specific beha
|
||||
a record has ``active=False``, it is automatically removed from any search. To display the
|
||||
created property, you will need to specifically search for inactive records.
|
||||
|
||||
.. image:: 06_firstui/media/inactive.gif
|
||||
.. image:: 06_firstui/inactive.gif
|
||||
:align: center
|
||||
:alt: Inactive records
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 239 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
@@ -29,7 +29,7 @@ List
|
||||
|
||||
**Goal**: at the end of this section, the list view should look like this:
|
||||
|
||||
.. image:: 07_basicviews/media/list.png
|
||||
.. image:: 07_basicviews/list.png
|
||||
:align: center
|
||||
:alt: List view
|
||||
|
||||
@@ -78,7 +78,7 @@ Form
|
||||
|
||||
**Goal**: at the end of this section, the form view should look like this:
|
||||
|
||||
.. image:: 07_basicviews/media/form.png
|
||||
.. image:: 07_basicviews/form.png
|
||||
:align: center
|
||||
:alt: Form view
|
||||
|
||||
@@ -140,15 +140,15 @@ Search
|
||||
|
||||
**Goal**: at the end of this section, the search view should look like this:
|
||||
|
||||
.. image:: 07_basicviews/media/search_01.png
|
||||
.. image:: 07_basicviews/search_01.png
|
||||
:align: center
|
||||
:alt: Search fields
|
||||
|
||||
.. image:: 07_basicviews/media/search_02.png
|
||||
.. image:: 07_basicviews/search_02.png
|
||||
:align: center
|
||||
:alt: Filter
|
||||
|
||||
.. image:: 07_basicviews/media/search_03.png
|
||||
.. image:: 07_basicviews/search_03.png
|
||||
:align: center
|
||||
:alt: Group By
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
@@ -30,13 +30,13 @@ Many2one
|
||||
|
||||
- a new ``estate.property.type`` model should be created with the corresponding menu, action and views.
|
||||
|
||||
.. image:: 08_relations/media/property_type.png
|
||||
.. image:: 08_relations/property_type.png
|
||||
:align: center
|
||||
:alt: Property type
|
||||
|
||||
- three Many2one fields should be added to the ``estate.property`` model: property type, buyer and seller.
|
||||
|
||||
.. image:: 08_relations/media/property_many2one.png
|
||||
.. image:: 08_relations/property_many2one.png
|
||||
:align: center
|
||||
:alt: Property
|
||||
|
||||
@@ -137,13 +137,13 @@ Many2many
|
||||
|
||||
- a new ``estate.property.tag`` model should be created with the corresponding menu and action.
|
||||
|
||||
.. image:: 08_relations/media/property_tag.png
|
||||
.. image:: 08_relations/property_tag.png
|
||||
:align: center
|
||||
:alt: Property tag
|
||||
|
||||
- tags should be added to the ``estate.property`` model:
|
||||
|
||||
.. image:: 08_relations/media/property_many2many.png
|
||||
.. image:: 08_relations/property_many2many.png
|
||||
:align: center
|
||||
:alt: Property
|
||||
|
||||
@@ -201,7 +201,7 @@ One2many
|
||||
- a new ``estate.property.offer`` model should be created with the corresponding form and tree view.
|
||||
- offers should be added to the ``estate.property`` model:
|
||||
|
||||
.. image:: 08_relations/media/property_offer.png
|
||||
.. image:: 08_relations/property_offer.png
|
||||
:align: center
|
||||
:alt: Property offers
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -27,13 +27,13 @@ Computed Fields
|
||||
|
||||
- In the property model, the total area and the best offer should be computed:
|
||||
|
||||
.. image:: 09_compute_onchange/media/compute.gif
|
||||
.. image:: 09_compute_onchange/compute.gif
|
||||
:align: center
|
||||
:alt: Compute fields
|
||||
|
||||
- In the property offer model, the validity date should be computed and can be updated:
|
||||
|
||||
.. image:: 09_compute_onchange/media/compute_inverse.gif
|
||||
.. image:: 09_compute_onchange/compute_inverse.gif
|
||||
:align: center
|
||||
:alt: Compute field with inverse
|
||||
|
||||
@@ -230,7 +230,7 @@ Onchanges
|
||||
**Goal**: at the end of this section, enabling the garden will set a default area of 10 and
|
||||
an orientation to North.
|
||||
|
||||
.. image:: 09_compute_onchange/media/onchange.gif
|
||||
.. image:: 09_compute_onchange/onchange.gif
|
||||
:align: center
|
||||
:alt: Onchange
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 229 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
@@ -28,7 +28,7 @@ Action Type
|
||||
|
||||
- You should be able to cancel or set a property as sold:
|
||||
|
||||
.. image:: 10_actions/media/property.gif
|
||||
.. image:: 10_actions/property.gif
|
||||
:align: center
|
||||
:alt: Cancel and set to sold
|
||||
|
||||
@@ -37,13 +37,13 @@ Action Type
|
||||
|
||||
- You should be able to accept or refuse an offer:
|
||||
|
||||
.. image:: 10_actions/media/offer_01.gif
|
||||
.. image:: 10_actions/offer_01.gif
|
||||
:align: center
|
||||
:alt: Accept or refuse an offer
|
||||
|
||||
- Once an offer is accepted, the selling price and the buyer should be set:
|
||||
|
||||
.. image:: 10_actions/media/offer_02.gif
|
||||
.. image:: 10_actions/offer_02.gif
|
||||
:align: center
|
||||
:alt: Accept an offer
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
@@ -25,13 +25,13 @@ SQL
|
||||
|
||||
- Amounts should be (strictly) positive
|
||||
|
||||
.. image:: 11_constraints/media/sql_01.gif
|
||||
.. image:: 11_constraints/sql_01.gif
|
||||
:align: center
|
||||
:alt: Constraints on amounts
|
||||
|
||||
- Property types and tags should have a unique name
|
||||
|
||||
.. image:: 11_constraints/media/sql_02.gif
|
||||
.. image:: 11_constraints/sql_02.gif
|
||||
:align: center
|
||||
:alt: Constraints on names
|
||||
|
||||
@@ -76,7 +76,7 @@ Python
|
||||
**Goal**: at the end of this section, it will not possible to accept an offer
|
||||
lower than 90% of the expected price.
|
||||
|
||||
.. image:: 11_constraints/media/python.gif
|
||||
.. image:: 11_constraints/python.gif
|
||||
:align: center
|
||||
:alt: Python constraint
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 316 KiB After Width: | Height: | Size: 316 KiB |
|
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 225 KiB |
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
@@ -26,7 +26,7 @@ Inline Views
|
||||
**Goal**: at the end of this section, a specific list of properties should be added to the property
|
||||
type view:
|
||||
|
||||
.. image:: 12_sprinkles/media/inline_view.png
|
||||
.. image:: 12_sprinkles/inline_view.png
|
||||
:align: center
|
||||
:alt: Inline list view
|
||||
|
||||
@@ -101,7 +101,7 @@ Widgets
|
||||
**Goal**: at the end of this section, the state of the property should be displayed using a
|
||||
specific widget:
|
||||
|
||||
.. image:: 12_sprinkles/media/widget.png
|
||||
.. image:: 12_sprinkles/widget.png
|
||||
:align: center
|
||||
:alt: Statusbar widget
|
||||
|
||||
@@ -240,7 +240,7 @@ Form
|
||||
- Conditional display of buttons and fields
|
||||
- Tag colors
|
||||
|
||||
.. image:: 12_sprinkles/media/form.gif
|
||||
.. image:: 12_sprinkles/form.gif
|
||||
:align: center
|
||||
:alt: Form view with sprinkles
|
||||
|
||||
@@ -322,11 +322,11 @@ List
|
||||
Additionally, offers and tags will be editable directly in the list, and the availability date will be
|
||||
hidden by default.
|
||||
|
||||
.. image:: 12_sprinkles/media/decoration.png
|
||||
.. image:: 12_sprinkles/decoration.png
|
||||
:align: center
|
||||
:alt: List view with decorations and optional field
|
||||
|
||||
.. image:: 12_sprinkles/media/editable_list.gif
|
||||
.. image:: 12_sprinkles/editable_list.gif
|
||||
:align: center
|
||||
:alt: Editable list
|
||||
|
||||
@@ -393,7 +393,7 @@ Search
|
||||
and searching on the living area returns results where the area is larger than the given
|
||||
number.
|
||||
|
||||
.. image:: 12_sprinkles/media/search.gif
|
||||
.. image:: 12_sprinkles/search.gif
|
||||
:align: center
|
||||
:alt: Default filters and domains
|
||||
|
||||
@@ -442,7 +442,7 @@ Stat Buttons
|
||||
**Goal**: at the end of this section, there will be a stat button on the property type form view
|
||||
which shows the list of all offers related to properties of the given type when it is clicked on.
|
||||
|
||||
.. image:: 12_sprinkles/media/stat_button.gif
|
||||
.. image:: 12_sprinkles/stat_button.gif
|
||||
:align: center
|
||||
:alt: Stat button
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 276 KiB |
|
Before Width: | Height: | Size: 283 KiB After Width: | Height: | Size: 283 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 266 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@@ -21,14 +21,14 @@ Python Inheritance
|
||||
|
||||
- It should not be possible to delete a property which is not new or canceled.
|
||||
|
||||
.. image:: 13_inheritance/media/unlink.gif
|
||||
.. image:: 13_inheritance/unlink.gif
|
||||
:align: center
|
||||
:alt: Unlink
|
||||
|
||||
- When an offer is created, the property state should change to 'Offer Received'
|
||||
- It should not be possible to create an offer with a lower price than an existing offer
|
||||
|
||||
.. image:: 13_inheritance/media/create.gif
|
||||
.. image:: 13_inheritance/create.gif
|
||||
:align: center
|
||||
:alt: Create
|
||||
|
||||
@@ -120,7 +120,7 @@ The second inheritance mechanism (delegation) allows every record of a model to
|
||||
to a parent model's record and provides transparent access to the
|
||||
fields of this parent record.
|
||||
|
||||
.. image:: 13_inheritance/media/inheritance_methods.png
|
||||
.. image:: 13_inheritance/inheritance_methods.png
|
||||
:align: center
|
||||
:alt: Inheritance Methods
|
||||
|
||||
@@ -166,7 +166,7 @@ View Inheritance
|
||||
**Goal**: at the end of this section, the list of available properties linked
|
||||
to a salesperson should be displayed in their user form view
|
||||
|
||||
.. image:: 13_inheritance/media/users.png
|
||||
.. image:: 13_inheritance/users.png
|
||||
:align: center
|
||||
:alt: Users
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 356 KiB After Width: | Height: | Size: 356 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 224 KiB After Width: | Height: | Size: 224 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
@@ -20,7 +20,7 @@ Concrete Example: Account Move
|
||||
- A new module ``estate_account`` should be created
|
||||
- When a property is sold, an invoice should be issued for the buyer
|
||||
|
||||
.. image:: 14_other_module/media/create_inv.gif
|
||||
.. image:: 14_other_module/create_inv.gif
|
||||
:align: center
|
||||
:alt: Invoice creation
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 513 KiB After Width: | Height: | Size: 513 KiB |
@@ -31,7 +31,7 @@ Concrete Example: A Kanban View
|
||||
|
||||
**Goal**: at the end of this section a Kanban view of the properties should be created:
|
||||
|
||||
.. image:: 15_qwebintro/media/kanban.png
|
||||
.. image:: 15_qwebintro/kanban.png
|
||||
:align: center
|
||||
:alt: Kanban view
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@@ -131,13 +131,13 @@ There are two ways to create the PR:
|
||||
- Open a browser in your development repository `https://github.com/xyz-odoo/technical-training-sandbox`.
|
||||
There will be a button to create a new pull request.
|
||||
|
||||
.. image:: 16_guidelines_pr/media/pr_from_branch.png
|
||||
.. image:: 16_guidelines_pr/pr_from_branch.png
|
||||
|
||||
You will notice that your commit message is used as the pull request message. This occurs if you have only 1 commit.
|
||||
If you have multiple commits, you can either make a summary of the commits as the PR message or if there aren't that many
|
||||
commits you can just copy/paste your commit messages as the PR message.
|
||||
|
||||
.. image:: 16_guidelines_pr/media/pr_message.png
|
||||
.. image:: 16_guidelines_pr/pr_message.png
|
||||
|
||||
Additional Info for Odoo Staff
|
||||
==============================
|
||||
|
||||
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 38 KiB |
@@ -17,7 +17,7 @@ freedom for the user to customize everything according to their needs.
|
||||
|
||||
Ready to create your own theme? Great. Here are some things you should know before you begin. This tutorial is a guide to creating an Odoo theme.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/Intro.jpg
|
||||
.. image:: themes/Intro.jpg
|
||||
|
||||
|
||||
An introduction for web designers
|
||||
@@ -43,7 +43,7 @@ This is usually the first question from a web designer used to working with Word
|
||||
|
||||
.. container:: col-sm-4
|
||||
|
||||
.. image:: theme_tutorial_assets/img/cms.jpg
|
||||
.. image:: themes/cms.jpg
|
||||
|
||||
.. container:: col-sm-7
|
||||
|
||||
@@ -71,7 +71,7 @@ Odoo default theme structure
|
||||
|
||||
.. container:: col-sm-4
|
||||
|
||||
.. image:: theme_tutorial_assets/img/def_structure.jpg
|
||||
.. image:: themes/def_structure.jpg
|
||||
|
||||
.. container:: row
|
||||
|
||||
@@ -111,14 +111,14 @@ Let’s take a tour of our “list” elements:
|
||||
|
||||
.. container:: row
|
||||
|
||||
.. figure:: theme_tutorial_assets/img/snippet.jpg
|
||||
.. figure:: themes/snippet.jpg
|
||||
:figclass: col-sm-6
|
||||
|
||||
Snippets (or building-blocks)
|
||||
|
||||
A piece of HTML code. The user will drag&drop, modify and combine them using our built-in Website Builder interface. You can define sets of options and styles for each snippet. The user will choose from them according to their needs.
|
||||
|
||||
.. figure:: theme_tutorial_assets/img/page.jpg
|
||||
.. figure:: themes/page.jpg
|
||||
:figclass: col-sm-6
|
||||
|
||||
Pages
|
||||
@@ -131,14 +131,14 @@ Let’s take a tour of our “list” elements:
|
||||
|
||||
.. container:: row
|
||||
|
||||
.. figure:: theme_tutorial_assets/img/styles.jpg
|
||||
.. figure:: themes/styles.jpg
|
||||
:figclass: col-sm-6
|
||||
|
||||
Styles
|
||||
|
||||
Styles are defined using SCSS files (or you can use standard CSS files). You can define a style as **default** or **optional**. The default styles are always active in your theme, the optional styles can be enabled or disabled by the user.
|
||||
|
||||
.. figure:: theme_tutorial_assets/img/functionalities.jpg
|
||||
.. figure:: themes/functionalities.jpg
|
||||
:figclass: col-sm-6
|
||||
|
||||
Functionalities
|
||||
@@ -217,7 +217,7 @@ Odoo’s themes are packaged like modules. Even if you are designing a very simp
|
||||
|
||||
The final result should be like this:
|
||||
|
||||
.. image:: theme_tutorial_assets/img/theme_folder.jpg
|
||||
.. image:: themes/theme_folder.jpg
|
||||
|
||||
Edit ``__manifest__.py``
|
||||
------------------------
|
||||
@@ -272,7 +272,7 @@ Since XML files are only loaded when you install the theme, you will have to for
|
||||
|
||||
To do that, click on the Upgrade button in the theme selection screen.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/restart.png
|
||||
.. image:: themes/restart.png
|
||||
|
||||
Structure of an Odoo page
|
||||
=========================
|
||||
@@ -284,7 +284,7 @@ By default, Odoo provides you with a **Header** and a **Footer** (cross-pages) a
|
||||
|
||||
Cross-pages elements will be the same on every page. Unique elements are related to a specific page only.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/page_structure.jpg
|
||||
.. image:: themes/page_structure.jpg
|
||||
|
||||
To inspect the default layout, simply create a new page using the
|
||||
Website Builder. Click on :menuselection:`New --> New Page` and
|
||||
@@ -357,7 +357,7 @@ Finally add **assets.xml** in your **__manifest__.py** file in the data section.
|
||||
|
||||
Update your theme.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/restart.png
|
||||
.. image:: themes/restart.png
|
||||
|
||||
|
||||
Our scss file is now included in our theme, it will be automatically compiled, minified and combined with all Odoo’s assets.
|
||||
@@ -522,13 +522,13 @@ the theme. To do that, edit your ``__manifest__.py`` file like this
|
||||
|
||||
Update your theme
|
||||
|
||||
.. image:: theme_tutorial_assets/img/restart.png
|
||||
.. image:: themes/restart.png
|
||||
|
||||
Great! We successfully added an id to the
|
||||
header and an element after the navigation menu. These changes will be
|
||||
applied to each page of the website.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/after-menu.png
|
||||
.. image:: themes/after-menu.png
|
||||
:class: shadow-0
|
||||
|
||||
Create a specific page layout
|
||||
@@ -696,14 +696,14 @@ Our page is almost ready. Now all we have to do is add **pages.xml** in our **__
|
||||
|
||||
Update your theme
|
||||
|
||||
.. image:: theme_tutorial_assets/img/restart.png
|
||||
.. image:: themes/restart.png
|
||||
|
||||
Great, our Services page is ready and you’ll be able to access it by navigating to ``<yourwebsite>/services`` (the URL we chose above).
|
||||
|
||||
You will notice that it's possible to drag/drop snippets underneath the
|
||||
*Our Services* list.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/services_page_nostyle.png
|
||||
.. image:: themes/services_page_nostyle.png
|
||||
:class: shadow-0
|
||||
|
||||
Now let's go back to our *pages.xml* and, after our page template,
|
||||
@@ -720,7 +720,7 @@ copy/paste the following code.
|
||||
|
||||
This code will add a link to the main menu, referring to the page we created.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/services_page_menu.png
|
||||
.. image:: themes/services_page_menu.png
|
||||
:class: shadow-0
|
||||
|
||||
The **sequence** attribute defines the link’s position in the top menu.
|
||||
@@ -785,7 +785,7 @@ Structure tab. If you want to change the destination tab, you have just to repla
|
||||
|
||||
|
||||
|
||||
.. image:: theme_tutorial_assets/img/snippet_bar.png
|
||||
.. image:: themes/snippet_bar.png
|
||||
:class: col-sm-6 shadow-0
|
||||
|
||||
|
||||
@@ -802,7 +802,7 @@ Effect ``//div[@id='snippet_effect']``
|
||||
The ``<t>`` tag will call our snippet's template and will assign a thumbnail placed in the img folder.
|
||||
You can now drag your snippet from the snippet bar, drop it in your page and see the result.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/snippet_default.png
|
||||
.. image:: themes/snippet_default.png
|
||||
|
||||
|
||||
Snippet options
|
||||
@@ -876,11 +876,11 @@ option will reset the snippet to default.
|
||||
|
||||
Add **options.xml** to ``__manifest__.py`` and update your theme.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/restart.png
|
||||
.. image:: themes/restart.png
|
||||
|
||||
Dropping our snippet onto the page, you will notice that our new options are automatically added to the customize menu. Inspecting the page, you will also notice that the class will be applied to the element when selecting an option.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/snippet_options.png
|
||||
.. image:: themes/snippet_options.png
|
||||
|
||||
Let’s create some css rules in order to provide a visual feedback for our options. Open our **style.scss** file and add the following
|
||||
|
||||
@@ -901,7 +901,7 @@ Let’s create some css rules in order to provide a visual feedback for our opti
|
||||
}
|
||||
}
|
||||
|
||||
.. image:: theme_tutorial_assets/img/snippet_options2.png
|
||||
.. image:: themes/snippet_options2.png
|
||||
:class: shadow-0
|
||||
|
||||
Great! We successfully created options for our snippet.
|
||||
@@ -981,14 +981,14 @@ This time we have to inherit ``assets_editor`` instead of ``assets_frontend``.
|
||||
|
||||
Update your theme
|
||||
|
||||
.. image:: theme_tutorial_assets/img/restart.png
|
||||
.. image:: themes/restart.png
|
||||
|
||||
|
||||
Let’s test our new javascript function. Enter in Edit mode and drop into the page.
|
||||
You should now see the javascript alert that we bound on the ``onFocus`` event.
|
||||
If you close it, then click outside of your snippet and then click in it again, the event will trigger again.
|
||||
|
||||
.. image:: theme_tutorial_assets/img/snippet_custom_method.png
|
||||
.. image:: themes/snippet_custom_method.png
|
||||
:class: shadow-0
|
||||
|
||||
|
||||
@@ -1053,7 +1053,7 @@ Let’s have a look to this example of a classic two column snippet, implemented
|
||||
|
||||
.. container:: col-sm-7
|
||||
|
||||
.. image:: theme_tutorial_assets/img/seo_snippet_wrong.png
|
||||
.. image:: themes/seo_snippet_wrong.png
|
||||
|
||||
.. container:: col-sm-5
|
||||
|
||||
@@ -1065,7 +1065,7 @@ Let’s have a look to this example of a classic two column snippet, implemented
|
||||
|
||||
.. container:: col-sm-7
|
||||
|
||||
.. image:: theme_tutorial_assets/img/seo_snippet_good.png
|
||||
.. image:: themes/seo_snippet_good.png
|
||||
|
||||
.. container:: col-sm-5
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 724 B After Width: | Height: | Size: 724 B |
|
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
@@ -910,7 +910,7 @@ Exercise
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.. image:: web/qweb.*
|
||||
.. image:: web/qweb.png
|
||||
:align: center
|
||||
:width: 70%
|
||||
|
||||
@@ -1818,7 +1818,7 @@ When an ``ActionManager`` instance receive an action of type
|
||||
the views themselves to a *view manager*, which will then set up one or
|
||||
multiple views depending on the original action's requirements:
|
||||
|
||||
.. image:: web/viewarchitecture.*
|
||||
.. image:: web/viewarchitecture.png
|
||||
:align: center
|
||||
:width: 40%
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB |
@@ -25,7 +25,7 @@ App Developer:
|
||||
Overview
|
||||
========
|
||||
|
||||
.. figure:: images/players.png
|
||||
.. figure:: iap/players.png
|
||||
:align: center
|
||||
|
||||
The Players
|
||||
@@ -40,7 +40,7 @@ Overview
|
||||
bridge/translator between an Odoo system and the actual service.
|
||||
|
||||
|
||||
.. figure:: images/credits.jpg
|
||||
.. figure:: iap/credits.jpg
|
||||
:align: center
|
||||
|
||||
The Credits
|
||||
@@ -67,7 +67,7 @@ Overview
|
||||
.. note:: In the following explanations we will ignore the External Service,
|
||||
they are just a detail of the service you provide.
|
||||
|
||||
.. figure:: images/normal.png
|
||||
.. figure:: iap/normal.png
|
||||
:align: center
|
||||
|
||||
'Normal' service flow
|
||||
@@ -87,7 +87,7 @@ Overview
|
||||
been rendered, possibly (depending on the service) displaying or
|
||||
storing its results in the client's system.
|
||||
|
||||
.. figure:: images/no-credit.png
|
||||
.. figure:: iap/no-credit.png
|
||||
:align: center
|
||||
|
||||
Insufficient credits
|
||||
@@ -174,16 +174,16 @@ The service has *seven* important fields:
|
||||
how you **use it, its relevance** to make your service work and inform the
|
||||
client on how they can **access, update or delete their personal information**.
|
||||
|
||||
.. image:: images/menu.png
|
||||
.. image:: iap/menu.png
|
||||
:align: center
|
||||
|
||||
.. image:: images/service_list.png
|
||||
.. image:: iap/service_list.png
|
||||
:align: center
|
||||
|
||||
.. image:: images/creating_service.png
|
||||
.. image:: iap/creating_service.png
|
||||
:align: center
|
||||
|
||||
.. image:: images/service_created.png
|
||||
.. image:: iap/service_created.png
|
||||
:align: center
|
||||
|
||||
You can then create *credit packs* which clients can purchase in order to
|
||||
@@ -214,7 +214,7 @@ A credit pack is essentially a product with five characteristics:
|
||||
pack to another.
|
||||
|
||||
|
||||
.. image:: images/package.png
|
||||
.. image:: iap/package.png
|
||||
:align: center
|
||||
|
||||
.. _iap-odoo-app:
|
||||
@@ -283,7 +283,7 @@ local value via your application and additional parts via a remote service.
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
.. image:: images/button.png
|
||||
.. image:: iap/button.png
|
||||
:align: center
|
||||
|
||||
We can now implement the action method/callback. This will *call our own
|
||||
@@ -512,7 +512,7 @@ parameters we can use to make things clearer to the end-user.
|
||||
JSON-RPC2_ Transaction API
|
||||
==========================
|
||||
|
||||
.. image:: images/flow.png
|
||||
.. image:: iap/flow.png
|
||||
:align: center
|
||||
|
||||
* The IAP transaction API does not require using Odoo when implementing your
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |