[FIX] stock: don't validate WH/OUT/0005

Before this commit the demo delivery WH/OUT/0005 is plan then validated.
But as this delivery is the one used as example in the barcode PDF, it
could be usefull for demonstration to keep it as to process.
So, this commit keeps it only as ready, and also increases the stock
amount of Desk Combination to be able to process this delivery without
any issue.

task-2199747

closes odoo/odoo#48320

X-original-commit: 652ee46e8adc35bae4f89bf9802f12bd1c424c8d
Related: odoo/enterprise#9474
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
svs-odoo
2020-03-25 10:26:38 +00:00
parent 4cb21e1a95
commit e729af8dd9
3 changed files with 17 additions and 11 deletions
+7
View File
@@ -121,6 +121,13 @@
<field name="product_qty">80.0</field>
<field name="location_id" ref="stock_location_components"/>
</record>
<record id="stock_inventory_line_14" model="stock.inventory.line">
<field name="product_id" ref="product.product_product_3"/>
<field name="product_uom_id" ref="uom.product_uom_unit"/>
<field name="inventory_id" ref="stock_inventory_0"/>
<field name="product_qty">60.0</field>
<field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/>
</record>
<function model="stock.inventory" name="_action_start">
<function eval="[[('state','=','draft'),('id', '=', ref('stock_inventory_0'))]]" model="stock.inventory" name="search"/>
+1 -6
View File
@@ -522,7 +522,6 @@
<function model="stock.picking" name="_action_done">
<value model="stock.picking" eval="[
obj().env.ref('stock.outgoing_shipment_main_warehouse1').id,
obj().env.ref('stock.outgoing_shipment_main_warehouse4').id,
obj().env.ref('stock.outgoing_shipment_main_warehouse5').id,
obj().env.ref('stock.outgoing_shipment_main_warehouse6').id,
obj().env.ref('stock.incomming_chicago_warehouse1').id,
@@ -534,10 +533,6 @@
<field name="date_done" eval="DateTime.today() - timedelta(days=5)"/>
</record>
<record id="stock.outgoing_shipment_main_warehouse4" model="stock.picking">
<field name="date_done" eval="DateTime.today() - timedelta(days=24)"/>
</record>
<record id="stock.outgoing_shipment_main_warehouse5" model="stock.picking">
<field name="date_done" eval="DateTime.today() - timedelta(days=17)"/>
</record>
@@ -548,7 +543,7 @@
<function model="stock.move" name="write">
<value model="stock.move" search="[('picking_id', '=', ref('stock.outgoing_shipment_main_warehouse4'))]"/>
<value eval="{'date_expected': DateTime.today() - timedelta(days=26)}"/>
<value eval="{'date_expected': DateTime.today() + timedelta(days=3)}"/>
</function>
<function model="stock.move" name="write">
+9 -5
View File
@@ -71,19 +71,23 @@ class TestRobustness(SavepointCase):
consistent with the `reserved_quantity` on the quants.
"""
# change stock usage
self.stock_location.scrap_location = True
test_stock_location = self.env['stock.location'].create({
'name': "Test Location",
'location_id': self.stock_location.id,
})
test_stock_location.scrap_location = True
# make some stock
self.env['stock.quant']._update_available_quantity(
self.product1,
self.stock_location,
test_stock_location,
1,
)
# reserve a unit
move1 = self.env['stock.move'].create({
'name': 'test_location_archive',
'location_id': self.stock_location.id,
'location_id': test_stock_location.id,
'location_dest_id': self.customer_location.id,
'product_id': self.product1.id,
'product_uom': self.uom_unit.id,
@@ -94,7 +98,7 @@ class TestRobustness(SavepointCase):
self.assertEqual(move1.state, 'assigned')
quant = self.env['stock.quant']._gather(
self.product1,
self.stock_location,
test_stock_location,
)
# assert the reservation
@@ -104,7 +108,7 @@ class TestRobustness(SavepointCase):
# change the stock usage
with self.assertRaises(UserError):
with self.cr.savepoint():
self.stock_location.scrap_location = False
test_stock_location.scrap_location = False
# unreserve
move1._do_unreserve()