Fix stock quantity to not have exception
[odoo/odoo.git] / addons / stock / stock_demo.xml
1 <?xml version="1.0"?>
2 <terp>
3 <data noupdate="1">
4
5         <!--
6         Resource: stock.location
7         -->
8         <record id="stock_location_3" model="stock.location">
9                 <field name="name">IT Suppliers</field>
10                 <field name="location_id" ref="stock_location_suppliers"/>
11                 <field name="usage">supplier</field>
12         </record>
13         <record id="stock_location_4" model="stock.location">
14                 <field name="name">Maxtor Suppliers</field>
15                 <field name="location_id" ref="stock_location_3"/>
16                 <field name="usage">supplier</field>
17         </record>
18         <record id="stock_location_5" model="stock.location">
19                 <field name="name">Generic IT Suppliers</field>
20                 <field name="location_id" ref="stock_location_3"/>
21                 <field name="usage">supplier</field>
22         </record>
23         <record id="stock_location_7" model="stock.location">
24                 <field name="name">European Customers</field>
25                 <field name="location_id" ref="stock_location_customers"/>
26                 <field name="usage">customer</field>
27         </record>
28         <record id="stock_location_8" model="stock.location">
29                 <field name="name">Non European Customers</field>
30                 <field name="location_id" ref="stock_location_customers"/>
31                 <field name="usage">customer</field>
32         </record>
33         <record id="stock_location_13" model="stock.location">
34                 <field name="name">Stock Level 1</field>
35                 <field name="location_id" ref="stock_location_stock"/>
36         </record>
37         <record id="stock_location_14" model="stock.location">
38                 <field name="name">Finished products</field>
39                 <field name="location_id" ref="stock_location_13"/>
40                 <field name="account_id" model="account.account" search="[('name','=','Merchandise Type B')]"/>
41         </record>
42         <record id="stock_location_15" model="stock.location">
43                 <field name="name">Sub Products</field>
44                 <field name="location_id" ref="stock_location_13"/>
45         </record>
46         <record id="stock_location_workshop" model="stock.location">
47                 <field name="name">Workshop</field>
48                 <field name="location_id" ref="stock_location_stock"/>
49         </record>
50         <record id="stock_location_components" model="stock.location">
51                 <field name="name">Components</field>
52                 <field name="location_id" ref="stock_location_workshop"/>
53         </record>
54
55         <!--
56         Resource: stock.inventory
57         -->
58
59         <record id="stock_inventory_0" model="stock.inventory">
60                 <field name="name">Starting Inventory</field>
61                 <field name="date_done">2005-08-02 13:42:43</field>
62                 <field name="state">done</field>
63         </record>
64
65         <!--
66         Resource: stock.inventory.line
67         -->
68
69         <record id="stock_inventory_line_0" model="stock.inventory.line">
70                 <field name="product_id" ref="product.product_product_pc1"/>
71                 <field name="product_uom" ref="product.product_uom_unit"/>
72                 <field name="inventory_id" ref="stock_inventory_0"/>
73                 <field name="product_qty">14.0</field>
74                 <field name="location_id" ref="stock_location_14"/>
75         </record>
76
77         <record id="stock_inventory_line_1" model="stock.inventory.line">
78                 <field name="product_id" ref="product.product_product_24"/>
79                 <field name="product_uom" ref="product.product_uom_unit"/>
80                 <field name="inventory_id" ref="stock_inventory_0"/>
81                 <field name="product_qty">16.0</field>
82                 <field name="location_id" ref="stock_location_14"/>
83         </record>
84         <record model="stock.inventory.line">
85                 <field name="product_id" ref="product.product_product_25"/>
86                 <field name="product_uom" ref="product.product_uom_unit"/>
87                 <field name="inventory_id" ref="stock_inventory_0"/>
88                 <field name="product_qty">16.0</field>
89                 <field name="location_id" ref="stock_location_14"/>
90         </record>
91         <record model="stock.inventory.line">
92                 <field name="product_id" ref="product.product_product_pc3"/>
93                 <field name="product_uom" ref="product.product_uom_unit"/>
94                 <field name="inventory_id" ref="stock_inventory_0"/>
95                 <field name="product_qty">8.0</field>
96                 <field name="location_id" ref="stock_location_14"/>
97         </record>
98         <record id="stock_inventory_line_2" model="stock.inventory.line">
99                 <field name="product_id" ref="product.product_product_mb1"/>
100                 <field name="product_uom" ref="product.product_uom_unit"/>
101                 <field name="inventory_id" ref="stock_inventory_0"/>
102                 <field name="product_qty">18.0</field>
103                 <field name="location_id" ref="stock_location_components"/>
104         </record>
105         <record id="stock_inventory_line_3" model="stock.inventory.line">
106                 <field name="product_id" ref="product.product_product_mb2"/>
107                 <field name="product_uom" ref="product.product_uom_unit"/>
108                 <field name="inventory_id" ref="stock_inventory_0"/>
109                 <field name="product_qty">10.0</field>
110                 <field name="location_id" ref="stock_location_components"/>
111         </record>
112         <record id="stock_inventory_line_4" model="stock.inventory.line">
113                 <field name="product_id" ref="product.product_product_cpu1"/>
114                 <field name="product_uom" ref="product.product_uom_unit"/>
115                 <field name="inventory_id" ref="stock_inventory_0"/>
116                 <field name="product_qty">12.0</field>
117                 <field name="location_id" ref="stock_location_components"/>
118         </record>
119         <record id="stock_inventory_line_5" model="stock.inventory.line">
120                 <field name="product_id" ref="product.product_product_cpu3"/>
121                 <field name="product_uom" ref="product.product_uom_unit"/>
122                 <field name="inventory_id" ref="stock_inventory_0"/>
123                 <field name="product_qty">8.0</field>
124                 <field name="location_id" ref="stock_location_components"/>
125         </record>
126         <record id="stock_inventory_line_6" model="stock.inventory.line">
127                 <field name="product_id" ref="product.product_product_hdd1"/>
128                 <field name="product_uom" ref="product.product_uom_unit"/>
129                 <field name="inventory_id" ref="stock_inventory_0"/>
130                 <field name="product_qty">26.0</field>
131                 <field name="location_id" ref="stock_location_components"/>
132         </record>
133         <record id="stock_inventory_line_7" model="stock.inventory.line">
134                 <field name="product_id" ref="product.product_product_fan"/>
135                 <field name="product_uom" ref="product.product_uom_unit"/>
136                 <field name="inventory_id" ref="stock_inventory_0"/>
137                 <field name="product_qty">32.0</field>
138                 <field name="location_id" ref="stock_location_components"/>
139         </record>
140         <record id="stock_inventory_line_8" model="stock.inventory.line">
141                 <field name="product_id" ref="product.product_product_fan2"/>
142                 <field name="product_uom" ref="product.product_uom_unit"/>
143                 <field name="inventory_id" ref="stock_inventory_0"/>
144                 <field name="product_qty">37.0</field>
145                 <field name="location_id" ref="stock_location_components"/>
146         </record>
147         <record id="stock_inventory_line_9" model="stock.inventory.line">
148                 <field name="product_id" ref="product.product_product_ram"/>
149                 <field name="product_uom" ref="product.product_uom_unit"/>
150                 <field name="inventory_id" ref="stock_inventory_0"/>
151                 <field name="product_qty">39.0</field>
152                 <field name="location_id" ref="stock_location_components"/>
153         </record>
154         <record id="stock_inventory_line_10" model="stock.inventory.line">
155                 <field name="product_id" ref="product.product_product_ram512"/>
156                 <field name="product_uom" ref="product.product_uom_unit"/>
157                 <field name="inventory_id" ref="stock_inventory_0"/>
158                 <field name="product_qty">45.0</field>
159                 <field name="location_id" ref="stock_location_components"/>
160         </record>
161         <record id="stock_inventory_line_11" model="stock.inventory.line">
162                 <field name="product_id" ref="product.product_product_hdd2"/>
163                 <field name="product_uom" ref="product.product_uom_unit"/>
164                 <field name="inventory_id" ref="stock_inventory_0"/>
165                 <field name="product_qty">10.0</field>
166                 <field name="location_id" ref="stock_location_components"/>
167         </record>
168         <record id="stock_inventory_line_12" model="stock.inventory.line">
169                 <field name="product_id" ref="product.product_product_hdd3"/>
170                 <field name="product_uom" ref="product.product_uom_unit"/>
171                 <field name="inventory_id" ref="stock_inventory_0"/>
172                 <field name="product_qty">2.0</field>
173                 <field name="location_id" ref="stock_location_components"/>
174         </record>
175         <record id="stock_inventory_line_13" model="stock.inventory.line">
176                 <field name="product_id" ref="product.product_product_tow1"/>
177                 <field name="product_uom" ref="product.product_uom_unit"/>
178                 <field name="inventory_id" ref="stock_inventory_0"/>
179                 <field name="product_qty">80.0</field>
180                 <field name="location_id" ref="stock_location_components"/>
181         </record>
182         
183         <function model="stock.inventory" name="action_done">
184                 <function model="stock.inventory" name="search" eval="[[]]"/>
185         </function>
186         
187 </data>
188 </terp>
189