[FIX] stock: prevent creating inventories for virtual locations

It makes no sense to allow inventories in supplier locations as it won't anyway
reduce the Inventory if we want to downsize the inventory. This makes
the Inventory act weird.

Ex:
1. Initial situation: 20 units of stock A at supplier's location
2. Makes an inventory stating there is in fact 0 qty of product A at that
location (in the hope to remove some quants).
3. Still 20 units in Suppliers location + 20 units in Inventory loss...

Managing specific suppliers destination is currently not supported.
Same issue with production locations.
Fixes #5052
This commit is contained in:
Antoine Huvelle
2015-02-04 10:42:06 +01:00
committed by Martin Trigaux
parent 35b3836276
commit 6779166454
+1 -1
View File
@@ -101,7 +101,7 @@
</div>
<group>
<group>
<field name="location_id"/>
<field name="location_id" domain="[('usage','not in', ['supplier','production'])]"/>
<field name="filter" string="Inventory of" widget='radio' attrs="{'readonly': [('state', '!=', 'draft')]}"/>
</group>
<group>