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:
committed by
Víctor Martínez
parent
1132bdf92c
commit
ff232b1e3d
@@ -18,4 +18,4 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import product
|
||||
from . import product
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# Author: Guewen Baconnier
|
||||
# Copyright 2010-2012 Camptocamp SA
|
||||
@@ -18,24 +18,23 @@
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
#
|
||||
|
||||
|
||||
{
|
||||
"name" : "Immediately Usable Stock Quantity",
|
||||
"version" : "1.0",
|
||||
"depends" : ["product", "stock", ],
|
||||
"author" : "Camptocamp",
|
||||
"name": "Immediately Usable Stock Quantity",
|
||||
"version": "1.0",
|
||||
"depends": ["product", "stock", ],
|
||||
"author": "Camptocamp",
|
||||
"license": "AGPL-3",
|
||||
"description": """
|
||||
"description": """
|
||||
Compute the immediately usable stock.
|
||||
Immediately usable is computed : Quantity on Hand - Outgoing Stock.
|
||||
""",
|
||||
"website" : "http://tinyerp.com/module_account.html",
|
||||
"category" : "Generic Modules/Stock",
|
||||
"init_xml" : [],
|
||||
"demo_xml" : [],
|
||||
"update_xml" : ["product_view.xml", ],
|
||||
"active": False,
|
||||
"installable": False
|
||||
"website": "http://tinyerp.com/module_account.html",
|
||||
"category": "Generic Modules/Stock",
|
||||
"data": ["product_view.xml",
|
||||
],
|
||||
"active": False,
|
||||
"installable": True
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import decimal_precision as dp
|
||||
from openerp.addons 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:
|
||||
@@ -140,5 +140,3 @@ class ProductImmediatelyUsable(osv.osv):
|
||||
help="Quantity of products really available for sale." \
|
||||
"Computed as: Quantity On Hand - Outgoing."),
|
||||
}
|
||||
|
||||
ProductImmediatelyUsable()
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
<record model="ir.ui.view" id="view_normal_stock_active_qty_form">
|
||||
<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="stock.view_normal_procurement_locations_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="virtual_available" position="after">
|
||||
<newline/>
|
||||
@@ -25,7 +24,6 @@
|
||||
<record model="ir.ui.view" id="product_product_tree_view">
|
||||
<field name="name">product_immediately_usable.product_product_tree_view</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="product.product_product_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
|
||||
Reference in New Issue
Block a user