-
-
Notifications
You must be signed in to change notification settings - Fork 654
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
[14.0][MIG] stock_picking_quick #1088
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ede9280
[ADD] module stock_picking_quick
fff69aa
[UPD] README.rst
OCA-git-bot 65b9f49
[ADD] icon.png
OCA-git-bot 131ef91
[UPD] Update stock_picking_quick.pot
oca-travis 3cd21d0
[UPD] README.rst
OCA-git-bot ca2612e
[FIX] product search primary view
9baef22
[UPD] Update stock_picking_quick.pot
oca-travis e9ba019
[UPD] README.rst
OCA-git-bot cfc063a
stock_picking_quick 12.0.1.0.2
OCA-git-bot 0872a3b
Added translation using Weblate (Portuguese (Brazil))
fcolus 1f5c5ad
Translated using Weblate (Portuguese (Brazil))
fcolus 1bbc806
[FIX] stock_picking_quick : do not raise an error, if the key is not…
legalsylvain 89e6574
stock_picking_quick 12.0.1.0.3
OCA-git-bot 3f26cd3
Added translation using Weblate (Slovenian)
sysadminmatmoz 863ffd0
Translated using Weblate (Slovenian)
sysadminmatmoz 70ea8bf
[IMP] stock_picking_quick: black, isort, prettier
Kev-Roche b5e91bb
[MIG]stock_picking_quick: Migration to 14.0
Kev-Roche 77c06e8
little fixes
Kev-Roche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../stock_picking_quick |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
=================== | ||
Quick Stock Picking | ||
=================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
||
.. |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/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%2Fstock--logistics--workflow-lightgray.png?logo=github | ||
:target: https://github.com/OCA/stock-logistics-workflow/tree/12.0/stock_picking_quick | ||
:alt: OCA/stock-logistics-workflow | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/stock-logistics-workflow-12-0/stock-logistics-workflow-12-0-stock_picking_quick | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/154/12.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module allows to easily pick products into a picking (mass line add/update). | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
Inside a picking, you can click on "Add products", to open a product tree view, then update "qty to process" field. | ||
|
||
The update of "qty to process" will add a new move line or update the existing move line. If qty to process is 0 its move line will be deleted if it exists. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-workflow/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/stock-logistics-workflow/issues/new?body=module:%20stock_picking_quick%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Akretion | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
Akretion | ||
|
||
* Sébastien BEAU <sebastien.beau@akretion.com> | ||
* Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com> | ||
* Pierrick Brun <pierrick.brun@akretion.com> | ||
* David Béal <david.beal@akretion.com> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
.. |maintainer-PierrickBrun| image:: https://github.com/PierrickBrun.png?size=40px | ||
:target: https://github.com/PierrickBrun | ||
:alt: PierrickBrun | ||
.. |maintainer-bealdav| image:: https://github.com/bealdav.png?size=40px | ||
:target: https://github.com/bealdav | ||
:alt: bealdav | ||
|
||
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-PierrickBrun| |maintainer-bealdav| | ||
|
||
This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/12.0/stock_picking_quick>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# © 2022 Today Akretion | ||
# @author Pierrick Brun <pierrick.brun@akretion.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "Quick Stock Picking", | ||
"version": "14.0.1.0.3", | ||
"author": "Akretion, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/stock-logistics-workflow", | ||
"license": "AGPL-3", | ||
"category": "Stock", | ||
"depends": ["base_product_mass_addition", "stock"], | ||
"data": ["views/picking_view.xml", "views/product_view.xml"], | ||
"installable": True, | ||
"maintainers": ["PierrickBrun", "bealdav"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_picking_quick | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2020-06-23 16:19+0000\n" | ||
"Last-Translator: Fernando Colus <fcolus1@gmail.com>\n" | ||
"Language-Team: none\n" | ||
"Language: pt_BR\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=2; plural=n > 1;\n" | ||
"X-Generator: Weblate 3.10\n" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.view_picking_form | ||
msgid "Add" | ||
msgstr "Adicionar" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_search_view4picking | ||
msgid "Filter products available in the current location" | ||
msgstr "Filtrar produtos disponíveis na localização atual" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_tree_view4picking | ||
msgid "Open" | ||
msgstr "Abrir" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model,name:stock_picking_quick.model_product_product | ||
msgid "Product" | ||
msgstr "Produto" | ||
|
||
#. module: stock_picking_quick | ||
#: code:addons/stock_picking_quick/models/stock_picking.py:24 | ||
#, python-format | ||
msgid "Product Variants" | ||
msgstr "Variantes de produto" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_tree_view4picking | ||
msgid "Products for picking" | ||
msgstr "Produtos para coleta" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model.fields,field_description:stock_picking_quick.field_product_product__move_ids | ||
msgid "Stock Moves" | ||
msgstr "Movimentações de Estoque" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model.fields,help:stock_picking_quick.field_product_product__move_ids | ||
msgid "Technical: used to compute quantities to pick." | ||
msgstr "Técnico: usado para calcular as quantidades a serem coletadas." | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model,name:stock_picking_quick.model_stock_picking | ||
msgid "Transfer" | ||
msgstr "Transferência" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_search_view4picking | ||
msgid "Use Only Available Products" | ||
msgstr "Use apenas produtos disponíveis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_picking_quick | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"PO-Revision-Date: 2022-06-26 10:05+0000\n" | ||
"Last-Translator: Matjaz Mozetic <matjaz@luxim.si>\n" | ||
"Language-Team: none\n" | ||
"Language: sl\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" | ||
"%100==4 ? 2 : 3;\n" | ||
"X-Generator: Weblate 4.3.2\n" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.view_picking_form | ||
msgid "Add" | ||
msgstr "Dodaj" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_search_view4picking | ||
msgid "Filter products available in the current location" | ||
msgstr "Filtriraj izdelke na voljo na trenutni lokaciji" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_tree_view4picking | ||
msgid "Open" | ||
msgstr "Odpri" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model,name:stock_picking_quick.model_product_product | ||
msgid "Product" | ||
msgstr "Proizvod" | ||
|
||
#. module: stock_picking_quick | ||
#: code:addons/stock_picking_quick/models/stock_picking.py:24 | ||
#, python-format | ||
msgid "Product Variants" | ||
msgstr "Različice proizvodov" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_tree_view4picking | ||
msgid "Products for picking" | ||
msgstr "Proizvodi za dobavnico" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model.fields,field_description:stock_picking_quick.field_product_product__move_ids | ||
msgid "Stock Moves" | ||
msgstr "Premiki zaloge" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model.fields,help:stock_picking_quick.field_product_product__move_ids | ||
msgid "Technical: used to compute quantities to pick." | ||
msgstr "Tehnično: za izračun količin na dobavnici." | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model,name:stock_picking_quick.model_stock_picking | ||
msgid "Transfer" | ||
msgstr "Premestitev" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_search_view4picking | ||
msgid "Use Only Available Products" | ||
msgstr "Uporabljaj le proizvode na voljo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_picking_quick | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.view_picking_form | ||
msgid "Add" | ||
msgstr "" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_search_view4picking | ||
msgid "Filter products available in the current location" | ||
msgstr "" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_tree_view4picking | ||
msgid "Open" | ||
msgstr "" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model,name:stock_picking_quick.model_product_product | ||
msgid "Product" | ||
msgstr "" | ||
|
||
#. module: stock_picking_quick | ||
#: code:addons/stock_picking_quick/models/stock_picking.py:24 | ||
#, python-format | ||
msgid "Product Variants" | ||
msgstr "" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_tree_view4picking | ||
msgid "Products for picking" | ||
msgstr "" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model.fields,field_description:stock_picking_quick.field_product_product__move_ids | ||
msgid "Stock Moves" | ||
msgstr "" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model.fields,help:stock_picking_quick.field_product_product__move_ids | ||
msgid "Technical: used to compute quantities to pick." | ||
msgstr "" | ||
|
||
#. module: stock_picking_quick | ||
#: model:ir.model,name:stock_picking_quick.model_stock_picking | ||
msgid "Transfer" | ||
msgstr "" | ||
|
||
#. module: stock_picking_quick | ||
#: model_terms:ir.ui.view,arch_db:stock_picking_quick.product_search_view4picking | ||
msgid "Use Only Available Products" | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import stock_picking | ||
from . import product_product |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# © 2022 Today Akretion | ||
# @author Pierrick Brun <pierrick.brun@akretion.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
|
||
from odoo import api, models | ||
|
||
|
||
class ProductProduct(models.Model): | ||
_inherit = "product.product" | ||
|
||
@api.depends("stock_move_ids") | ||
@api.depends_context("parent_model") | ||
def _compute_process_qty(self): | ||
res = super(ProductProduct, self)._compute_process_qty() | ||
if self.env.context.get("parent_model", False) == "stock.picking": | ||
quantities = self.env["stock.move"].read_group( | ||
[ | ||
("picking_id", "=", self.env.context.get("parent_id")), | ||
("product_id", "in", self.ids), | ||
], | ||
["product_id", "product_qty:sum"], | ||
["product_id"], | ||
) | ||
for product in self: | ||
for qty in quantities: | ||
if product.id == qty["product_id"][0]: | ||
product.qty_to_process = qty["product_qty"] | ||
return res | ||
|
||
def _default_quick_uom_id(self): | ||
if self.env.context.get("parent_model", False) == "stock.picking": | ||
return self.uom_id | ||
return super()._default_quick_uom_id() | ||
|
||
@api.model | ||
def search(self, args, offset=0, limit=None, order=None, count=False): | ||
if self.env.context.get("in_current_parent"): | ||
picking = self.env["stock.picking"].browse( | ||
self.env.context.get("parent_id") | ||
) | ||
if picking: | ||
args.append(("stock_move_ids.picking_id", "=", picking.id)) | ||
return super(ProductProduct, self).search( | ||
args, offset=offset, limit=limit, order=order, count=count | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add a depends_context for that entry