Migrate stock_available_immediately to 7.0

This commit is contained in:
Laurent Mignon (Acsone)
2013-12-16 13:50:33 +01:00
parent 9b7a545301
commit a9b1321c71
3 changed files with 6 additions and 6 deletions

View File

@@ -37,5 +37,5 @@ Immediately usable is computed : Quantity on Hand - Outgoing Stock.
"demo_xml" : [],
"update_xml" : ["product_view.xml", ],
"active": False,
"installable": False
"installable": True
}

View File

@@ -21,10 +21,10 @@
import decimal_precision as dp
from osv import fields, osv
from openerp.osv import orm, fields
class ProductImmediatelyUsable(osv.osv):
class product_immediately_usable(orm.Model):
"""
Inherit Product in order to add an "immediately usable quantity"
stock field
@@ -49,7 +49,7 @@ class ProductImmediatelyUsable(osv.osv):
field_names.append('qty_available')
field_names.append('outgoing_qty')
res = super(ProductImmediatelyUsable, self)._product_available(
res = super(product_immediately_usable, self)._product_available(
cr, uid, ids, field_names, arg, context)
if 'immediately_usable_qty' in field_names:
@@ -141,4 +141,4 @@ class ProductImmediatelyUsable(osv.osv):
"Computed as: Quantity On Hand - Outgoing."),
}
ProductImmediatelyUsable()
product_immediately_usable()

View File

@@ -13,7 +13,7 @@
<field name="name">product.normal.stock.active.qty.form.inherit</field>
<field name="model">product.product</field>
<field name="type">form</field>
<field name="inherit_id" ref="stock.view_normal_stock_property_form"/>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="virtual_available" position="after">
<newline/>