diff options
| author | svs-odoo <svs@odoo.com> | 2019-08-22 09:18:48 +0000 |
|---|---|---|
| committer | svs-odoo <svs@odoo.com> | 2020-03-26 11:27:45 +0000 |
| commit | a05b21d74bde2b242e6d85f2d1ecf3e3638fde20 (patch) | |
| tree | b738115bed8bf53e0df792e55b9b21b938a25cf7 | |
| parent | f476120948d8c6c34fd7bcb7abde208e998201e5 (diff) | |
[IMP] *: remove sublocation for demodata
Demo data product's quantities are no more put in sublocation as by
default, multilocation aren't active.
Also, adapts `test_location_usage` because as we moved quantities from
sublocations to the main stock location, the stock warehouse will have
reserved quantity due to a backorder created by demo data.
In this test, we try to change location as a scrap location, what we
can't do if this location has some reserved quantities.
Task #1970460
| -rw-r--r-- | addons/mrp/data/mrp_demo.xml | 16 | ||||
| -rw-r--r-- | addons/sale_stock/data/sale_order_demo.xml | 4 | ||||
| -rw-r--r-- | addons/stock/data/stock_demo.xml | 30 |
3 files changed, 25 insertions, 25 deletions
diff --git a/addons/mrp/data/mrp_demo.xml b/addons/mrp/data/mrp_demo.xml index 6779bd97b66..d1ae2d9ffdc 100644 --- a/addons/mrp/data/mrp_demo.xml +++ b/addons/mrp/data/mrp_demo.xml @@ -511,14 +511,14 @@ <field name="inventory_id" ref="stock_inventory_drawer"/> <field name="product_qty">50</field> <field name="prod_lot_id" ref="lot_product_27_0"/> - <field name="location_id" ref="stock.stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_drawer_lot1" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_27"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_drawer"/> <field name="product_qty">40</field> - <field name="location_id" ref="stock.stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_product_drawer_drawer" model="stock.inventory.line"> <field name="product_id" ref="product_product_drawer_drawer"/> @@ -526,7 +526,7 @@ <field name="inventory_id" ref="stock_inventory_drawer"/> <field name="product_qty">50</field> <field name="prod_lot_id" ref="lot_product_product_drawer_drawer_0"/> - <field name="location_id" ref="stock.stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_product_drawer_case" model="stock.inventory.line"> <field name="product_id" ref="product_product_drawer_case"/> @@ -534,7 +534,7 @@ <field name="inventory_id" ref="stock_inventory_drawer"/> <field name="product_qty">50</field> <field name="prod_lot_id" ref="lot_product_product_drawer_case_0"/> - <field name="location_id" ref="stock.stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_product_wood_panel" model="stock.inventory.line"> @@ -542,28 +542,28 @@ <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_drawer"/> <field name="product_qty">50</field> - <field name="location_id" ref="stock.stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_product_ply" model="stock.inventory.line"> <field name="product_id" ref="product_product_wood_ply"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_drawer"/> <field name="product_qty">20</field> - <field name="location_id" ref="stock.stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_product_wear" model="stock.inventory.line"> <field name="product_id" ref="product_product_wood_wear"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_drawer"/> <field name="product_qty">30</field> - <field name="location_id" ref="stock.stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_product_table_kit" model="stock.inventory.line"> <field name="product_id" ref="product_product_table_kit"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_drawer"/> <field name="product_qty">30</field> - <field name="location_id" ref="stock.stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <function model="stock.inventory" name="_action_done"> diff --git a/addons/sale_stock/data/sale_order_demo.xml b/addons/sale_stock/data/sale_order_demo.xml index 6db1b10b172..98f75556797 100644 --- a/addons/sale_stock/data/sale_order_demo.xml +++ b/addons/sale_stock/data/sale_order_demo.xml @@ -35,14 +35,14 @@ <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_customizable_desk_update"/> <field name="product_qty">65.0</field> - <field name="location_id" ref="stock.stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_7f" model="stock.inventory.line"> <field name="product_id" ref="sale.product_product_4f"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_customizable_desk_update"/> <field name="product_qty">70.0</field> - <field name="location_id" ref="stock.stock_location_components"/> + <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"> diff --git a/addons/stock/data/stock_demo.xml b/addons/stock/data/stock_demo.xml index 1ce80de5fa3..aff0e10fbb8 100644 --- a/addons/stock/data/stock_demo.xml +++ b/addons/stock/data/stock_demo.xml @@ -21,105 +21,105 @@ <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">16.0</field> - <field name="location_id" ref="stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_14" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_25"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">16.0</field> - <field name="location_id" ref="stock_location_14"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_2" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_7"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">18.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_3" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_6"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">500.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_4" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_9"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">22.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_5" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_10"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">8.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_6" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_11"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">26.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_6b" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_11b"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">30.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_7" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_4"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">45.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_7b" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_4b"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">50.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_7c" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_4c"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">55.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_7d" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_4d"/> <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" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_11" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_12"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">10.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_12" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_13"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">2.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_13" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_27"/> <field name="product_uom_id" ref="uom.product_uom_unit"/> <field name="inventory_id" ref="stock_inventory_0"/> <field name="product_qty">80.0</field> - <field name="location_id" ref="stock_location_components"/> + <field name="location_id" model="stock.location" eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> </record> <record id="stock_inventory_line_14" model="stock.inventory.line"> <field name="product_id" ref="product.product_product_3"/> |
