Skip to content

[FW][IMP] tests: check is resource file used #12073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/administration/odoo_accounts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Edit Security Settings --> Delete Account`. It can also be accessed by going to
Upon clicking the :guilabel:`Delete Account` button, a pop-up window appears, requesting
confirmation for the account deletion.

.. image:: odoo_account/delete-account.png
.. image:: odoo_accounts/delete-account.png
:align: center
:alt: Clicking on the Delete Account button will populate a window verifying the change.

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed content/applications/hr/appraisals/feedback.png
Diff not rendered.
Diff not rendered.
Binary file removed content/applications/hr/fleet/categories.png
Diff not rendered.
Binary file removed content/applications/hr/frontdesk/main-lobby.png
Diff not rendered.
Binary file removed content/applications/hr/lunch/management/notify.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed content/applications/hr/payroll/contracts/offers.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed content/applications/hr/payroll/new-attachment.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To do that, go to the :menuselection:`Inventory app --> Configuration --> Settin
the :guilabel:`Traceability` section, and click the box next to :guilabel:`Lots & Serial Numbers`.
Then, click the :guilabel:`Save` button to save changes.

.. image:: product_tracking/product_tracking/differences-enabled-setting.png
.. image:: product_tracking/differences-enabled-setting.png
:align: center
:alt: Enabled lots and serial numbers feature in inventory settings.

Expand All @@ -42,7 +42,7 @@ or food. Lots and can be used to trace a product back to a group, which is espec
managing product recalls or expiration dates.

.. example::
.. image:: product_tracking/product_tracking/differences-lot.png
.. image:: product_tracking/differences-lot.png
:align: center
:alt: Created lot with quantity of products in it.

Expand All @@ -59,7 +59,7 @@ identifiable when it travels through the supply chain. This can be especially us
manufacturers that provide after-sales services related to products they sell and deliver.

.. example::
.. image:: product_tracking/product_tracking/differences-serial-numbers.png
.. image:: product_tracking/differences-serial-numbers.png
:align: center
:alt: List of serial numbers for product.

Expand Down Expand Up @@ -89,7 +89,7 @@ Doing so reveals all existing lots and serial numbers, and each can be expanded
quantities with that assigned number. For unique serial numbers that are *not* reused, there should
*only* be one product per serial number.

.. image:: product_tracking/product_tracking/differences-tracking.png
.. image:: product_tracking/differences-tracking.png
:align: center
:alt: Reporting page with drop-down lists of lots and serial numbers.

Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Configuration

Removal strategies are set on either the product category or storage location.

.. image:: removal_strategies/removal/navigate-location-category.png
.. image:: removal_strategies/navigate-location-category.png
:align: center
:alt: Change the Force Removal Strategy for either the Product Categories or Locations.

Expand Down Expand Up @@ -108,7 +108,7 @@ expiration dates. To enable this feature, navigate to :menuselection:`Inventory
--> Settings`. Under the :guilabel:`Traceability` heading, check the box beside :guilabel:`Lots &
Serial Numbers` to enable the feature.

.. image:: removal_strategies/removal/enable-lots.png
.. image:: removal_strategies/enable-lots.png
:align: center
:alt: Enable lots and serial numbers.

Expand All @@ -133,7 +133,7 @@ To activate these features, navigate to :menuselection:`Inventory --> Configurat
Under the :guilabel:`Warehouse` heading, enable the :guilabel:`Storage Location` and
:guilabel:`Multi-Step Routes` features.

.. image:: removal_strategies/removal/enable-location.png
.. image:: removal_strategies/enable-location.png
:align: center
:alt: Enable the locations and route features.

Expand All @@ -149,7 +149,7 @@ Configuration --> Settings`.
Under the :guilabel:`Traceability` heading, ensure the :guilabel:`Lots & Serial Numbers` feature is
selected, and then select the check box for :guilabel:`Expiration Dates` to enable the feature.

.. image:: removal_strategies/removal/enable-expiration.png
.. image:: removal_strategies/enable-expiration.png
:align: center
:alt: Enable expiration dates feature for FEFO.

Expand All @@ -164,7 +164,7 @@ removal strategy.
Navigate to :menuselection:`Inventory --> Configuration --> Settings` and select the check box for
the :guilabel:`Packages` feature.

.. image:: removal_strategies/removal/enable-pack.png
.. image:: removal_strategies/enable-pack.png
:align: center
:alt: Enable the packages feature.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ scheduled date that products should be reserved if the transfers are starred (fa
This means products are reserved two days before the scheduled delivery date for normal orders,
and three days before the scheduled delivery date for starred (favorited) transfers.

.. image:: before_scheduled_date/before-scheduled-date- days-before.png
.. image:: before_scheduled_date/before-scheduled-date-days-before.png
:align: center
:alt: Reserve before scheduled date field with set numerical values.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To do so, navigate to the :menuselection:`Apps` application from the main Odoo d
Then, remove the :guilabel:`Apps` filter, and type in `Delivery Costs` in the :guilabel:`Search...`
bar. After finding the :guilabel:`Delivery Costs` module, click :guilabel:`Activate` to install it.

.. image:: setup_configuration/setup_configuration/install-module.png
.. image:: setup_configuration/install-module.png
:align: center
:alt: Install the Delivery Costs module.

Expand All @@ -43,7 +43,7 @@ Methods`.
#. Scroll to the :guilabel:`Shipping` section and enable the :guilabel:`Delivery Methods` feature
by checking the corresponding checkbox.

