Skip to content

Commit

Permalink
[MIG] Migrate stock_mts_mto_rule to 12.0
Browse files Browse the repository at this point in the history
Major changes to the way Warehouses update their routes/rules and self heal.
Improved rule code to use `float_compare` and `float_is_zero`.
  • Loading branch information
jaredkipe authored and msteinfeld-sirum committed Oct 10, 2022
1 parent e55ae44 commit a9341e8
Show file tree
Hide file tree
Showing 30 changed files with 888 additions and 601 deletions.
3 changes: 2 additions & 1 deletion stock_mts_mto_rule/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You should not select both the mts+mto route and the mto route.

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/153/11.0
:target: https://runbot.odoo-community.org/runbot/153/12.0

Known issues
============
Expand All @@ -73,6 +73,7 @@ Contributors
------------

* Florian da Costa <[email protected]>
* Jared Kipe <[email protected]>

Do not contact contributors directly about support or help with technical issues.

Expand Down
2 changes: 1 addition & 1 deletion stock_mts_mto_rule/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import model
from . import models
36 changes: 20 additions & 16 deletions stock_mts_mto_rule/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{'name': 'Stock MTS+MTO Rule',
'version': '11.0.1.0.0',
'author': 'Akretion,Odoo Community Association (OCA)',
'website': 'http://www.akretion.com',
'license': 'AGPL-3',
'category': 'Warehouse',
'summary': 'Add a MTS+MTO route',
'depends': ['stock',
],
'demo': [],
'data': ['data/stock_data.xml',
'view/pull_rule.xml',
'view/warehouse.xml',
],
'installable': True,
}
{
'name': 'Stock MTS+MTO Rule',
'summary': 'Add a MTS+MTO route',
'version': '12.0.1.0.0',
'development_status': 'Mature',
'category': 'Warehouse',
'website': 'https://github.com/OCA/stock-logistics-warehouse',
'author': 'Akretion,Odoo Community Association (OCA)',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': [
'stock',
],
'data': [
'data/stock_data.xml',
'view/pull_rule.xml',
'view/warehouse.xml',
],
}
57 changes: 37 additions & 20 deletions stock_mts_mto_rule/i18n/cs_CZ.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,78 +20,92 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/stock_warehouse.py:35
#, python-format
msgid "Can't find MTO Rule on the warehouse"
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_rule__action
msgid "Action"
msgstr ""

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/stock_warehouse.py:42
#, python-format
msgid "Can't find MTS Rule on the warehouse"
#: selection:stock.rule,action:0
msgid "Buy"
msgstr ""

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/stock_warehouse.py:31
#, python-format
msgid "Can't find any generic MTS+MTO route."
#: selection:stock.rule,action:0
msgid "Choose between MTS and MTO"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model.fields,help:stock_mts_mto_rule.field_stock_warehouse_mto_mts_management
#: model:ir.model.fields,help:stock_mts_mto_rule.field_stock_warehouse__mto_mts_management
msgid ""
"If this new route is selected on product form view, a purchase order will be "
"created only if the virtual stock is less than 0 else, the product will be "
"taken from stocks"
msgstr ""

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/procurement_rule.py:27
#: code:addons/stock_mts_mto_rule/models/stock_rule.py:28
#, python-format
msgid ""
"Inconsistency between the source locations of the mts and mto rules linked "
"to the procurement rule: %s! It should be the same."
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_procurement_rule_mto_rule_id
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_rule__mto_rule_id
msgid "MTO Rule"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_warehouse_mts_mto_rule_id
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_warehouse__mts_mto_rule_id
msgid "MTO+MTS rule"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_procurement_rule_mts_rule_id
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_rule__mts_rule_id
msgid "MTS Rule"
msgstr ""

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/stock_warehouse.py:118
#: code:addons/stock_mts_mto_rule/models/stock_warehouse.py:36
#, python-format
msgid "MTS+MTO"
msgstr ""

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/models/stock_warehouse.py:57
#: model:stock.location.route,name:stock_mts_mto_rule.route_mto_mts
#, python-format
msgid "Make To Order + Make To Stock"
msgstr ""

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/procurement_rule.py:22
#: code:addons/stock_mts_mto_rule/models/stock_rule.py:23
#, python-format
msgid "No MTS or MTO rule configured on procurement rule: %s!"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model,name:stock_mts_mto_rule.model_procurement_rule
msgid "Procurement Rule"
msgstr "Pravidlo zadávání zakázek"
#: selection:stock.rule,action:0
msgid "Pull & Push"
msgstr ""

#. module: stock_mts_mto_rule
#: selection:stock.rule,action:0
msgid "Pull From"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_warehouse_mto_mts_management
#: selection:stock.rule,action:0
msgid "Push To"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model,name:stock_mts_mto_rule.model_stock_rule
msgid "Stock Rule"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_warehouse__mto_mts_management
msgid "Use MTO+MTS rules"
msgstr ""

Expand All @@ -100,5 +114,8 @@ msgstr ""
msgid "Warehouse"
msgstr ""

