[stock] +quantity and first inventory done
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Sat, 15 Dec 2012 07:22:40 +0000 (08:22 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Sat, 15 Dec 2012 07:22:40 +0000 (08:22 +0100)
__openerp__.py
demo/stock.xml [new file with mode: 0644]

index 9a77690..6056fff 100644 (file)
@@ -25,6 +25,7 @@ This module supplies demonstration data for the bikecoop module
         'demo/account.xml',
         'demo/point_of_sale.xml',
         'demo/event.xml',
+        'demo/stock.xml',
     ],
     'installable': True,
     'auto_install': False,
diff --git a/demo/stock.xml b/demo/stock.xml
new file mode 100644 (file)
index 0000000..ab6da57
--- /dev/null
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data noupdate="1">
+        <record id="stock_inventory_0" model="stock.inventory">
+            <field name="name">Starting inventory</field>
+            <field name="date" eval="(DateTime.today()+ timedelta(days=-140)).strftime('%Y-%m-%d 19:00:00')"/>
+        </record>
+
+        <record id="stock_inventory_line_0" model="stock.inventory.line">
+            <field name="product_id" ref="product_adult_frame"/>
+            <field name="inventory_id" ref="stock_inventory_0"/>
+            <field name="product_qty">36</field>
+            <field name="product_uom" ref="product.product_uom_unit"/>
+        </record>
+        <record id="stock_inventory_line_1" model="stock.inventory.line">
+            <field name="product_id" ref="product_child_frame"/>
+            <field name="inventory_id" ref="stock_inventory_0"/>
+            <field name="product_qty">15</field>
+            <field name="product_uom" ref="product.product_uom_unit"/>
+        </record>
+        <record id="stock_inventory_line_2" model="stock.inventory.line">
+            <field name="product_id" ref="product_adult_ready_bike"/>
+            <field name="inventory_id" ref="stock_inventory_0"/>
+            <field name="product_qty">27</field>
+            <field name="product_uom" ref="product.product_uom_unit"/>
+        </record>
+        <record id="stock_inventory_line_3" model="stock.inventory.line">
+            <field name="product_id" ref="product_child_ready_bike"/>
+            <field name="inventory_id" ref="stock_inventory_0"/>
+            <field name="product_qty">6</field>
+            <field name="product_uom" ref="product.product_uom_unit"/>
+        </record>
+        <record id="stock_inventory_line_4" model="stock.inventory.line">
+            <field name="product_id" ref="product_new_wheel"/>
+            <field name="inventory_id" ref="stock_inventory_0"/>
+            <field name="product_qty">20</field>
+            <field name="product_uom" ref="product.product_uom_unit"/>
+        </record>
+        <record id="stock_inventory_line_5" model="stock.inventory.line">
+            <field name="product_id" ref="product_second_hand_wheel"/>
+            <field name="inventory_id" ref="stock_inventory_0"/>
+            <field name="product_qty">48</field>
+            <field name="product_uom" ref="product.product_uom_unit"/>
+        </record>
+        <record id="stock_inventory_line_6" model="stock.inventory.line">
+            <field name="product_id" ref="product_good_lock"/>
+            <field name="inventory_id" ref="stock_inventory_0"/>
+            <field name="product_qty">27</field>
+            <field name="product_uom" ref="product.product_uom_unit"/>
+        </record>
+        <record id="stock_inventory_line_7" model="stock.inventory.line">
+            <field name="product_id" ref="product_bad_lock"/>
+            <field name="inventory_id" ref="stock_inventory_0"/>
+            <field name="product_qty">4</field>
+            <field name="product_uom" ref="product.product_uom_unit"/>
+        </record>
+
+        <function model="stock.inventory" name="action_confirm">
+            <function eval="[[('id', '=', ref('stock_inventory_0'))]]" model="stock.inventory" name="search"/>
+        </function>
+
+        <function model="stock.inventory" name="action_done">
+            <function eval="[[('id', '=', ref('stock_inventory_0'))]]" model="stock.inventory" name="search"/>
+        </function>
+    </data>
+</openerp>