[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
@@ -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 |