[IMP] procurement: Moved stock.warehouse.orderpoint sequence and data file to procure...
authoruco (OpenERP) <uco@tinyerp.com>
Fri, 28 May 2010 10:44:30 +0000 (16:14 +0530)
committeruco (OpenERP) <uco@tinyerp.com>
Fri, 28 May 2010 10:44:30 +0000 (16:14 +0530)
bzr revid: uco@tinyerp.com-20100528104430-opnf85w0osxhb3te

addons/mrp/__openerp__.py
addons/mrp/mrp_data.xml
addons/mrp/mrp_order_point.xml [deleted file]
addons/procurement/__openerp__.py
addons/procurement/procurement.py
addons/procurement/procurement_data.xml
addons/procurement/stock_orderpoint.xml [new file with mode: 0644]

index 45b35d5..58320eb 100644 (file)
@@ -76,7 +76,7 @@
         'report/mrp_report_view.xml',
         'report/mrp_production_order_view.xml',
     ],
-    'demo_xml': ['mrp_demo.xml', 'mrp_order_point.xml'],
+    'demo_xml': ['mrp_demo.xml'],
     'test': [
              'test/mrp_phantom_bom.yml',
              'test/mrp_production_order.yml',
index a7db710..64dd9f2 100644 (file)
             <field name="number_increment">1</field>
         </record>
         
-        
-        <record id="sequence_mrp_op_type" model="ir.sequence.type">
-            <field name="name">Stock orderpoint</field>
-            <field name="code">mrp.warehouse.orderpoint</field>
-        </record>
-        
-        <record id="sequence_mrp_op" model="ir.sequence">
-            <field name="name">Stock orderpoint</field>
-            <field name="code">mrp.warehouse.orderpoint</field>
-            <field name="prefix">OP/</field>
-            <field name="padding">5</field>
-            <field name="number_next">1</field>
-            <field name="number_increment">1</field>
-        </record>
-        
     </data>
 </openerp>
diff --git a/addons/mrp/mrp_order_point.xml b/addons/mrp/mrp_order_point.xml
deleted file mode 100644 (file)
index 4330782..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
-    <data noupdate="1">
-
-        <!-- Resource: stock.warehouse.orderpoint -->
-
-        <record id="stock_warehouse_orderpoint_0" model="stock.warehouse.orderpoint">
-            <field name="product_max_qty">20.0</field>
-            <field name="product_min_qty">5.0</field>
-            <field model="product.uom" name="product_uom" search="[]"/>
-            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
-            <field model="product.product" name="product_id" ref="product.product_product_mb1"/>
-            <field name="location_id" ref="stock.stock_location_stock"/>
-        </record>
-        <record id="stock_warehouse_orderpoint_1" model="stock.warehouse.orderpoint">
-            <field name="product_max_qty">50.0</field>
-            <field name="product_min_qty">10.0</field>
-            <field model="product.uom" name="product_uom" search="[]"/>
-            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
-            <field model="product.product" name="product_id" ref="product.product_product_cpu1"/>
-            <field name="location_id" ref="stock.stock_location_stock"/>
-        </record>
-        <record id="stock_warehouse_orderpoint_2" model="stock.warehouse.orderpoint">
-            <field name="product_max_qty">20.0</field>
-            <field name="product_min_qty">10.0</field>
-            <field model="product.uom" name="product_uom" search="[]"/>
-            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
-            <field model="product.product" name="product_id" ref="product.product_product_hdd1"/>
-            <field name="location_id" ref="stock.stock_location_stock"/>
-        </record>
-        <record id="stock_warehouse_orderpoint_3" model="stock.warehouse.orderpoint">
-            <field name="product_max_qty">50.0</field>
-            <field name="product_min_qty">10.0</field>
-            <field model="product.uom" name="product_uom" search="[]"/>
-            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
-            <field model="product.product" name="product_id" ref="product.product_product_fan"/>
-            <field name="location_id" ref="stock.stock_location_stock"/>
-        </record>
-        <record id="stock_warehouse_orderpoint_4" model="stock.warehouse.orderpoint">
-            <field name="product_max_qty">5.0</field>
-            <field name="product_min_qty">3.0</field>
-            <field model="product.uom" name="product_uom" search="[]"/>
-            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
-            <field model="product.product" name="product_id" ref="product.product_product_pc1"/>
-            <field name="location_id" ref="stock.stock_location_stock"/>
-        </record>
-        <record id="stock_warehouse_orderpoint_5" model="stock.warehouse.orderpoint">
-            <field name="product_max_qty">50.0</field>
-            <field name="product_min_qty">10.0</field>
-            <field model="product.uom" name="product_uom" search="[]"/>
-            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
-            <field model="product.product" name="product_id" ref="product.product_product_tow1"/>
-            <field name="location_id" ref="stock.stock_location_stock"/>
-        </record>
-    </data>
-</openerp>
index 7484735..8bd8d05 100644 (file)
@@ -44,7 +44,7 @@
         'process/procurement_process.xml',
         "company_view.xml",
     ],
