-
-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
230 additions
and
0 deletions.
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,50 @@ | ||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png | ||
:target: https://www.gnu.org/licenses/agpl | ||
:alt: License: AGPL-3 | ||
|
||
======================= | ||
Putaway strategy method | ||
======================= | ||
|
||
This module adds the putaway strategy method back, removed from the stock module in Odoo 11. | ||
|
||
Installation | ||
============ | ||
|
||
To install this module, just click the install button. This module is automatically installed when installing relying modules such as *stock_putaway_product*. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/stock-logistics-warehouse/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Alexandre Saunier - Camptocamp SA <alexandre.saunier@camptocamp.com> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
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. | ||
|
||
To contribute to this module, please visit https://odoo-community.org. |
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 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
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,21 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
{ | ||
'name': 'Putaway strategy method', | ||
'summary': 'Add the putaway strategy method back, ' | ||
'removed from the stock module in Odoo 12', | ||
'version': '12.0.1.0.0', | ||
'category': 'Inventory', | ||
'website': 'https://github.com/OCA/stock-logistics-warehouse', | ||
'author': 'Camptocamp SA, ' | ||
'Odoo Community Association (OCA)', | ||
'license': 'AGPL-3', | ||
'depends': [ | ||
'product', | ||
'stock' | ||
], | ||
'data': [ | ||
'views/product_strategy_views.xml' | ||
], | ||
'development_status': 'Production/Stable', | ||
'maintainers': ['asaunier'], | ||
} |
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,36 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_putaway_method | ||
# | ||
# Translators: | ||
# Lukáš Spurný <lukasspurny8@gmail.com>, 2018 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-03-02 03:44+0000\n" | ||
"PO-Revision-Date: 2018-03-02 03:44+0000\n" | ||
"Last-Translator: Lukáš Spurný <lukasspurny8@gmail.com>, 2018\n" | ||
"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/" | ||
"teams/23907/cs_CZ/)\n" | ||
"Language: cs_CZ\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" | ||
|
||
#. module: stock_putaway_method | ||
#: model:ir.model.fields,field_description:stock_putaway_method.field_product_putaway_method | ||
msgid "Method" | ||
msgstr "Metoda" | ||
|
||
#. module: stock_putaway_method | ||
#: model:ir.model,name:stock_putaway_method.model_product_putaway | ||
msgid "Put Away Strategy" | ||
msgstr "Strategie vyřazení" | ||
|
||
#~ msgid "Fixed Locations Per Categories" | ||
#~ msgstr "Upravené umístění podle kategorií" | ||
|
||
#~ msgid "Putaway" | ||
#~ msgstr "Dát pryč" |
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,35 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_putaway_method | ||
# | ||
# Translators: | ||
# Quentin THEURET <odoo@kerpeo.com>, 2018 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-03-02 03:44+0000\n" | ||
"PO-Revision-Date: 2018-03-02 03:44+0000\n" | ||
"Last-Translator: Quentin THEURET <odoo@kerpeo.com>, 2018\n" | ||
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" | ||
"Language: fr\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" | ||
|
||
#. module: stock_putaway_method | ||
#: model:ir.model.fields,field_description:stock_putaway_method.field_product_putaway_method | ||
msgid "Method" | ||
msgstr "Méthode" | ||
|
||
#. module: stock_putaway_method | ||
#: model:ir.model,name:stock_putaway_method.model_product_putaway | ||
msgid "Put Away Strategy" | ||
msgstr "Stratégie de rangement" | ||
|
||
#~ msgid "Fixed Locations Per Categories" | ||
#~ msgstr "Emplacement fixe par catégories" | ||
|
||
#~ msgid "Putaway" | ||
#~ msgstr "Rangement" |
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,25 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * stock_putaway_method | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 11.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_putaway_method | ||
#: model:ir.model.fields,field_description:stock_putaway_method.field_product_putaway_method | ||
msgid "Method" | ||
msgstr "" | ||
|
||
#. module: stock_putaway_method | ||
#: model:ir.model,name:stock_putaway_method.model_product_putaway | ||
msgid "Put Away Strategy" | ||
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 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from . import product_strategy |
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,17 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from odoo import api, fields, models | ||
|
||
|
||
class PutAwayStrategy(models.Model): | ||
_inherit = 'product.putaway' | ||
|
||
method = fields.Selection( | ||
selection='_get_putaway_options', | ||
string='Method', | ||
default='fixed', | ||
required=True, | ||
) | ||
|
||
@api.model | ||
def _get_putaway_options(self): | ||
return [('fixed', 'Fixed Location')] |
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,7 @@ | ||
* Camptocamp <https://camptocamp.com> | ||
|
||
* Alexandre Saunier <alexandre.saunier@camptocamp.com> | ||
|
||
* Open Source Integrators <https://opensourceintegrators.com> | ||
|
||
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com> |
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 @@ | ||
This module adds the putaway strategy method back, removed from the stock module in Odoo 12. |
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,3 @@ | ||
* Create your own new module to implement new putaway strategies | ||
* Extend the method `_get_putaway_options` to add your new method in the list | ||
of available strategies |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from . import test_putaway_method |
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,12 @@ | ||
# Copyright 2018 Camptocamp SA | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo.tests.common import TransactionCase | ||
|
||
|
||
class TestPutawayMethod(TransactionCase): | ||
|
||
# Check if "fixed" is a valid putaway method | ||
def test_01_putaway_methods(self): | ||
field_method = self.env['product.putaway']._fields.get('method') | ||
self.assertIn('fixed', field_method.get_values(self.env)) |
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,17 @@ | ||
<odoo> | ||
|
||
<record id="view_putaway" model="ir.ui.view"> | ||
<field name="name">product.putaway.form.method</field> | ||
<field name="model">product.putaway</field> | ||
<field name="inherit_id" ref="stock.view_putaway"/> | ||
<field name="arch" type="xml"> | ||
<field name="name" position="after"> | ||
<field name="method"/> | ||
</field> | ||
<field name="fixed_location_ids" position="attributes"> | ||
<attribute name="attrs">{'invisible': [('method', '!=', 'fixed')]}</attribute> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
</odoo> |