[IMP] move the procure method in product to procurement
bzr revid: rma@tinyerp.com-20120928124131-7wrkholp6ltfk23g
This commit is contained in:
parent
afebb45f23
commit
b765e45c81
|
@ -630,6 +630,10 @@ class product_product(osv.osv):
|
|||
'type': fields.selection([('product','Stockable Product'),('consu', 'Consumable'),('service','Service')], 'Product Type', required=True, help="Will change the way procurements are processed. Consumable are product where you don't manage stock."),
|
||||
'procure_method': fields.selection([('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], 'Procurement Method', required=True, help="'Make to Stock': When needed, take from the stock or wait until re-supplying. 'Make to Order': When needed, purchase or produce for the procurement request."),
|
||||
}
|
||||
_defaults = {
|
||||
'procure_method': lambda *a: 'make_to_stock',
|
||||
}
|
||||
|
||||
|
||||
product_product()
|
||||
|
||||
|
|
|
@ -1,15 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="product.product_product_1" model="product.product">
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
<record id="product.product_product_2" model="product.product">
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
<record id="product.product_product_3" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_4" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
|
||||
</record>
|
||||
<record id="product.product_product_5" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_6" model="product.product">
|
||||
|
@ -26,6 +36,7 @@
|
|||
|
||||
<record id="product.product_product_9" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_10" model="product.product">
|
||||
|
@ -38,6 +49,7 @@
|
|||
|
||||
<record id="product.product_product_12" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_13" model="product.product">
|
||||
|
@ -54,6 +66,7 @@
|
|||
|
||||
<record id="product.product_product_16" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_17" model="product.product">
|
||||
|
@ -62,14 +75,12 @@
|
|||
|
||||
<record id="product.product_product_18" model="product.product">
|
||||
<field name="type">product</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_18" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_19" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_20" model="product.product">
|
||||
|
@ -102,6 +113,7 @@
|
|||
|
||||
<record id="product.product_product_27" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_28" model="product.product">
|
||||
|
@ -126,6 +138,7 @@
|
|||
|
||||
<record id="product.product_product_33" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_34" model="product.product">
|
||||
|
@ -142,6 +155,7 @@
|
|||
|
||||
<record id="product.product_product_37" model="product.product">
|
||||
<field name="type">product</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_38" model="product.product">
|
||||
|
@ -152,6 +166,10 @@
|
|||
<field name="type">product</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_44" model="product.product">
|
||||
<field name="procure_method">make_to_order</field>
|
||||
</record>
|
||||
|
||||
<record id="product.product_product_45" model="product.product">
|
||||
<field name="type">product</field>
|
||||
</record>
|
||||
|
@ -167,7 +185,7 @@
|
|||
<record id="product.product_product_48" model="product.product">
|
||||
<field name="type">product</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
@ -303,6 +303,32 @@
|
|||
<button string="Request Procurement" name="%(act_make_procurement)d" type="action"/>
|
||||
<button string="Orderpoints" name="%(product_open_orderpoint)d" type="action"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='supply_method']" position="before">
|
||||
<field name="procure_method" groups="base.group_user"/>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='procurement_help']" position="inside">
|
||||
<group name="procurement_help" class="oe_grey" col="1" groups="base.group_user">
|
||||
<p attrs="{'invisible': [('type','<>','service'),('procure_method','<>','make_to_stock')]}">
|
||||
When you sell this service, nothing special will be trigered
|
||||
to deliver the customer, as you set the procurement method as
|
||||
'Make to Stock'.
|
||||
</p>
|
||||
<p attrs="{'invisible': [('type','<>','product'),('procure_method','<>','make_to_stock')]}">
|
||||
When you sell this product, OpenERP will <b>use the available
|
||||
inventory</b> for the delivery order.
|
||||
<br/><br/>
|
||||
If there are not enough quantities available, the delivery order
|
||||
will wait for new products. To fulfill the inventory, you should
|
||||
create others rules like orderpoints.
|
||||
</p>
|
||||
<p attrs="{'invisible': [('type','<>','consu'),('procure_method','<>','make_to_stock')]}">
|
||||
When you sell this product, a delivery order will be created.
|
||||
OpenERP will consider that the <b>required quantities are always
|
||||
available</b> as it's a consumable (as a result of this, the quantity
|
||||
on hand may become negative).
|
||||
</p>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -358,7 +358,6 @@ class product_template(osv.osv):
|
|||
'sale_delay': lambda *a: 7,
|
||||
'produce_delay': lambda *a: 1,
|
||||
'purchase_ok': lambda *a: 1,
|
||||
'procure_method': lambda *a: 'make_to_stock',
|
||||
'uom_id': _get_uom_id,
|
||||
'uom_po_id': _get_uom_id,
|
||||
'uos_coeff' : lambda *a: 1.0,
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
<field name="standard_price">20.5</field>
|
||||
<field name="list_price">30.75</field>
|
||||
<field name="type">service</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="uom_id" ref="product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product_uom_hour"/>
|
||||
|
@ -84,7 +83,6 @@
|
|||
<field name="standard_price">25.5</field>
|
||||
<field name="list_price">38.25</field>
|
||||
<field name="type">service</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="uom_id" ref="product_uom_hour"/>
|
||||
<field name="uom_po_id" ref="product_uom_hour"/>
|
||||
|
@ -98,7 +96,6 @@
|
|||
<field name="list_price">450.0</field>
|
||||
<field name="standard_price">300.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
|
@ -116,8 +113,8 @@ HDD SH-1</field>
|
|||
<field name="standard_price">500.0</field>
|
||||
<field name="list_price">750.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="sale_delay">4.0</field>
|
||||
|
@ -134,7 +131,6 @@ HDD SH-1</field>
|
|||
<field name="standard_price">600.0</field>
|
||||
<field name="list_price">900.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
|
@ -179,7 +175,6 @@ HDD SH-1</field>
|
|||
<field name="standard_price">10.0</field>
|
||||
<field name="list_price">13.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
</record>
|
||||
|
@ -210,7 +205,6 @@ HDD SH-1</field>
|
|||
<field name="standard_price">18</field>
|
||||
<field name="list_price">12.50</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
</record>
|
||||
|
@ -251,7 +245,6 @@ HDD SH-1</field>
|
|||
<field name="standard_price">20.0</field>
|
||||
<field name="list_price">25.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
|
@ -273,7 +266,6 @@ HDD SH-1</field>
|
|||
<field name="standard_price">1020.0</field>
|
||||
<field name="list_price">1150.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
|
@ -285,7 +277,6 @@ HDD SH-1</field>
|
|||
<field name="standard_price">1100.0</field>
|
||||
<field name="list_price">1250.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
|
@ -376,7 +367,6 @@ QWERTY keyboard</field>
|
|||
<field name="standard_price">3300.0</field>
|
||||
<field name="list_price">3645.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
|
@ -443,7 +433,6 @@ QWERTY keyboard</field>
|
|||
<field name="standard_price">60.0</field>
|
||||
<field name="list_price">65.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="description">Headset for laptop PC with USB connector.</field>
|
||||
|
@ -489,7 +478,6 @@ QWERTY keyboard</field>
|
|||
<field name="standard_price">4258.0</field>
|
||||
<field name="list_price">4410.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
<field name="description">All in one hi-speed printer with fax and scanner.</field>
|
||||
|
@ -569,7 +557,6 @@ QWERTY keyboard</field>
|
|||
<field name="standard_price">155.0</field>
|
||||
<field name="list_price">173.0</field>
|
||||
<field name="type">consu</field>
|
||||
<field name="procure_method">make_to_order</field>
|
||||
<field name="supply_method">produce</field>
|
||||
<field name="uom_id" ref="product_uom_unit"/>
|
||||
<field name="uom_po_id" ref="product_uom_unit"/>
|
||||
|
|
|
@ -105,18 +105,17 @@
|
|||
<page string="Procurements" groups="base.group_user">
|
||||
<group name="procurement">
|
||||
<group>
|
||||
<!-- <field name="procure_method" groups="base.group_user"/> -->
|
||||
<field name="supply_method" groups="base.group_user" invisible="1"/>
|
||||
<field name="cost_method" groups="product.group_costing_method"/>
|
||||
<field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
|
||||
</group>
|
||||
<group name="procurement_help" class="oe_grey" col="1" groups="base.group_user">
|
||||
<p attrs="{'invisible': [('type','<>','service'),('procure_method','<>','make_to_stock')]}">
|
||||
<p attrs="{'invisible': [('type','<>','service')]}">
|
||||
When you sell this service, nothing special will be trigered
|
||||
to deliver the customer, as you set the procurement method as
|
||||
'Make to Stock'.
|
||||
</p>
|
||||
<p attrs="{'invisible': [('type','<>','product'),('procure_method','<>','make_to_stock')]}">
|
||||
<p attrs="{'invisible': [('type','<>','product')]}">
|
||||
When you sell this product, OpenERP will <b>use the available
|
||||
inventory</b> for the delivery order.
|
||||
<br/><br/>
|
||||
|
@ -124,7 +123,7 @@
|
|||
will wait for new products. To fulfill the inventory, you should
|
||||
create others rules like orderpoints.
|
||||
</p>
|
||||
<p attrs="{'invisible': [('type','<>','consu'),('procure_method','<>','make_to_stock')]}">
|
||||
<p attrs="{'invisible': [('type','<>','consu')]}">
|
||||
When you sell this product, a delivery order will be created.
|
||||
OpenERP will consider that the <b>required quantities are always
|
||||
available</b> as it's a consumable (as a result of this, the quantity
|
||||
|
@ -719,7 +718,6 @@
|
|||
</group>
|
||||
<group string="Procurement">
|
||||
<field name="type"/>
|
||||
<!-- <field name="procure_method"/> -->
|
||||
<field name="supply_method"/>
|
||||
</group>
|
||||
|
||||
|
|
Loading…
Reference in New Issue