forked from OCA/sale-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rental_demo.xml
86 lines (74 loc) · 3.43 KB
/
rental_demo.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014-2015 Akretion (http://www.akretion.com/)
@author Alexis de Lattre <[email protected]>
The licence is in the file __openerp__.py
-->
<openerp>
<data noupdate="1">
<record id="rent_product_product_6" model="product.product">
<field name="name">Rental of one iPad Mini</field>
<field name="default_code">RENT-A1232</field>
<field name="categ_id" ref="product.product_category_5"/>
<field name="sale_ok" eval="True"/>
<field name="list_price">5</field>
<field name="type">service</field>
<field name="uom_id" ref="product.product_uom_day"/>
<field name="uom_po_id" ref="product.product_uom_day"/>
<field name="must_have_dates" eval="True"/>
<field name="rented_product_id" ref="product.product_product_6"/>
</record>
<record id="rent_product_product_8" model="product.product">
<field name="name">Rental of one iMac</field>
<field name="default_code">RENT-A1090</field>
<field name="categ_id" ref="product.product_category_5"/>
<field name="sale_ok" eval="True"/>
<field name="list_price">4</field>
<field name="type">service</field>
<field name="uom_id" ref="product.product_uom_day"/>
<field name="uom_po_id" ref="product.product_uom_day"/>
<field name="must_have_dates" eval="True"/>
<field name="rented_product_id" ref="product.product_product_8"/>
</record>
<record id="rent_product_product_25" model="product.product">
<field name="name">Rental of one Laptop E5023</field>
<field name="default_code">RENT-LAP-E5</field>
<field name="categ_id" ref="product.product_category_5"/>
<field name="sale_ok" eval="True"/>
<field name="list_price">6</field>
<field name="type">service</field>
<field name="uom_id" ref="product.product_uom_day"/>
<field name="uom_po_id" ref="product.product_uom_day"/>
<field name="must_have_dates" eval="True"/>
<field name="rented_product_id" ref="product.product_product_25"/>
</record>
<!-- Create inventory on Rental In for these products -->
<record id="rental_inventory" model="stock.inventory">
<field name="name">Inventory for rented products</field>
</record>
<record id="rental_inventory_line_1" model="stock.inventory.line">
<field name="product_id" ref="product.product_product_6"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="inventory_id" ref="rental_inventory"/>
<field name="product_qty">56.0</field>
<field name="location_id" ref="rental_in_stock_location"/>
</record>
<record id="rental_inventory_line_2" model="stock.inventory.line">
<field name="product_id" ref="product.product_product_8"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="inventory_id" ref="rental_inventory"/>
<field name="product_qty">46.0</field>
<field name="location_id" ref="rental_in_stock_location"/>
</record>
<record id="rental_inventory_line_3" model="stock.inventory.line">
<field name="product_id" ref="product.product_product_25"/>
<field name="product_uom_id" ref="product.product_uom_unit"/>
<field name="inventory_id" ref="rental_inventory"/>
<field name="product_qty">2.0</field>
<field name="location_id" ref="rental_in_stock_location"/>
</record>
<function model="stock.inventory" name="action_done">
<function eval="[[('id', '=', ref('rental_inventory'))]]" model="stock.inventory" name="search"/>
</function>
</data>
</openerp>