#~ msgid "Procurement Rule"
#~ msgstr "Pravidlo zadávání zakázek"

#~ msgid "Procurement"
#~ msgstr "Zakázka"
75 changes: 50 additions & 25 deletions stock_mts_mto_rule/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,22 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/stock_warehouse.py:35
#, python-format
msgid "Can't find MTO Rule on the warehouse"
msgstr "Kann MTO-Regel zum Lager nicht finden"
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_rule__action
msgid "Action"
msgstr ""

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/stock_warehouse.py:42
#, python-format
msgid "Can't find MTS Rule on the warehouse"
msgstr "Kann MTS-Regel zum Lager nicht finden"
#: selection:stock.rule,action:0
msgid "Buy"
msgstr ""

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/stock_warehouse.py:31
#, python-format
msgid "Can't find any generic MTS+MTO route."
msgstr "Kann keine allg. MTO- oder MTS-Route finden"
#: selection:stock.rule,action:0
msgid "Choose between MTS and MTO"
msgstr "Wähle aus MTO und MTS"

#. module: stock_mts_mto_rule
#: model:ir.model.fields,help:stock_mts_mto_rule.field_stock_warehouse_mto_mts_management
#: model:ir.model.fields,help:stock_mts_mto_rule.field_stock_warehouse__mto_mts_management
msgid ""
"If this new route is selected on product form view, a purchase order will be "
"created only if the virtual stock is less than 0 else, the product will be "
Expand All @@ -48,52 +45,71 @@ msgstr ""
"anderenfalls wird das Produkt aus dem Bestand genommen."

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/procurement_rule.py:27
#: code:addons/stock_mts_mto_rule/models/stock_rule.py:28
#, python-format
msgid ""
"Inconsistency between the source locations of the mts and mto rules linked "
"to the procurement rule: %s! It should be the same."
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_procurement_rule_mto_rule_id
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_rule__mto_rule_id
msgid "MTO Rule"
msgstr "MTO-Regel"

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_warehouse_mts_mto_rule_id
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_warehouse__mts_mto_rule_id
msgid "MTO+MTS rule"
msgstr "MTO+MTS-Regel"

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_procurement_rule_mts_rule_id
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_rule__mts_rule_id
msgid "MTS Rule"
msgstr "MTS-Regel"

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/stock_warehouse.py:118
#: code:addons/stock_mts_mto_rule/models/stock_warehouse.py:36
#, python-format
msgid "MTS+MTO"
msgstr "MTS+MTO"

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/models/stock_warehouse.py:57
#: model:stock.location.route,name:stock_mts_mto_rule.route_mto_mts
#, python-format
msgid "Make To Order + Make To Stock"
msgstr "MTO Auftragsfertigung + MTS Lagerfertigung"

#. module: stock_mts_mto_rule
#: code:addons/stock_mts_mto_rule/model/procurement_rule.py:22
#: code:addons/stock_mts_mto_rule/models/stock_rule.py:23
#, python-format
msgid "No MTS or MTO rule configured on procurement rule: %s!"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model,name:stock_mts_mto_rule.model_procurement_rule
msgid "Procurement Rule"
msgstr "Beschaffungsregel"
#: selection:stock.rule,action:0
msgid "Pull & Push"
msgstr ""

#. module: stock_mts_mto_rule
#: selection:stock.rule,action:0
msgid "Pull From"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_warehouse_mto_mts_management
#: selection:stock.rule,action:0
msgid "Push To"
msgstr ""

#. module: stock_mts_mto_rule
#: model:ir.model,name:stock_mts_mto_rule.model_stock_rule
#, fuzzy
#| msgid "MTS Rule"
msgid "Stock Rule"
msgstr "MTS-Regel"

#. module: stock_mts_mto_rule
#: model:ir.model.fields,field_description:stock_mts_mto_rule.field_stock_warehouse__mto_mts_management
msgid "Use MTO+MTS rules"
msgstr "Verwende MTO+MTS-Regeln"

Expand All @@ -102,8 +118,17 @@ msgstr "Verwende MTO+MTS-Regeln"
msgid "Warehouse"
msgstr "Lager"

#~ msgid "Choose between MTS and MTO"
#~ msgstr "Wähle aus MTO und MTS"
#~ msgid "Can't find MTO Rule on the warehouse"
#~ msgstr "Kann MTO-Regel zum Lager nicht finden"

#~ msgid "Can't find MTS Rule on the warehouse"
#~ msgstr "Kann MTS-Regel zum Lager nicht finden"

#~ msgid "Can't find any generic MTS+MTO route."
#~ msgstr "Kann keine allg. MTO- oder MTS-Route finden"

#~ msgid "Procurement Rule"
#~ msgstr "Beschaffungsregel"

#~ msgid "Mto+Mts Procurement"
#~ msgstr "MTO+MTS-Beschaffung"
Expand Down
Loading

0 comments on commit a9341e8

Please sign in to comment.