forked from OCA/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.
fix OCA#42: reserve location should be outside WH
This has always been wrong on v8, but because of the very obscure odoo/odoo#5797, this seemed to work every time we had single-step reception. Please note that this block of XML is noupdate, so for existing installations you need to change the parent of the reservation location to something outside your warehouses manually. Incidentally, this makes the branch green independently of odoo/odoo#5797.
- Loading branch information
1 parent
74b2b00
commit 478f1ea
Showing
6 changed files
with
72 additions
and
23 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
|
||
{'name': 'Stock Reservation', | ||
'summary': 'Stock reservations on products', | ||
'version': '0.1', | ||
'version': '0.2', | ||
'author': "Camptocamp,Odoo Community Association (OCA)", | ||
'category': 'Warehouse', | ||
'license': 'AGPL-3', | ||
|
@@ -43,11 +43,15 @@ | |
purchase orders will be generated. It also implies that the max may be | ||
exceeded if the reservations are canceled. | ||
If ownership of stock is active in the stock settings, you can specify the | ||
owner on the reservation. | ||
Contributors | ||
------------ | ||
* Guewen Baconnier <[email protected]> | ||
* Yannick Vaucher <[email protected]> | ||
* Leonardo Pistone <[email protected]> | ||
""", | ||
'depends': ['stock', | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# -*- coding: utf-8 -*- | ||
# Author: Leonardo Pistone | ||
# Copyright 2015 Camptocamp SA | ||
# | ||
# 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/>. | ||
|
||
|
||
def migrate(cr, installed_version): | ||
"""Update a wrong location that is no_update in XML.""" | ||
if installed_version == '8.0.0.1': | ||
cr.execute(''' | ||
UPDATE stock_location | ||
SET location_id = ( | ||
SELECT res_id | ||
FROM ir_model_data | ||
WHERE name = 'stock_location_locations' | ||
AND module = 'stock' | ||
) | ||
WHERE id = ( | ||
SELECT res_id | ||
FROM ir_model_data | ||
WHERE name = 'stock_location_reservation' | ||
AND module = 'stock_reserve' | ||
) | ||
AND location_id = ( | ||
SELECT res_id | ||
FROM ir_model_data | ||
WHERE name = 'stock_location_company' | ||
AND module = 'stock' | ||
); | ||
''') |
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
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