forked from Vauxoo/stock-logistics-warehouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactore creating a new route, a new procurement action and separate…
… procurement rules to handle the mts+mto scenario
- Loading branch information
1 parent
4eddb59
commit fe31fa5
Showing
12 changed files
with
386 additions
and
73 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,62 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:alt: License: AGPL-3 | ||
|
||
Stock MTS+MTO Rule | ||
================== | ||
|
||
This module add a Make To Stock + Make to Order Route. | ||
|
||
If you choose the make to stock + make to order rule instead of the make to | ||
order route, the creation of a purchase order will depend on the virtual stock. | ||
There are 3 cases : | ||
|
||
1. The virtual stock of the product is 0 | ||
=> It will act exactly like the make to order route. | ||
|
||
2. The virtual stock is equal to the quantity ordered | ||
=> It will act exactly like a make to stock route | ||
|
||
3. The virtual stock is more than 0 but less than ordered quantity | ||
=> On part of the products will be taken from stock and a purchase order | ||
will be created for the rest. So it will act like both make to order and | ||
make to stock rule. | ||
|
||
Example : | ||
We have a virtual stock of : 1 product A | ||
A sale Order is made for 3 products A. | ||
2 Procurements will be created : | ||
|
||
1. 1 with a make to stock rule and a quantity of 1 | ||
|
||
2. 1 with a make to order rule and a quantity of 2. | ||
|
||
After validation, a purchase order with 2 products will be created. | ||
|
||
Usage | ||
===== | ||
|
||
You have to choose the mts+mto route on the product form. | ||
You should not choose both mts+mto route and mto route. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Florian da Costa <[email protected]> | ||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: http://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: http://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 http://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 @@ | ||
from . import model |
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,38 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
############################################################################## | ||
# | ||
# OpenERP, Open Source Management Solution | ||
# Copyright (C) 2015 Akretion (<http://www.akretion.com>). | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################## | ||
|
||
{'name': 'Stock MTS+MTO Rule', | ||
'version': '1.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, | ||
} |
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 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<openerp> | ||
<data> | ||
|
||
<!-- | ||
Procurement rules | ||
--> | ||
|
||
<record id="route_mto_mts" model='stock.location.route'> | ||
<field name="name">Make To Order + Make To Stock</field> | ||
<field name="sequence">5</field> | ||
<field name="product_selectable" eval="True"/> | ||
</record> | ||
|
||
|
||
</data> | ||
</openerp> |
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,5 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from . import rule | ||
from . import warehouse | ||
from . import procurement |
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
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
Oops, something went wrong.