.. image:: setup_configuration/setup_configuration/enable-delivery.png
.. image:: setup_configuration/enable-delivery.png
:align: center
:alt: Enable the *Delivery Methods* feature by checking the box in Configuration > Settings.

Expand Down Expand Up @@ -100,7 +100,7 @@ To enable free shipping if the amount of the order exceeds a specified amount, c
- :guilabel:`Free if order amount is above`: `$100.00`
- :guilabel:`Delivery Product`: `[SHIP] Flat`

.. image:: setup_configuration/setup_configuration/new-shipping-method.png
.. image:: setup_configuration/new-shipping-method.png
:align: center
:alt: Example of filling out a shipping method.

Expand All @@ -127,7 +127,7 @@ Once finished, click either :guilabel:`Save & New` to add another rule, or :guil
To charge customers $20 in shipping for orders with five or fewer products, set the
:guilabel:`Condition` to `Quantity <= 5.00`, and the :guilabel:`Delivery Cost` to `$20`.

.. image:: setup_configuration/setup_configuration/pricing-rule.png
.. image:: setup_configuration/pricing-rule.png
:align: center
:alt: Display window to add a pricing rule. Set a condition and delivery cost.

Expand All @@ -153,7 +153,7 @@ Shipping cost is the :guilabel:`Delivery cost` specified in the rule that satisf

:guilabel:`Margin on Rate` is `10%` and :guilabel:`Additional margin` is `$9.00`.

.. image:: setup_configuration/setup_configuration/delivery-cost-example.png
.. image:: setup_configuration/delivery-cost-example.png
:align: center
:alt: Show example of "Based on rules" shipping method with margins configured.

Expand Down Expand Up @@ -203,7 +203,7 @@ To set up routes, go to :menuselection:`Inventory app --> Configuration --> Rout
On the route form, in the :guilabel:`Applicable On` section, tick the :guilabel:`Shipping Methods`
checkbox.

.. figure:: setup_configuration/setup_configuration/shipping-route.png
.. figure:: setup_configuration/shipping-route.png
:align: center
:alt: Routes form with the Shipping Methods checkbox selected.

Expand All @@ -219,7 +219,7 @@ routes from the drop-down menu.
If the desired route is not selectable, check that the *Shipping Methods* option is enabled in
the route's *Applicable On* section.

.. figure:: setup_configuration/setup_configuration/set-routes.png
.. figure:: setup_configuration/set-routes.png
:align: center
:alt: Show set routes on shipping method form.

Expand Down Expand Up @@ -253,7 +253,7 @@ the shipping method form.
`Furniture Delivery`, a delivery product with a fixed rate of `$200`, is added to sales order
`S00088`.

.. image:: setup_configuration/setup_configuration/delivery-product.png
.. image:: setup_configuration/delivery-product.png
:align: center
:alt: Show delivery order on the sales order line.

Expand All @@ -264,7 +264,7 @@ The shipping method added to the sales order is linked to the shipping carrier d
delivery order. To add or change the delivery method on the delivery itself, go to the
:guilabel:`Additional Info` tab and modify the :guilabel:`Carrier` field.

.. image:: setup_configuration/setup_configuration/delivery-order.png
.. image:: setup_configuration/delivery-order.png
:align: center
:alt: Shipping carrier information on the delivery form.

Expand Down
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ field, there are:
correct the quantity, five units are moved from `WH/Stock` to `Virtual Locations/Inventory
Adjustment`.

.. image:: inventory_management/inventory_management/inventory-loss.png
.. image:: inventory_management/inventory-loss.png
:align: center
:alt: Product ends up in Virtual Locations/Inventory Adjustment.

Expand All @@ -93,7 +93,7 @@ field, there are:
products shipped between different addresses, such as :ref:`Physical Locations/Inter-warehouse
transit <inventory/warehouses_storage/interwarehouse-transit>`.

.. image:: inventory_management/inventory_management/locations.png
.. image:: inventory_management/locations.png
:align: center
:alt: List of locations in Odoo.

Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,13 @@ the **long-term forecasted quantity**.

.. example::

.. figure:: report/zero-forecast.png
.. figure:: reordering_rules/zero-forecast.png
:alt: Forecast and To Order quantities is zero.

Continuing the above example, when the sales order's deadline is adjusted to December 4th, the
:guilabel:`Forecast` and :guilabel:`To Order` quantities are zero.

.. figure:: report/five-forecast.png
.. figure:: reordering_rules/five-forecast.png
:alt: Show forecasted report.

Opening the :guilabel:`Forecasted Report` shows the :guilabel:`Forecasted` units is `5.00`.
Expand Down Expand Up @@ -521,7 +521,7 @@ tariffs).

Ordering separately for these sales orders totals $300 in shipping costs.

.. image:: report/forecasted-date.png
.. image:: reordering_rules/forecasted-date.png
:alt: Show forecasted date visualization.

Setting :guilabel:`Visibility Days` to `20.0` allows Odoo to "look ahead" 20 days from December 4
Expand All @@ -530,7 +530,7 @@ Setting :guilabel:`Visibility Days` to `20.0` allows Odoo to "look ahead" 20 day
- It groups |SO| 2's order with |SO| 1, reducing shipping costs by consolidating orders.
- |SO| 3, which is due on Dec 25, is one day late and is not grouped with the other two orders.

.. image:: report/visibility-days.png
.. image:: reordering_rules/visibility-days.png
:alt: Visibility days visualization.

Counterexample where visibility days is not triggered
Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Data monitoring
**reporting view**, go to :menuselection:`Website --> Reporting --> eCommerce`. This dashboard helps
you monitor everything related to sales, such as sales performance per product, category, day, etc.

.. image:: reporting/reporting.png
.. image:: performance/reporting.png
:align: center
:alt: Performance reporting of eCommerce

Expand Down
Diff not rendered.
Diff not rendered.
Binary file removed content/applications/websites/elearning/settings.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ about the Odoo JavaScript framework in its entirety, as used by the web client.

.. odoo[Odoo JavaScript framework] --> Owl

.. figure:: 02_web_framework/previously_learned.svg
.. figure:: 02_build_a_dashboard/previously_learned.svg
:align: center
:width: 50%

Expand All @@ -28,7 +28,7 @@ features to it, using the Odoo JavaScript framework.

.. admonition:: Goal

.. image:: 02_web_framework/overview_02.png
.. image:: 02_build_a_dashboard/overview_02.png
:align: center

.. spoiler:: Solutions
Expand All @@ -55,7 +55,7 @@ and a main content zone just below. This is done using the `Layout component
Open http://localhost:8069/web, then open the :guilabel:`Awesome Dashboard` app, and see the
result.