-#    'demo_xml': [],
+    'demo_xml': ['stock_orderpoint.xml'],
     'installable': True,
     'active': False,
     'certificate': '',
index e315670..a65ea44 100644 (file)
@@ -485,7 +485,7 @@ class stock_warehouse_orderpoint(osv.osv):
         'active': lambda *a: 1,
         'logic': lambda *a: 'max',
         'qty_multiple': lambda *a: 1,
-        'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'mrp.warehouse.orderpoint') or '',
+        'name': lambda x,y,z,c: x.pool.get('ir.sequence').get(y,z,'stock.orderpoint') or '',
         'product_uom': lambda sel, cr, uid, context: context.get('product_uom', False),
         'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.warehouse.orderpoint', context=c)
     }
@@ -519,7 +519,7 @@ class stock_warehouse_orderpoint(osv.osv):
         if not default:
             default = {}
         default.update({
-            'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.warehouse.orderpoint') or '',
+            'name': self.pool.get('ir.sequence').get(cr, uid, 'stock.orderpoint') or '',
         })
         return super(stock_warehouse_orderpoint, self).copy(cr, uid, id, default, context)
     
index 9422e92..6a83d52 100644 (file)
             <field eval="'(False,)'" name="args"/>
         </record>
         
+        <record id="sequence_mrp_op_type" model="ir.sequence.type">
+            <field name="name">Stock orderpoint</field>
+            <field name="code">stock.orderpoint</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>
+        </record>
     </data>
 </openerp>
\ No newline at end of file
diff --git a/addons/procurement/stock_orderpoint.xml b/addons/procurement/stock_orderpoint.xml
new file mode 100644 (file)
index 0000000..4330782
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data noupdate="1">
+
+        <!-- Resource: stock.warehouse.orderpoint -->
+
+        <record id="stock_warehouse_orderpoint_0" model="stock.warehouse.orderpoint">
+            <field name="product_max_qty">20.0</field>
+            <field name="product_min_qty">5.0</field>
+            <field model="product.uom" name="product_uom" search="[]"/>
+            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
+            <field model="product.product" name="product_id" ref="product.product_product_mb1"/>
+            <field name="location_id" ref="stock.stock_location_stock"/>
+        </record>
+        <record id="stock_warehouse_orderpoint_1" model="stock.warehouse.orderpoint">
+            <field name="product_max_qty">50.0</field>
+            <field name="product_min_qty">10.0</field>
+            <field model="product.uom" name="product_uom" search="[]"/>
+            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
+            <field model="product.product" name="product_id" ref="product.product_product_cpu1"/>
+            <field name="location_id" ref="stock.stock_location_stock"/>
+        </record>
+        <record id="stock_warehouse_orderpoint_2" model="stock.warehouse.orderpoint">
+            <field name="product_max_qty">20.0</field>
+            <field name="product_min_qty">10.0</field>
+            <field model="product.uom" name="product_uom" search="[]"/>
+            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
+            <field model="product.product" name="product_id" ref="product.product_product_hdd1"/>
+            <field name="location_id" ref="stock.stock_location_stock"/>
+        </record>
+        <record id="stock_warehouse_orderpoint_3" model="stock.warehouse.orderpoint">
+            <field name="product_max_qty">50.0</field>
+            <field name="product_min_qty">10.0</field>
+            <field model="product.uom" name="product_uom" search="[]"/>
+            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
+            <field model="product.product" name="product_id" ref="product.product_product_fan"/>
+            <field name="location_id" ref="stock.stock_location_stock"/>
+        </record>
+        <record id="stock_warehouse_orderpoint_4" model="stock.warehouse.orderpoint">
+            <field name="product_max_qty">5.0</field>
+            <field name="product_min_qty">3.0</field>
+            <field model="product.uom" name="product_uom" search="[]"/>
+            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
+            <field model="product.product" name="product_id" ref="product.product_product_pc1"/>
+            <field name="location_id" ref="stock.stock_location_stock"/>
+        </record>
+        <record id="stock_warehouse_orderpoint_5" model="stock.warehouse.orderpoint">
+            <field name="product_max_qty">50.0</field>
+            <field name="product_min_qty">10.0</field>
+            <field model="product.uom" name="product_uom" search="[]"/>
+            <field model="stock.warehouse" name="warehouse_id" search="[]"/>
+            <field model="product.product" name="product_id" ref="product.product_product_tow1"/>
+            <field name="location_id" ref="stock.stock_location_stock"/>
+        </record>
+    </data>
+</openerp>