diff options
Diffstat (limited to 'addons/stock/data')
| -rw-r--r-- | addons/stock/data/default_barcode_patterns.xml | 40 | ||||
| -rw-r--r-- | addons/stock/data/digest_data.xml | 24 | ||||
| -rw-r--r-- | addons/stock/data/mail_template_data.xml | 46 | ||||
| -rw-r--r-- | addons/stock/data/procurement_data.xml | 15 | ||||
| -rw-r--r-- | addons/stock/data/procurement_demo.xml | 83 | ||||
| -rw-r--r-- | addons/stock/data/stock_data.xml | 148 | ||||
| -rw-r--r-- | addons/stock/data/stock_demo.xml | 249 | ||||
| -rw-r--r-- | addons/stock/data/stock_demo2.xml | 554 | ||||
| -rw-r--r-- | addons/stock/data/stock_demo_pre.xml | 19 | ||||
| -rw-r--r-- | addons/stock/data/stock_location_demo_cpu1.xml | 14 | ||||
| -rw-r--r-- | addons/stock/data/stock_location_demo_cpu3.xml | 27 | ||||
| -rw-r--r-- | addons/stock/data/stock_orderpoint_demo.xml | 35 | ||||
| -rw-r--r-- | addons/stock/data/stock_sequence_data.xml | 72 | ||||
| -rw-r--r-- | addons/stock/data/stock_traceability_report_data.xml | 10 |
14 files changed, 1336 insertions, 0 deletions
diff --git a/addons/stock/data/default_barcode_patterns.xml b/addons/stock/data/default_barcode_patterns.xml new file mode 100644 index 00000000..fdb182df --- /dev/null +++ b/addons/stock/data/default_barcode_patterns.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + <record id="barcode_rule_weight_three_dec" model="barcode.rule"> + <field name="name">Weight Barcodes 3 Decimals</field> + <field name="barcode_nomenclature_id" ref="barcodes.default_barcode_nomenclature"/> + <field name="sequence">36</field> + <field name="type">weight</field> + <field name="encoding">ean13</field> + <field name="pattern">21.....{NNDDD}</field> + </record> + + <record id="barcode_rule_package" model="barcode.rule"> + <field name="name">Package barcodes</field> + <field name="barcode_nomenclature_id" ref="barcodes.default_barcode_nomenclature"/> + <field name="sequence">70</field> + <field name="type">package</field> + <field name="encoding">any</field> + <field name="pattern">PACK</field> + </record> + + <record id="barcode_rule_lot" model="barcode.rule"> + <field name="name">Lot barcodes</field> + <field name="barcode_nomenclature_id" ref="barcodes.default_barcode_nomenclature"/> + <field name="sequence">80</field> + <field name="type">lot</field> + <field name="encoding">any</field> + <field name="pattern">10</field> + </record> + + <record id="barcode_rule_location" model="barcode.rule"> + <field name="name">Location barcodes</field> + <field name="barcode_nomenclature_id" ref="barcodes.default_barcode_nomenclature"/> + <field name="sequence">60</field> + <field name="type">location</field> + <field name="encoding">any</field> + <field name="pattern">414</field> + </record> + </data> +</odoo> diff --git a/addons/stock/data/digest_data.xml b/addons/stock/data/digest_data.xml new file mode 100644 index 00000000..6c7c2aca --- /dev/null +++ b/addons/stock/data/digest_data.xml @@ -0,0 +1,24 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo> + <data> + <record id="digest_tip_stock_0" model="digest.tip"> + <field name="name">Tip: Speed up inventory operations with barcodes</field> + <field name="sequence">1000</field> + <field name="group_id" ref="stock.group_stock_user" /> + <field name="tip_description" type="html"> +<div> + <p class="tip_title">Tip: Speed up inventory operations with barcodes</p> + <div class="tip_twocol"> + <div class="tip_twocol_left" style="float: left; width: 45%;"> + <img src="/stock/static/src/img/barcode.gif" class="tip_twocol_img" /> + </div> + <div style="float: left; width: 55%;"> + <p class="tip_content" style="margin: 0;">Enjoy a quick-paced experience with the Odoo barcode app. It is blazing fast and works even without a stable internet connection. It supports all flows: inventory adjustments, batch picking, moving lots or pallets, low inventory checks, etc. Go to the "Apps" menu to activate the barcode interface.</p> + </div> + </div> + <div style="clear: both;" /> +</div> + </field> + </record> + </data> +</odoo> diff --git a/addons/stock/data/mail_template_data.xml b/addons/stock/data/mail_template_data.xml new file mode 100644 index 00000000..7d21e99c --- /dev/null +++ b/addons/stock/data/mail_template_data.xml @@ -0,0 +1,46 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo><data noupdate="1"> + <record id="mail_template_data_delivery_confirmation" model="mail.template"> + <field name="name">Delivery: Send by Email</field> + <field name="model_id" ref="model_stock_picking"/> + <field name="subject">${object.company_id.name} Delivery Order (Ref ${object.name or 'n/a' })</field> + <field name="partner_to">${object.partner_id.id}</field> + <field name="body_html" type="html"> +<div style="margin: 0px; padding: 0px;"> + <p style="margin: 0px; padding: 0px; font-size: 13px;"> + Hello ${object.partner_id.name},<br/><br/> + We are glad to inform you that your order has been shipped. + %if object.carrier_tracking_ref: + Your tracking reference is + <strong> + %if object.carrier_tracking_url: + % set multiple_carrier_tracking = object.get_multiple_carrier_tracking() + %if multiple_carrier_tracking: + % for line in multiple_carrier_tracking: + <br/><a href="${line[1]}" target="_blank">${line[0]}</a> + % endfor + %else: + <a href="${object.carrier_tracking_url}" target="_blank">${object.carrier_tracking_ref}</a>. + %endif + %else: + ${object.carrier_tracking_ref}. + %endif + </strong> + %endif + <br/><br/> + Please find your delivery order attached for more details.<br/><br/> + Thank you, + % if user.signature: + <br /> + ${user.signature | safe} + % endif + </p> +</div> + </field> + <field name="report_template" ref="stock.action_report_delivery"/> + <field name="report_name">${(object.name or '').replace('/','_')}</field> + <field name="lang">${object.partner_id.lang}</field> + <field name="auto_delete" eval="True"/> + </record> +</data> +</odoo> diff --git a/addons/stock/data/procurement_data.xml b/addons/stock/data/procurement_data.xml new file mode 100644 index 00000000..0c541c5a --- /dev/null +++ b/addons/stock/data/procurement_data.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + + <record id="sequence_proc_group" model="ir.sequence"> + <field name="name">Procurement Group</field> + <field name="code">procurement.group</field> + <field name="prefix">PG/</field> + <field name="padding">6</field> + <field name="number_next">1</field> + <field name="number_increment">1</field> + </record> + + </data> +</odoo> diff --git a/addons/stock/data/procurement_demo.xml b/addons/stock/data/procurement_demo.xml new file mode 100644 index 00000000..a12def4f --- /dev/null +++ b/addons/stock/data/procurement_demo.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + <record id="product.product_product_3" model="product.product"> + <field name="type">product</field> + + </record> + + <record id="product.product_product_4" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_5" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_6" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_7" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_8" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_9" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_10" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_11" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_12" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_13" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_16" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_20" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_22" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_24" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_25" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_product_27" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_delivery_02" model="product.product"> + <field name="type">product</field> + </record> + + <record id="product.product_delivery_01" model="product.product"> + <field name="type">product</field> + </record> + + </data> +</odoo> + diff --git a/addons/stock/data/stock_data.xml b/addons/stock/data/stock_data.xml new file mode 100644 index 00000000..0cd37234 --- /dev/null +++ b/addons/stock/data/stock_data.xml @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <record id="removal_fifo" model="product.removal"> + <field name="name">First In First Out (FIFO)</field> + <field name="method">fifo</field> + </record> + <record id="removal_lifo" model="product.removal"> + <field name="name">Last In First Out (LIFO)</field> + <field name="method">lifo</field> + </record> + + <!-- + Resource: stock.location + --> + </data> + <data noupdate="1"> + <record id="stock_location_locations" model="stock.location"> + <field name="name">Physical Locations</field> + <field name="usage">view</field> + <field name="company_id"></field> + </record> + <record id="stock_location_locations_partner" model="stock.location"> + <field name="name">Partner Locations</field> + <field name="usage">view</field> + <field name="posz">1</field> + <field name="company_id"></field> + </record> + <record id="stock_location_locations_virtual" model="stock.location"> + <field name="name">Virtual Locations</field> + <field name="usage">view</field> + <field name="posz">1</field> + <field name="company_id"></field> + </record> + + <record id="stock_location_suppliers" model="stock.location"> + <field name="name">Vendors</field> + <field name="location_id" ref="stock_location_locations_partner"/> + <field name="usage">supplier</field> + <field name="company_id"></field> + </record> + <record id="stock_location_customers" model="stock.location"> + <field name="name">Customers</field> + <field name="location_id" ref="stock_location_locations_partner"/> + <field name="usage">customer</field> + <field name="company_id"></field> + </record> + + <record id="stock_location_inter_wh" model="stock.location"> + <field name="name">Inter-company transit</field> + <field name="location_id" ref="stock_location_locations_virtual"/> + <field name="usage">transit</field> + <field name="company_id"></field> + <field name="active" eval="False"/> + </record> + + </data> + <data noupdate="1"> + <!-- + Stock rules + --> + + <!-- set a lower sequence on the mto route than on the resupply routes --> + <record id="route_warehouse0_mto" model='stock.location.route'> + <field name="name">Replenish on Order (MTO)</field> + <field name="company_id"></field> + <field name="active">False</field> + <field name="sequence">5</field> + </record> + + <!-- + Properties + --> + <record forcecreate="True" id="property_stock_supplier" model="ir.property"> + <field name="name">property_stock_supplier</field> + <field name="fields_id" search="[('model','=','res.partner'),('name','=','property_stock_supplier')]"/> + <field eval="'stock.location,'+str(stock_location_suppliers)" name="value"/> + </record> + <record forcecreate="True" id="property_stock_customer" model="ir.property"> + <field name="name">property_stock_customer</field> + <field name="fields_id" search="[('model','=','res.partner'),('name','=','property_stock_customer')]"/> + <field eval="'stock.location,'+str(stock_location_customers)" name="value"/> + </record> + + + <!-- + Resource: stock.warehouse + --> + + <record id="warehouse0" model="stock.warehouse"> + <field name="partner_id" ref="base.main_partner"/> + <field name="name">San Francisco</field> + <field name="code">WH</field> + </record> + + <record id="sequence_mrp_op" model="ir.sequence"> + <field name="name">Stock orderpoint</field> + <field name="code">stock.orderpoint</field> + <field name="prefix">OP/</field> + <field name="padding">5</field> + <field name="number_next">1</field> + <field name="number_increment">1</field> + <field name="company_id"></field> + </record> + + <!-- create xml ids for demo data that are widely used in tests or in other codes, for more convenience --> + <function model="ir.model.data" name="_update_xmlids"> + <value model="base" eval="[{ + 'xml_id': 'stock.stock_location_stock', + 'record': obj().env.ref('stock.warehouse0').lot_stock_id, + 'noupdate': True, + }, { + 'xml_id': 'stock.stock_location_company', + 'record': obj().env.ref('stock.warehouse0').wh_input_stock_loc_id, + 'noupdate': True, + }, { + 'xml_id': 'stock.stock_location_output', + 'record': obj().env.ref('stock.warehouse0').wh_output_stock_loc_id, + 'noupdate': True, + }, { + 'xml_id': 'stock.location_pack_zone', + 'record': obj().env.ref('stock.warehouse0').wh_pack_stock_loc_id, + 'noupdate': True, + }, { + 'xml_id': 'stock.picking_type_internal', + 'record': obj().env.ref('stock.warehouse0').int_type_id, + 'noupdate': True, + }, { + 'xml_id': 'stock.picking_type_in', + 'record': obj().env.ref('stock.warehouse0').in_type_id, + 'noupdate': True, + }, { + 'xml_id': 'stock.picking_type_out', + 'record': obj().env.ref('stock.warehouse0').out_type_id, + 'noupdate': True, + }]"/> + </function> + + <!-- create the transit location for each company existing --> + <function model="res.company" name="create_missing_transit_location"/> + <function model="res.company" name="create_missing_warehouse"/> + <function model="res.company" name="create_missing_inventory_loss_location"/> + <function model="res.company" name="create_missing_production_location"/> + <function model="res.company" name="create_missing_scrap_location"/> + <function model="res.company" name="create_missing_scrap_sequence"/> + </data> +</odoo> diff --git a/addons/stock/data/stock_demo.xml b/addons/stock/data/stock_demo.xml new file mode 100644 index 00000000..962f89d9 --- /dev/null +++ b/addons/stock/data/stock_demo.xml @@ -0,0 +1,249 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + + <record id="base.user_demo" model="res.users"> + <field eval="[(4, ref('group_stock_user'))]" name="groups_id"/> + </record> + <record id="lot_product_27" model="stock.production.lot"> + <field name="name">0000000000029</field> + <field name="product_id" ref="product.product_product_27"/> + <field name="company_id" ref="base.main_company"/> + </record> + + + <!-- Resource: stock.inventory --> + + <record id="stock_inventory_0" model="stock.inventory"> + <field name="name">Starting Inventory</field> + </record> + + + <!-- Resource: stock.inventory.line --> + + <record id="stock_inventory_line_1" model="stock.inventory.line"> + <field name="product_id" ref="product.product_product_24"/> + <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" 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" 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" 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" 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">33.0</field> + <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" 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" 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" 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" 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" 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" 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" 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" 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="prod_lot_id" ref="lot_product_27"/> + <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"/> + <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> + <record id="stock_inventory_line_15" 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" 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"/> + </function> + <function model="stock.inventory" name="action_validate"> + <function eval="[[('state','=','confirm'),('id', '=', ref('stock_inventory_0'))]]" model="stock.inventory" name="search"/> + </function> + + + <!-- Multi Company --> + + <!-- Child Company 1--> + <record id="res_partner_company_1" model="res.partner"> + <field name="name">My Company, Chicago</field> + <field name="is_company">1</field> + <field eval="1" name="active"/> + <field name="street">90 Streets Avenue</field> + <field model="res.country" name="country_id" search="[('code','ilike','us')]"/> + <field model="res.country.state" name="state_id" search="[('code','ilike','il')]"/> + <field name="zip">60610</field> + <field name="city">Chicago</field> + <field name="email">chicago@yourcompany.com</field> + <field name="phone">+1 312 349 3030</field> + <field name="website">www.example.com</field> + <field name="company_id" eval="False"/> + </record> + + <record id="res_partner_address_41" model="res.partner"> + <field name="name">Jeff Lawson</field> + <field name="parent_id" ref="res_partner_company_1"/> + <field name="email">jeff.lawson52@example.com</field> + <field name="phone">(461)-417-6587</field> + <field name="image_1920" type="base64" file="stock/static/img/res_partner_address_41.jpg"/> + <field name="company_id" eval="False"/> + </record> + + <record id="res_company_1" model="res.company"> + <field name="currency_id" ref="base.USD"/> + <field name="partner_id" ref="res_partner_company_1"/> + <field name="name">My Company (Chicago)</field> + <field name="user_ids" eval="[(4, ref('base.user_admin')), (4, ref('base.user_demo'))]"/> + </record> + + <record id="base.group_multi_company" model="res.groups"> + <field name="users" eval="[(4, ref('base.user_admin')), (4, ref('base.user_demo'))]"/> + </record> + + <record id="base.main_company" model="res.company"> + <field name="name">My Company (San Francisco)</field> + </record> + + <!-- Create a ir data with the autocreated warehouse --> + <function model="ir.model.data" name="_update_xmlids"> + <value model="base" eval="[{ + 'xml_id': 'stock.stock_warehouse_shop0', + 'record': obj().env['stock.warehouse'].search([('company_id', '=', obj().env.ref('stock.res_company_1').id)]), + 'noupdate': True, + }]"/> + </function> + + <record id="stock.stock_warehouse_shop0" model="stock.warehouse"> + <field name="name">Chicago 1</field> + <field name="code">CHIC1</field> + <field name="partner_id" ref="res_partner_address_41"/> + </record> + + <record id="product.consu_delivery_03" model="product.product"> + <field name="type">product</field> + </record> + <record id="product.consu_delivery_02" model="product.product"> + <field name="type">product</field> + </record> + <record id="product.consu_delivery_01" model="product.product"> + <field name="type">product</field> + </record> + <record id="product.product_order_01" model="product.product"> + <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">200.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'))]"/> + </record> + + </data> +</odoo> diff --git a/addons/stock/data/stock_demo2.xml b/addons/stock/data/stock_demo2.xml new file mode 100644 index 00000000..dd318a2a --- /dev/null +++ b/addons/stock/data/stock_demo2.xml @@ -0,0 +1,554 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + <function model="ir.model.data" name="_update_xmlids"> + <value model="base" eval="[{ + 'xml_id': 'stock.chi_picking_type_in', + 'record': obj().env.ref('stock.stock_warehouse_shop0').in_type_id, + 'noupdate': True, + }, { + 'xml_id': 'stock.chi_picking_type_out', + 'record': obj().env.ref('stock.stock_warehouse_shop0').out_type_id, + 'noupdate': True, + }, { + 'xml_id': 'stock.stock_location_shop0', + 'record': obj().env.ref('stock.stock_warehouse_shop0').lot_stock_id, + 'noupdate': True, + }]"/> + </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"/> + <field name="barcode">WH-SHELF-REF</field> + </record> + + <record id="product_cable_management_box" model="product.product"> + <field name="default_code">FURN_5555</field> + <field name="name">Cable Management Box</field> + <field name="type">product</field> + <field name="weight">0.01</field> + <field name="categ_id" ref="product.product_category_5"/> + <field name="lst_price">100.0</field> + <field name="standard_price">70.0</field> + <field name="weight">1.0</field> + <field name="tracking">lot</field> + <field name="uom_id" ref="uom.product_uom_unit"/> + <field name="uom_po_id" ref="uom.product_uom_unit"/> + <field name="image_1920" type="base64" file="stock/static/img/cable_management.png"/> + </record> + + <record id="lot_product_cable_management" model="stock.production.lot"> + <field name="name">LOT-000001</field> + <field name="product_id" ref="stock.product_cable_management_box"/> + <field name="company_id" ref="base.main_company"/> + </record> + + <record id="stock_inventory_icecream" model="stock.inventory"> + <field name="name">Inventory for Cable Management Box</field> + <field name="product_ids" eval="[(4, ref('stock.product_cable_management_box'))]"/> + </record> + + <record id="lot_product_product_cable_management_box_0" model="stock.production.lot"> + <field name="name">CM-BOX-00001</field> + <field name="product_id" ref="stock.product_cable_management_box"/> + <field name="company_id" ref="base.main_company"/> + </record> + + <record id="lot_product_product_cable_management_box_1" model="stock.production.lot"> + <field name="name">CM-BOX-00002</field> + <field name="product_id" ref="stock.product_cable_management_box"/> + <field name="company_id" ref="base.main_company"/> + </record> + + <record id="stock_inventory_line_icecream_lot0" model="stock.inventory.line"> + <field name="product_id" ref="stock.product_cable_management_box"/> + <field name="product_uom_id" ref="uom.product_uom_unit"/> + <field name="inventory_id" ref="stock.stock_inventory_icecream"/> + <field name="product_qty">50.0</field> + <field name="location_id" ref="stock.stock_location_14"/> + <field name="prod_lot_id" ref="lot_product_product_cable_management_box_0"/> + </record> + + <record id="stock_inventory_line_icecream_lot1" model="stock.inventory.line"> + <field name="product_id" ref="stock.product_cable_management_box"/> + <field name="product_uom_id" ref="uom.product_uom_unit"/> + <field name="inventory_id" ref="stock.stock_inventory_icecream"/> + <field name="product_qty">40.0</field> + <field name="location_id" ref="stock.stock_location_14"/> + <field name="prod_lot_id" ref="lot_product_product_cable_management_box_1"/> + </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</field> + <field name="user_id"></field> + <field name="partner_id" ref="base.res_partner_1"/> + <field name="scheduled_date" eval="DateTime.today()"/> + <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="user_id"></field> + <field name="partner_id" ref="base.res_partner_1"/> + <field name="scheduled_date" eval="DateTime.today() - timedelta(days=15)"/> + <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'), + })]"/> + </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</field> + <field name="user_id"></field> + <field name="partner_id" ref="base.res_partner_1"/> + <field name="scheduled_date" eval="DateTime.today() - timedelta(days=5)"/> + <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="user_id"></field> + <field name="origin">your company warehouse</field> + <field name="partner_id" ref="base.res_partner_1"/> + <field name="scheduled_date" eval="DateTime.today()"/> + <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> + + <record id="outgoing_shipment_main_warehouse4" model="stock.picking"> + <field name="picking_type_id" ref="stock.picking_type_out"/> + <field name="origin">outgoing shipment</field> + <field name="user_id"></field> + <field name="partner_id" ref="base.res_partner_1"/> + <field name="scheduled_date" eval="DateTime.today() - timedelta(days=7)"/> + <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_3').name, + 'product_id': ref('product.product_product_3'), + 'product_uom': ref('uom.product_uom_unit'), + 'product_uom_qty': 16.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_warehouse5" model="stock.picking"> + <field name="picking_type_id" ref="stock.picking_type_out"/> + <field name="origin">outgoing shipment</field> + <field name="user_id"></field> + <field name="partner_id" ref="base.res_partner_1"/> + <field name="scheduled_date" eval="DateTime.today() - timedelta(days=12)"/> + <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_3').name, + 'product_id': ref('product.product_product_3'), + 'product_uom': ref('uom.product_uom_unit'), + 'product_uom_qty': 40.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_warehouse6" model="stock.picking"> + <field name="picking_type_id" ref="stock.picking_type_out"/> + <field name="origin">outgoing shipment</field> + <field name="user_id"></field> + <field name="partner_id" ref="base.res_partner_1"/> + <field name="scheduled_date" eval="DateTime.today() - timedelta(days=20)"/> + <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': 50.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="user_id"></field> + <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_cable_management_box').name, + 'product_id': ref('stock.product_cable_management_box'), + '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> + + <record id="incomming_shipment1" model="stock.picking"> + <field name="user_id"></field> + <field name="picking_type_id" ref="stock.picking_type_in"/> + <field name="partner_id" ref="base.res_partner_1"/> + <field name="scheduled_date" eval="DateTime.today() - timedelta(days=5)"/> + <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="user_id"></field> + <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="user_id"></field> + <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="user_id"></field> + <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="user_id"></field> + <field name="scheduled_date" eval="DateTime.today()"/> + <field name="location_id" ref="stock.stock_location_suppliers"/> + <field name="location_dest_id" ref="stock.stock_location_shop0"/> + <field name="company_id" ref="stock.res_company_1"/> + <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'), + 'company_id': ref('stock.res_company_1'), + })]"/> + </record> + + <record id="incomming_chicago_warehouse1" model="stock.picking"> + <field name="user_id"></field> + <field name="picking_type_id" ref="stock.chi_picking_type_in"/> + <field name="scheduled_date" eval="DateTime.today() - timedelta(days=5)"/> + <field name="location_id" ref="stock.stock_location_suppliers"/> + <field name="location_dest_id" ref="stock.stock_location_shop0"/> + <field name="company_id" ref="stock.res_company_1"/> + <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'), + 'company_id': ref('stock.res_company_1'), + })]"/> + </record> + + <record id="incomming_chicago_warehouse2" model="stock.picking"> + <field name="user_id"></field> + <field name="picking_type_id" ref="stock.chi_picking_type_in"/> + <field name="location_id" ref="stock.stock_location_suppliers"/> + <field name="location_dest_id" ref="stock.stock_location_shop0"/> + <field name="company_id" ref="stock.res_company_1"/> + <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'), + 'company_id': ref('stock.res_company_1'), + })]"/> + </record> + + <record id="incomming_chicago_warehouse3" model="stock.picking"> + <field name="user_id"></field> + <field name="picking_type_id" ref="stock.chi_picking_type_in"/> + <field name="origin">chicago_warehouse</field> + <field name="scheduled_date" eval="DateTime.today() - timedelta(days=2)"/> + <field name="location_id" ref="stock.stock_location_suppliers"/> + <field name="location_dest_id" ref="stock.stock_location_shop0"/> + <field name="company_id" ref="stock.res_company_1"/> + <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'), + 'company_id': ref('stock.res_company_1'), + })]"/> + </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="user_id"></field> + <field name="origin">outgoing_chicago_warehouse</field> + <field name="scheduled_date" eval="DateTime.today()"/> + <field name="location_id" ref="stock.stock_location_shop0"/> + <field name="location_dest_id" ref="stock.stock_location_customers"/> + <field name="company_id" ref="stock.res_company_1"/> + <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'), + 'company_id': ref('stock.res_company_1'), + })]"/> + </record> + + <record id="outgoing_chicago_warehouse1" model="stock.picking"> + <field name="user_id"></field> + <field name="picking_type_id" ref="stock.chi_picking_type_out"/> + <field name="origin">outgoing_shipment_chicago_warehouse</field> + <field name="scheduled_date" eval="DateTime.today() - timedelta(days=10)"/> + <field name="location_id" ref="stock.stock_location_shop0"/> + <field name="location_dest_id" ref="stock.stock_location_customers"/> + <field name="company_id" ref="stock.res_company_1"/> + <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'), + 'company_id': ref('stock.res_company_1'), + })]"/> + </record> + + <record id="outgoing_chicago_warehouse2" model="stock.picking"> + <field name="user_id"></field> + <field name="picking_type_id" ref="stock.chi_picking_type_out"/> + <field name="origin">chicago_warehouse</field> + <field name="scheduled_date" eval="DateTime.today()"/> + <field name="location_id" ref="stock.stock_location_shop0"/> + <field name="location_dest_id" ref="stock.stock_location_customers"/> + <field name="company_id" ref="stock.res_company_1"/> + <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'), + 'company_id': ref('stock.res_company_1'), + })]"/> + </record> + + <record id="outgoing_chicago_warehouse3" model="stock.picking"> + <field name="user_id"></field> + <field name="picking_type_id" ref="stock.chi_picking_type_out"/> + <field name="origin">outgoing chicago warehouse</field> + <field name="scheduled_date" eval="DateTime.today()"/> + <field name="location_id" ref="stock.stock_location_shop0"/> + <field name="location_dest_id" ref="stock.stock_location_customers"/> + <field name="company_id" ref="stock.res_company_1"/> + <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'), + 'company_id': ref('stock.res_company_1'), + })]"/> + </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.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_shipment1').id, + obj().env.ref('stock.incomming_shipment2').id, + obj().env.ref('stock.incomming_shipment3').id, + obj().env.ref('stock.outgoing_chicago_warehouse1').id, + obj().env.ref('stock.outgoing_chicago_warehouse2').id, + obj().env.ref('stock.outgoing_chicago_warehouse3').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_assign"> + <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.outgoing_chicago_warehouse1').id, + ]"/> + </function> + + <!-- Adds move lines qty. done --> + <function model="stock.move.line" name="write"> + <value model="stock.move.line" search="[('picking_id', '=', ref('stock.outgoing_shipment_main_warehouse1'))]"/> + <value eval="{'qty_done': 100}"/> + </function> + <function model="stock.move.line" name="write"> + <value model="stock.move.line" search="[('picking_id', '=', ref('stock.outgoing_shipment_main_warehouse4'))]"/> + <value eval="{'qty_done': 16}"/> + </function> + <function model="stock.move.line" name="write"> + <value model="stock.move.line" search="[('picking_id', '=', ref('stock.outgoing_shipment_main_warehouse5'))]"/> + <value eval="{'qty_done': 32}"/> + </function> + <function model="stock.move.line" name="write"> + <value model="stock.move.line" search="[('picking_id', '=', ref('stock.outgoing_shipment_main_warehouse6'))]"/> + <value eval="{'qty_done': 50}"/> + </function> + <function model="stock.move.line" name="write"> + <value model="stock.move.line" search="[('picking_id', '=', ref('stock.incomming_chicago_warehouse1'))]"/> + <value eval="{'qty_done': 100}"/> + </function> + <function model="stock.move.line" name="write"> + <value model="stock.move.line" search="[('picking_id', '=', ref('stock.outgoing_chicago_warehouse1'))]"/> + <value eval="{'qty_done': 100}"/> + </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.outgoing_shipment_main_warehouse5').id, + obj().env.ref('stock.outgoing_shipment_main_warehouse6').id, + obj().env.ref('stock.incomming_chicago_warehouse1').id, + obj().env.ref('stock.outgoing_chicago_warehouse1').id, + obj().env.ref('stock.outgoing_chicago_warehouse2').id]"/> + </function> + + <record id="stock.outgoing_chicago_warehouse1" model="stock.picking"> + <field name="date_done" eval="DateTime.today() - timedelta(days=5)"/> + </record> + + <record id="stock.outgoing_shipment_main_warehouse5" model="stock.picking"> + <field name="date_done" eval="DateTime.today() - timedelta(days=17)"/> + </record> + + <record id="stock.outgoing_shipment_main_warehouse6" model="stock.picking"> + <field name="date_done" eval="DateTime.today() - timedelta(days=7)"/> + </record> + + <function model="stock.move" name="write"> + <value model="stock.move" search="[('picking_id', '=', ref('stock.outgoing_shipment_main_warehouse4'))]"/> + <value eval="{'date': DateTime.today() + timedelta(days=3)}"/> + </function> + + <function model="stock.move" name="write"> + <value model="stock.move" search="[('picking_id', '=', ref('stock.outgoing_shipment_main_warehouse5'))]"/> + <value eval="{'date': DateTime.today() - timedelta(days=18)}"/> + </function> + + <function model="stock.move" name="write"> + <value model="stock.move" search="[('picking_id', '=', ref('stock.outgoing_shipment_main_warehouse6'))]"/> + <value eval="{'date': DateTime.today() - timedelta(days=7)}"/> + </function> + + </data> +</odoo> diff --git a/addons/stock/data/stock_demo_pre.xml b/addons/stock/data/stock_demo_pre.xml new file mode 100644 index 00000000..57fac7bc --- /dev/null +++ b/addons/stock/data/stock_demo_pre.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + <record id="stock_location_14" model="stock.location"> + <field name="name">Shelf 2</field> + <field name="posx">0</field> + <field name="barcode">2601985</field> + <field name="location_id" model="stock.location" + eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> + </record> + <record id="stock_location_components" model="stock.location"> + <field name="name">Shelf 1</field> + <field name="posx">0</field> + <field name="barcode">2601892</field> + <field name="location_id" model="stock.location" + eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> + </record> + </data> +</odoo> diff --git a/addons/stock/data/stock_location_demo_cpu1.xml b/addons/stock/data/stock_location_demo_cpu1.xml new file mode 100644 index 00000000..dd564f21 --- /dev/null +++ b/addons/stock/data/stock_location_demo_cpu1.xml @@ -0,0 +1,14 @@ +<odoo> + <data noupdate="1"> + <record id="stock_warehouse_orderpoint_shop1_cpu1" model="stock.warehouse.orderpoint"> + <field name="product_max_qty">20.0</field> + <field name="product_min_qty">10.0</field> + <field name="product_uom" ref="uom.product_uom_unit"/> + <field name="company_id" ref="stock.res_company_1"/> + <field name="warehouse_id" ref="stock.stock_warehouse_shop0"/> + <field name="location_id" ref="stock.stock_location_shop0"/> + <field name="product_id" ref="product.product_product_9"/> + </record> + + </data> +</odoo> diff --git a/addons/stock/data/stock_location_demo_cpu3.xml b/addons/stock/data/stock_location_demo_cpu3.xml new file mode 100644 index 00000000..08d4cf55 --- /dev/null +++ b/addons/stock/data/stock_location_demo_cpu3.xml @@ -0,0 +1,27 @@ +<odoo> + <data noupdate="1"> + <record id="location_order" model="stock.location"> + <field name="name">Order Processing</field> + <field name="usage">internal</field> + <field name="location_id" ref="stock.stock_location_company"/> + </record> + + <record id="location_dispatch_zone" model="stock.location"> + <field name="name">Dispatch Zone</field> + <field name="usage">internal</field> + <field name="location_id" ref="stock.location_order"/> + </record> + + <record id="location_gate_a" model="stock.location"> + <field name="name">Gate A</field> + <field name="usage">internal</field> + <field name="location_id" ref="stock.location_dispatch_zone"/> + </record> + + <record id="location_gate_b" model="stock.location"> + <field name="name">Gate B</field> + <field name="usage">internal</field> + <field name="location_id" ref="stock.location_dispatch_zone"/> + </record> + </data> +</odoo> diff --git a/addons/stock/data/stock_orderpoint_demo.xml b/addons/stock/data/stock_orderpoint_demo.xml new file mode 100644 index 00000000..eab6be76 --- /dev/null +++ b/addons/stock/data/stock_orderpoint_demo.xml @@ -0,0 +1,35 @@ +<odoo> + <data noupdate="1"> + + <!-- Resource: stock.warehouse.orderpoint --> + + <record id="stock_warehouse_orderpoint_1" model="stock.warehouse.orderpoint"> + <field name="product_max_qty">10.0</field> + <field name="product_min_qty">5.0</field> + <field name="product_uom" ref="uom.product_uom_unit"/> + <field model="stock.warehouse" name="warehouse_id" search="[]"/> + <field name="product_id" ref="product.product_delivery_02"/> + <field name="location_id" model="stock.location" + eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> + </record> + <record id="stock_warehouse_orderpoint_2" model="stock.warehouse.orderpoint"> + <field name="product_max_qty">12.0</field> + <field name="product_min_qty">5.0</field> + <field name="product_uom" ref="uom.product_uom_unit"/> + <field model="stock.warehouse" name="warehouse_id" search="[]"/> + <field name="product_id" ref="product.product_product_20"/> + <field name="location_id" model="stock.location" + eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> + </record> + <record id="stock_warehouse_orderpoint_5" model="stock.warehouse.orderpoint"> + <field name="product_max_qty">5.0</field> + <field name="product_min_qty">3.0</field> + <field name="product_uom" ref="uom.product_uom_unit"/> + <field model="stock.warehouse" name="warehouse_id" search="[]"/> + <field name="product_id" ref="product.product_delivery_01"/> + <field name="location_id" model="stock.location" + eval="obj().env.ref('stock.warehouse0').lot_stock_id.id"/> + </record> + + </data> +</odoo>
\ No newline at end of file diff --git a/addons/stock/data/stock_sequence_data.xml b/addons/stock/data/stock_sequence_data.xml new file mode 100644 index 00000000..7f07dd7e --- /dev/null +++ b/addons/stock/data/stock_sequence_data.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data noupdate="1"> + <!-- + Sequences for pickings + --> + + + + <record id="seq_picking_internal" model="ir.sequence"> + <field name="name">Picking INT</field> + <field name="code">stock.picking</field> + <field name="prefix">INT/</field> + <field name="padding">5</field> + <field name="company_id" eval="False"/> + </record> + + <!-- + Sequences from tracking numbers + --> + <record id="sequence_production_lots" model="ir.sequence"> + <field name="name">Serial Numbers</field> + <field name="code">stock.lot.serial</field> + <field name="prefix"></field> + <field name="padding">7</field> + <field name="number_next">1</field> + <field name="number_increment">1</field> + <field name="company_id" eval="False"/> + </record> + + <!-- stock/lot.tracking sequence and sequence type should be removed, mmh? --> + <record id="sequence_tracking" model="ir.sequence"> + <field name="name">Packs</field> + <field name="code">stock.lot.tracking</field> + <field name="prefix"></field> + <field name="padding">7</field> + <field name="number_next">1</field> + <field name="number_increment">1</field> + <field name="company_id" eval="False"/> + </record> + + <!-- Sequences for stock.quant.package --> + <record id="seq_quant_package" model="ir.sequence"> + <field name="name">Packages</field> + <field name="code">stock.quant.package</field> + <field name="prefix">PACK</field> + <field name="padding">7</field> + <field name="company_id" eval="False"/> + </record> + + <!-- Scheduler --> + + <record forcecreate="True" id="ir_cron_scheduler_action" model="ir.cron"> + <field name="name">Procurement: run scheduler</field> + <field name="model_id" ref="model_procurement_group"/> + <field name="state">code</field> + <field name="code"> +model.run_scheduler(True) + </field> + <field eval="True" name="active"/> + <field name="user_id" ref="base.user_root"/> + <field name="interval_number">1</field> + <field name="interval_type">days</field> + <field name="numbercall">-1</field> + <field eval="False" name="doall"/> + </record> + + + + + </data> +</odoo> diff --git a/addons/stock/data/stock_traceability_report_data.xml b/addons/stock/data/stock_traceability_report_data.xml new file mode 100644 index 00000000..a9cff53d --- /dev/null +++ b/addons/stock/data/stock_traceability_report_data.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + + <record id="action_stock_report" model="ir.actions.client"> + <field name="name">Traceability Report</field> + <field name="tag">stock_report_generic</field> + <field name="context" eval="{'url': '/stock/output_format/stock/active_id', 'model': 'stock.traceability.report'}" /> + </record> + +</odoo> |
