odoo/addons/website_portal_sale/data/sale_demo.xml

77 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sale_order_1" model="sale.order">
<field name="partner_id" ref="portal.partner_demo_portal"/>
<field name="partner_invoice_id" ref="portal.partner_demo_portal"/>
<field name="partner_shipping_id" ref="portal.partner_demo_portal"/>
<field name="user_id" ref="base.user_root"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="state">sent</field>
<field name="team_id" ref="sales_team.team_sales_department"/>
<field name="date_order" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
<field name="message_partner_ids" eval="[(4, ref('portal.partner_demo_portal'))]"/>
</record>
<record id="sale_order_line_1" model="sale.order.line">
<field name="order_id" ref="sale_order_1"/>
<field name="name">Laptop E5023</field>
<field name="product_id" ref="product.product_product_25"/>
<field name="product_uom_qty">3</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">2950.00</field>
</record>
<record id="sale_order_line_2" model="sale.order.line">
<field name="order_id" ref="sale_order_1"/>
<field name="name">Pen drive, 16GB</field>
<field name="product_id" ref="product.product_delivery_02"/>
<field name="product_uom_qty">5</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">145.00</field>
</record>
<record id="sale_order_line_3" model="sale.order.line">
<field name="order_id" ref="sale_order_1"/>
<field name="name">Headset USB</field>
<field name="product_id" ref="product.product_delivery_01"/>
<field name="product_uom_qty">2</field>
<field name="product_uom" ref="product.product_uom_unit"/>
<field name="price_unit">65.00</field>
</record>
<record id="sale_order_2" model="sale.order">
<field name="partner_id" ref="portal.partner_demo_portal"/>
<field name="partner_invoice_id" ref="portal.partner_demo_portal"/>
<field name="partner_shipping_id" ref="portal.partner_demo_portal"/>
<field name="user_id" ref="base.user_root"/>
<field name="pricelist_id" ref="product.list0"/>
<field name="team_id" ref="sales_team.team_sales_department"/>
<field name="date_order" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
<field name="message_partner_ids" eval="[(4, ref('portal.partner_demo_portal'))]"/>
</record>
<record id="sale_order_line_4" model="sale.order.line">
<field name="order_id" ref="sale_order_2"/>
<field name="name">Service on demand</field>
<field name="product_id" ref="product.product_product_1"/>
<field name="product_uom_qty">24</field>
<field name="product_uom" ref="product.product_uom_hour"/>
<field name="price_unit">75.00</field>
</record>
<record id="sale_order_line_5" model="sale.order.line">
<field name="order_id" ref="sale_order_2"/>
<field name="name">On Site Assistance</field>
<field name="product_id" ref="product.product_product_2"/>
<field name="product_uom_qty">30</field>
<field name="product_uom" ref="product.product_uom_hour"/>
<field name="price_unit">38.25</field>
</record>
<!-- Confirm some Sale Orders-->
<function model="sale.order" name="action_confirm" eval="[[ref('sale_order_2')]]"/>
</odoo>