mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Migrate stock_available_immediately to 7.0
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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/>
|
||||
|
||||
Reference in New Issue
Block a user