diff options
| author | svs-odoo <svs@odoo.com> | 2019-08-23 15:11:11 +0000 |
|---|---|---|
| committer | svs-odoo <svs@odoo.com> | 2020-03-26 11:44:55 +0000 |
| commit | ccb018b9d3c2e7a0d560de4471fecfa6b7b503fa (patch) | |
| tree | 3a6143448635c39d21fe782226d24304e64052f4 /addons/stock | |
| parent | 33950bfdc3cfae91187df4b9f4160f2253f8f125 (diff) | |
[IMP] stock: add quantities in starting inventory
Adds quantities in starting inventory and adds a "Starting Inventory"
for the Chicago Warehouse. The purpose is to avoid to have negative
values in demo data.
Task #1970460
Diffstat (limited to 'addons/stock')
| -rw-r--r-- | addons/stock/data/stock_demo.xml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/addons/stock/data/stock_demo.xml b/addons/stock/data/stock_demo.xml index c799cd1f429..94678cdf3c4 100644 --- a/addons/stock/data/stock_demo.xml +++ b/addons/stock/data/stock_demo.xml @@ -214,6 +214,33 @@ <field name="type">product</field> </record> + <!-- Inventory for Chicago Warehouse --> + <record id="stock_inventory_chic_0" model="stock.inventory"> + <field name="name">Starting Inventory</field> + <field name="company_id" ref="stock.res_company_1"/> + </record> + + <record id="stock_inventory_line_1" 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_chic_0"/> + <field name="product_qty">100.0</field> + <field name="location_id" model="stock.location" + eval="obj().env['stock.location'].search([ + ('company_id', '=', obj().env.ref('stock.res_company_1').id), + ('location_id', '!=', False), + ('child_ids', '=', False), + ], limit=1)" + /> + </record> + + <function model="stock.inventory" name="_action_start"> + <function eval="[[('state','=','draft'),('id', '=', ref('stock_inventory_chic_0'))]]" model="stock.inventory" name="search"/> + </function> + <function model="stock.inventory" name="action_validate"> + <function eval="[[('state','=','confirm'),('id', '=', ref('stock_inventory_chic_0'))]]" model="stock.inventory" name="search"/> + </function> + <!-- Activate Lots options as demo data depends on it --> <record id="base.group_user" model="res.groups"> <field name="implied_ids" eval="[(4, ref('stock.group_production_lot'))]"/> |
