Files
odoo_source/addons/stock/data/stock_demo2.xml
T

431 lines
24 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<function model="ir.model.data" name="_update">
<value>stock.picking.type</value>
<value>stock</value>
<value eval="{}"/>
<value>chi_picking_type_in</value>
<value eval="True"/>
<value eval="True"/>
<value>init</value>
<value model="stock.warehouse" eval="obj().env.ref('stock.stock_warehouse_shop0').in_type_id.id"/>
</function>
<function model="ir.model.data" name="_update">
<value>stock.picking.type</value>
<value>stock</value>
<value eval="{}"/>
<value>chi_picking_type_out</value>
<value eval="True"/>
<value eval="True"/>
<value>init</value>
<value model="stock.warehouse" eval="obj().env.ref('stock.stock_warehouse_shop0').out_type_id.id"/>
</function>
<function model="ir.model.data" name="_update">
<value>stock.location</value>
<value>stock</value>
<value eval="{}"/>
<value>stock_location_shop0</value>
<value eval="True"/>
<value eval="True"/>
<value>init</value>
<value model="stock.warehouse" eval="obj().env.ref('stock.stock_warehouse_shop0').lot_stock_id.id"/>
</function>
<record id="location_refrigerator_small" model="stock.location">
<field name="name">Small Refrigerator</field>
<field name="usage">internal</field>
<field name="location_id" ref="stock.stock_location_14"/>
</record>
<record id="product_icecream" model="product.product">
<field name="default_code">001</field>
<field name="name">Ice Cream</field>
<field name="type">product</field>
<field name="categ_id" ref="product.product_category_1"/>
<field name="lst_price">100.0</field>
<field name="standard_price">70.0</field>
<field name="weight">1.0</field>
<field name="uom_id" ref="uom.product_uom_kgm"/>
<field name="uom_po_id" ref="uom.product_uom_kgm"/>
<field name="property_stock_inventory" ref="stock.location_inventory"/>
<field name="description">
Ice cream can be mass-produced and thus is widely available in developed parts
of the world. Ice cream can be purchased in large cartons (vats and squrounds)
from supermarkets and grocery stores, in smaller quantities from ice cream shops,
convenience stores, and milk bars, and in individual servings from small carts or
vans at public events.
</field>
</record>
<record id="lot_icecream_0" model="stock.production.lot">
<field name="name">0000000000017</field>
<field name="product_id" ref="stock.product_icecream"/>
</record>
<record id="lot_icecream_1" model="stock.production.lot">
<field name="name">0000000000024</field>
<field name="product_id" ref="stock.product_icecream"/>
</record>
<record id="stock_inventory_icecream" model="stock.inventory">
<field name="name">Inventory for icecream</field>
<field name="filter">product</field>
<field name="product_id" ref="stock.product_icecream"/>
</record>
<record id="stock_inventory_line_icecream_lot0" model="stock.inventory.line">
<field name="product_id" ref="stock.product_icecream"/>
<field name="product_uom_id" ref="uom.product_uom_kgm"/>
<field name="inventory_id" ref="stock.stock_inventory_icecream"/>
<field name="product_qty">50.0</field>
<field name="prod_lot_id" ref="stock.lot_icecream_0"/>
<field name="location_id" ref="stock.stock_location_14"/>
</record>
<record id="stock_inventory_line_icecream_lot1" model="stock.inventory.line">
<field name="product_id" ref="stock.product_icecream"/>
<field name="product_uom_id" ref="uom.product_uom_kgm"/>
<field name="inventory_id" ref="stock.stock_inventory_icecream"/>
<field name="product_qty">40.0</field>
<field name="prod_lot_id" ref="stock.lot_icecream_1"/>
<field name="location_id" ref="stock.stock_location_14"/>
</record>
<!-- Create STOCK_MOVE for OUT -->
<record id="outgoing_shipment_main_warehouse" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_out"/>
<field name="origin">outgoing shipment main_warehouse</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_customers"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_27').name,
'product_id': ref('product.product_product_27'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 15.0,
'picking_type_id': ref('stock.picking_type_out'),
'location_id': ref('stock.stock_location_stock'),
'location_dest_id': ref('stock.stock_location_customers'),
})]"/>
</record>
<record id="outgoing_shipment_main_warehouse1" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_out"/>
<field name="origin">outgoing shipment</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="date" eval="'%s-%s-15' %((datetime.now()-timedelta(days=60)).year, (datetime.now()-timedelta(days=60)).month)"/>
<field name="location_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_customers"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_6').name,
'product_id': ref('product.product_product_6'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 180.0,
'picking_type_id': ref('stock.picking_type_out'),
'location_id': ref('stock.stock_location_stock'),
'location_dest_id': ref('stock.stock_location_customers'),
'move_line_ids': [(0, 0, {
'product_id': ref('product.product_product_6'),
'qty_done': 100,
'product_uom_id': ref('uom.product_uom_unit'),
'location_id': ref('stock.stock_location_stock'),
'location_dest_id': ref('stock.stock_location_customers'),
})],
})]"/>
</record>
<record id="outgoing_shipment_main_warehouse2" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_out"/>
<field name="origin">outgoing shipment your_company warehouse</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="date" eval="'%s-%s-15' % ((datetime.now()-timedelta(days=30)).month,(datetime.now()-timedelta(days=30)).month)"/>
<field name="location_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_customers"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_delivery_02').name,
'product_id': ref('product.product_delivery_02'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 45.0,
'picking_type_id': ref('stock.picking_type_out'),
'location_id': ref('stock.stock_location_stock'),
'location_dest_id': ref('stock.stock_location_customers'),
})]"/>
</record>
<record id="outgoing_shipment_main_warehouse3" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_out"/>
<field name="origin">your company warehouse</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_stock"/>
<field name="location_dest_id" ref="stock.stock_location_customers"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_5').name,
'product_id': ref('product.product_product_5'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 75.0,
'picking_type_id': ref('stock.picking_type_out'),
'location_id': ref('stock.stock_location_stock'),
'location_dest_id': ref('stock.stock_location_customers'),
})]"/>
</record>
<!-- Create STOCK_PICKING for IN -->
<record id="incomming_shipment" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_in"/>
<field name="location_id" ref="stock.stock_location_suppliers"/>
<field name="location_dest_id" ref="stock.stock_location_stock"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('stock.product_icecream').name,
'product_id': ref('stock.product_icecream'),
'product_uom': ref('uom.product_uom_kgm'),
'product_uom_qty': 50.0,
'picking_type_id': ref('stock.picking_type_in'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_stock'),
})]"/>
</record>
<record id="incomming_shipment1" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_in"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_suppliers"/>
<field name="location_dest_id" ref="stock.stock_location_stock"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_delivery_01').name,
'product_id': ref('product.product_delivery_01'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 35.0,
'picking_type_id': ref('stock.picking_type_in'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_stock'),
})]"/>
</record>
<record id="incomming_shipment2" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_in"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_suppliers"/>
<field name="location_dest_id" ref="stock.stock_location_stock"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_22').name,
'product_id': ref('product.product_product_22'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 125.0,
'picking_type_id': ref('stock.picking_type_in'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_stock'),
})]"/>
</record>
<record id="incomming_shipment3" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_in"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_suppliers"/>
<field name="location_dest_id" ref="stock.stock_location_stock"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_10').name,
'product_id': ref('product.product_product_10'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 120.0,
'picking_type_id': ref('stock.picking_type_in'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_stock'),
})]"/>
</record>
<record id="incomming_shipment4" model="stock.picking">
<field name="picking_type_id" ref="stock.picking_type_in"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_suppliers"/>
<field name="location_dest_id" ref="stock.stock_location_stock"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_delivery_02').name,
'product_id': ref('product.product_delivery_02'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 50.0,
'picking_type_id': ref('stock.picking_type_in'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_stock'),
})]"/>
</record>
<!-- Create STOCK_PICKING_IN for Chicago Warehouse -->
<record id="incomming_chicago_warehouse" model="stock.picking">
<field name="picking_type_id" ref="stock.chi_picking_type_in"/>
<field name="origin">incoming_chicago_warehouse</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_suppliers"/>
<field name="location_dest_id" ref="stock.stock_location_shop0"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_9').name,
'product_id': ref('product.product_product_9'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 25.0,
'picking_type_id': ref('stock.chi_picking_type_in'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_shop0'),
})]"/>
</record>
<record id="incomming_chicago_warehouse1" model="stock.picking">
<field name="picking_type_id" ref="stock.chi_picking_type_in"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_suppliers"/>
<field name="location_dest_id" ref="stock.stock_location_shop0"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_delivery_01').name,
'product_id': ref('product.product_delivery_01'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 180.0,
'picking_type_id': ref('stock.chi_picking_type_in'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_shop0'),
'move_line_ids': [(0, 0, {
'product_id': ref('product.product_delivery_01'),
'qty_done': 100,
'product_uom_id': ref('uom.product_uom_unit'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_shop0'),
})],
})]"/>
</record>
<record id="incomming_chicago_warehouse2" model="stock.picking">
<field name="picking_type_id" ref="stock.chi_picking_type_in"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_suppliers"/>
<field name="location_dest_id" ref="stock.stock_location_shop0"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_delivery_01').name,
'product_id': ref('product.product_delivery_01'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 45.0,
'picking_type_id': ref('stock.chi_picking_type_in'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_shop0'),
})]"/>
</record>
<record id="incomming_chicago_warehouse3" model="stock.picking">
<field name="picking_type_id" ref="stock.chi_picking_type_in"/>
<field name="origin">chicago_warehouse</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="date" eval="'%s-%s-2' % ((datetime.now()-timedelta(days=30)).month,(datetime.now()-timedelta(days=30)).month)"/>
<field name="location_id" ref="stock.stock_location_suppliers"/>
<field name="location_dest_id" ref="stock.stock_location_shop0"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_22').name,
'product_id': ref('product.product_product_22'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 75.0,
'picking_type_id': ref('stock.chi_picking_type_in'),
'location_id': ref('stock.stock_location_suppliers'),
'location_dest_id': ref('stock.stock_location_shop0'),
})]"/>
</record>
<!-- Create STOCK_PICKING_OUT for Chicago Warehouse -->
<record id="outgoing_chicago_warehouse" model="stock.picking">
<field name="picking_type_id" ref="stock.chi_picking_type_out"/>
<field name="origin">outgoing_chicago_warehouse</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="date" eval="'%s-%s-2' % ((datetime.now()-timedelta(days=30)).month,(datetime.now()-timedelta(days=30)).month)"/>
<field name="location_id" ref="stock.stock_location_shop0"/>
<field name="location_dest_id" ref="stock.stock_location_customers"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_27').name,
'product_id': ref('product.product_product_27'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 15.0,
'picking_type_id': ref('stock.chi_picking_type_out'),
'location_id': ref('stock.stock_location_shop0'),
'location_dest_id': ref('stock.stock_location_customers'),
})]"/>
</record>
<record id="outgoing_chicago_warehouse1" model="stock.picking">
<field name="picking_type_id" ref="stock.chi_picking_type_out"/>
<field name="origin">outgoing_shipment_chicago_warehouse</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="date" eval="'%s-%s-2' % ((datetime.now()-timedelta(days=30)).month,(datetime.now()-timedelta(days=30)).month)"/>
<field name="location_id" ref="stock.stock_location_shop0"/>
<field name="location_dest_id" ref="stock.stock_location_customers"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_6').name,
'product_id': ref('product.product_product_6'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 180.0,
'picking_type_id': ref('stock.chi_picking_type_out'),
'location_id': ref('stock.stock_location_shop0'),
'location_dest_id': ref('stock.stock_location_customers'),
'move_line_ids': [(0, 0, {
'product_id': ref('product.product_product_6'),
'qty_done': 100,
'product_uom_id': ref('uom.product_uom_unit'),
'location_id': ref('stock.stock_location_shop0'),
'location_dest_id': ref('stock.stock_location_customers'),
})],
})]"/>
</record>
<record id="outgoing_chicago_warehouse2" model="stock.picking">
<field name="picking_type_id" ref="stock.chi_picking_type_out"/>
<field name="origin">chicago_warehouse</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="date" eval="'%s-%s-2' % ((datetime.now()-timedelta(days=30)).month,(datetime.now()-timedelta(days=30)).month)"/>
<field name="location_id" ref="stock.stock_location_shop0"/>
<field name="location_dest_id" ref="stock.stock_location_customers"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_delivery_02').name,
'product_id': ref('product.product_delivery_02'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 45.0,
'picking_type_id': ref('stock.chi_picking_type_out'),
'location_id': ref('stock.stock_location_shop0'),
'location_dest_id': ref('stock.stock_location_customers'),
})]"/>
</record>
<record id="outgoing_chicago_warehouse3" model="stock.picking">
<field name="picking_type_id" ref="stock.chi_picking_type_out"/>
<field name="origin">outgoing chicago warehouse</field>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="location_id" ref="stock.stock_location_shop0"/>
<field name="location_dest_id" ref="stock.stock_location_customers"/>
<field name="move_lines" model="stock.move" eval="[(0, 0, {
'name': obj().env.ref('product.product_product_5').name,
'product_id': ref('product.product_product_5'),
'product_uom': ref('uom.product_uom_unit'),
'product_uom_qty': 75.0,
'picking_type_id': ref('stock.chi_picking_type_out'),
'location_id': ref('stock.stock_location_shop0'),
'location_dest_id': ref('stock.stock_location_customers'),
})]"/>
</record>
<function model="stock.picking" name="action_confirm">
<value model="stock.picking" eval="[
obj().env.ref('stock.outgoing_shipment_main_warehouse').id,
obj().env.ref('stock.outgoing_shipment_main_warehouse1').id,
obj().env.ref('stock.incomming_shipment2').id,
obj().env.ref('stock.incomming_shipment1').id,
obj().env.ref('stock.incomming_shipment3').id,
obj().env.ref('stock.outgoing_chicago_warehouse3').id,
obj().env.ref('stock.outgoing_chicago_warehouse2').id,
obj().env.ref('stock.outgoing_chicago_warehouse1').id,
obj().env.ref('stock.incomming_chicago_warehouse1').id,
obj().env.ref('stock.incomming_chicago_warehouse2').id,
obj().env.ref('stock.incomming_chicago_warehouse3').id]"/>
</function>
<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.incomming_chicago_warehouse1').id,
obj().env.ref('stock.outgoing_chicago_warehouse1').id]"/>
</function>
</data>
</odoo>