Skip to content
Open
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
27 changes: 18 additions & 9 deletions product_catalog_stock/README.rst
Original file line number Diff line number Diff line change
@@ -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
=====================
Expand All @@ -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
Expand All @@ -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
===========
Expand Down
10 changes: 10 additions & 0 deletions product_catalog_stock/models/stock_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
19 changes: 15 additions & 4 deletions product_catalog_stock/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -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.
45 changes: 25 additions & 20 deletions product_catalog_stock/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>Stock Product Catalog</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,21 +360,16 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="stock-product-catalog">
<h1 class="title">Stock Product Catalog</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="stock-product-catalog">
<h1>Stock Product Catalog</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c2c9b703c7c3de458cf84b29cb464f90f1eb9e342e8e6fe6fc31dd9bac0163d3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/product-attribute/tree/18.0/product_catalog_stock"><img alt="OCA/product-attribute" src="https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_catalog_stock"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/product-attribute/tree/18.0/product_catalog_stock"><img alt="OCA/product-attribute" src="https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/product-attribute-18-0/product-attribute-18-0-product_catalog_stock"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Implementation of the product catalog for stock pickings.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -390,32 +385,43 @@ <h1>Stock Product Catalog</h1>
</ul>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<p>To access the catalog from a stock picking.</p>
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<p>You can access the product catalog from a stock picking in two ways:</p>
<p><strong>From an existing picking:</strong></p>
<ol class="arabic simple">
<li>Create a new draft picking.</li>
<li>Click on the product catalog button.</li>
<li>Click it and start adding products to the picking.</li>
<li>Open any stock picking (receipt, delivery, etc.).</li>
<li>In the <em>Operations</em> tab, click the <strong>Catalog</strong> button inside the
moves list.</li>
<li>Browse and add products directly from the catalog.</li>
</ol>
<p><strong>Creating a planned transfer from scratch:</strong></p>
<ol class="arabic simple">
<li>Go to <em>Inventory &gt; Inventory Overview</em>.</li>
<li>Click the <strong>⋮</strong> menu on a picking type kanban card.</li>
<li>Select <strong>Planned transfer from catalog</strong>.</li>
<li>A draft picking is created and the catalog opens immediately.</li>
</ol>
<p>In both cases you can use the <strong>Edit</strong> option on a product card to open
the full product form.</p>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/product-attribute/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/product-attribute/issues/new?body=module:%20product_catalog_stock%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<ul class="simple">
<li>Tecnativa</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://tecnativa.com">Tecnativa</a><ul>
<li>David Vidal</li>
Expand All @@ -425,7 +431,7 @@ <h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand All @@ -438,6 +444,5 @@ <h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
</div>
</div>
</div>
</div>
</body>
</html>
Loading