.. image:: 02_web_framework/new_layout.png
.. image:: 02_build_a_dashboard/new_layout.png
:align: center

.. seealso::
Expand Down Expand Up @@ -169,7 +169,7 @@ Let us now add two buttons to our control panel:
<https://github.com/odoo/odoo/blob/ef424a9dc22a5abbe7b0a6eff61cf113826f04c0/addons/account
/static/src/components/journal_dashboard_activity/journal_dashboard_activity.js#L28-L35>`_.

.. image:: 02_web_framework/navigation_buttons.png
.. image:: 02_build_a_dashboard/navigation_buttons.png
:align: center

.. seealso::
Expand All @@ -186,7 +186,7 @@ Let us now improve our content.
hardcoded to `(18*size)rem`.
#. Add two cards to the dashboard. One with no size, and the other with a size of 2.

.. image:: 02_web_framework/dashboard_item.png
.. image:: 02_build_a_dashboard/dashboard_item.png
:align: center

.. seealso::
Expand Down Expand Up @@ -223,7 +223,7 @@ A basic request could look like this:
- Number of cancelled orders this month
- Average time for an order to go from 'new' to 'sent' or 'cancelled'

.. image:: 02_web_framework/statistics.png
.. image:: 02_build_a_dashboard/statistics.png
:align: center

.. seealso::
Expand Down Expand Up @@ -275,7 +275,7 @@ the chartjs code every time if they don't need it.
#. The `PieChart` component will need to render a canvas, and draw on it using `chart.js`.
#. Make it work!

.. image:: 02_web_framework/pie_chart.png
.. image:: 02_build_a_dashboard/pie_chart.png
:align: center
:scale: 80%

Expand Down Expand Up @@ -442,7 +442,7 @@ The dashboard configuration will be saved as a list of removed item ids.
#. And modify the `Dashboard` component to filter the current items by removing the ids of items
from the configuration.

.. image:: 02_web_framework/items_configuration.png
.. image:: 02_build_a_dashboard/items_configuration.png
:width: 80%
:align: center

Expand Down
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed content/developer/tutorials/web/viewarchitecture.dia
Binary file not shown.
1 change: 0 additions & 1 deletion content/developer/tutorials/web/viewarchitecture.svg
Diff not rendered.
21 changes: 21 additions & 0 deletions tests/checkers/resource_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,27 @@ def check_resource_file_name(file_path):
'resource-file-name'
)

def check_resource_file_referenced(file, options=None):
""" Check that resource files are referenced in at least one RST file. """
resource_file = Path(file)
resource_folder = resource_file.parent
rst_file = resource_folder.with_suffix('.rst')
if rst_file.exists():
if resource_file.name not in rst_file.read_text():
log_error(
file,
0,
f"the resource file is not referenced in {rst_file}",
"resource-file-referenced",
)
else:
log_error(
rst_file,
0,
f"resource folder name '{resource_folder.name}' does not match an rst file name.",
'resource-folder-match',
)

@sphinxlint.checker('')
def check_file_extensions(file, lines, options=None):
""" Check that there is no file without extension. """
Expand Down
Loading