Maintainers
+Maintainers
This module is maintained by the OCA.
@@ -438,6 +444,5 @@ diff --git a/product_catalog_stock/README.rst b/product_catalog_stock/README.rst index b3eae1eedda..083f122c670 100644 --- a/product_catalog_stock/README.rst +++ b/product_catalog_stock/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - ===================== Stock Product Catalog ===================== @@ -17,7 +13,7 @@ Stock Product Catalog .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github @@ -42,11 +38,24 @@ Implementation of the product catalog for stock pickings. Usage ===== -To access the catalog from a stock picking. +You can access the product catalog from a stock picking in two ways: + +**From an existing picking:** + +1. Open any stock picking (receipt, delivery, etc.). +2. In the *Operations* tab, click the **Catalog** button inside the + moves list. +3. Browse and add products directly from the catalog. + +**Creating a planned transfer from scratch:** + +1. Go to *Inventory > Inventory Overview*. +2. Click the **⋮** menu on a picking type kanban card. +3. Select **Planned transfer from catalog**. +4. A draft picking is created and the catalog opens immediately. -1. Create a new draft picking. -2. Click on the product catalog button. -3. Click it and start adding products to the picking. +In both cases you can use the **Edit** option on a product card to open +the full product form. Bug Tracker =========== diff --git a/product_catalog_stock/models/stock_picking.py b/product_catalog_stock/models/stock_picking.py index 98f5e015ecb..23e6e62040a 100644 --- a/product_catalog_stock/models/stock_picking.py +++ b/product_catalog_stock/models/stock_picking.py @@ -16,6 +16,16 @@ def _get_action_add_from_catalog_extra_context(self): "order_id": self.id, } + def action_add_from_catalog(self): + action = super().action_add_from_catalog() + # The move list field context carries form_view_ref pointing to a + # stock.move view. ViewService forwards *_view_ref keys to get_views, + # so the wrong arch would be compiled against product.product. + action["context"] = { + k: v for k, v in action["context"].items() if not k.endswith("_view_ref") + } + return action + def _default_order_line_values(self, child_field=False): default_data = super()._default_order_line_values(child_field) new_default_data = self.env["stock.move"]._get_product_catalog_lines_data( diff --git a/product_catalog_stock/readme/USAGE.md b/product_catalog_stock/readme/USAGE.md index ab96d4285cc..fb4525a899e 100644 --- a/product_catalog_stock/readme/USAGE.md +++ b/product_catalog_stock/readme/USAGE.md @@ -1,5 +1,16 @@ -To access the catalog from a stock picking. +You can access the product catalog from a stock picking in two ways: -1. Create a new draft picking. -2. Click on the product catalog button. -3. Click it and start adding products to the picking. +**From an existing picking:** + +1. Open any stock picking (receipt, delivery, etc.). +2. In the *Operations* tab, click the **Catalog** button inside the moves list. +3. Browse and add products directly from the catalog. + +**Creating a planned transfer from scratch:** + +1. Go to *Inventory > Inventory Overview*. +2. Click the **⋮** menu on a picking type kanban card. +3. Select **Planned transfer from catalog**. +4. A draft picking is created and the catalog opens immediately. + +In both cases you can use the **Edit** option on a product card to open the full product form. diff --git a/product_catalog_stock/static/description/index.html b/product_catalog_stock/static/description/index.html index 31c9b86eba0..b3da85b814b 100644 --- a/product_catalog_stock/static/description/index.html +++ b/product_catalog_stock/static/description/index.html @@ -3,7 +3,7 @@
-Implementation of the product catalog for stock pickings.
Table of contents
To access the catalog from a stock picking.
+You can access the product catalog from a stock picking in two ways:
+From an existing picking:
Creating a planned transfer from scratch:
+In both cases you can use the Edit option on a product card to open +the full product form.
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed @@ -407,15 +413,15 @@
Do not contact contributors directly about support or help with technical issues.