[MERGE] lp:~openerp-dev/openobject-addons/trunk-addons_issue_product-mdi/

bzr revid: stw@openerp.com-20120724115324-df6e10iry42n026b
This commit is contained in:
Stephane Wirtel 2012-07-24 13:53:24 +02:00
commit 2a9412f179
4 changed files with 8 additions and 5 deletions

View File

@ -25,7 +25,7 @@
"version" : "1.1",
"author" : "OpenERP SA",
'category': 'Sales Management',
"depends" : ["base", "process", "decimal_precision"],
"depends" : ["base", "process", "decimal_precision", "mail"],
"init_xml" : [],
"demo_xml" : ["product_demo.xml"],
"description": """

View File

@ -13,8 +13,8 @@
<separator orientation="vertical"/>
<filter string="Services" icon="terp-accessories-archiver" domain="[('type','=','service')]"/>
<filter string="Products" icon="terp-accessories-archiver" domain="['|',('type','=','product'),('type','=','consu')]" help="Both stockable and consumable products"/>
<filter string="To Sell" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
<filter name="filter_to_purchase" string="To Purchase" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
<filter string="Can be Sold" name="filter_to_sell" icon="terp-accessories-archiver-minus" domain="[('sale_ok','=',1)]"/>
<filter name="filter_to_purchase" string="Can be Purchased" icon="terp-accessories-archiver+" domain="[('purchase_ok', '=', 1)]"/>
<separator orientation="vertical"/>
<field name="categ_id" widget="selection" operator="child_of"/>
<group expand="0" string="Context...">

View File

@ -62,6 +62,9 @@ class stock_change_product_qty(osv.osv_memory):
res.update({'new_quantity': 1})
if 'product_id' in fields:
res.update({'product_id': product_id})
if 'location_id' in fields:
location_id = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'stock_location_stock', context=context)
res.update({'location_id': location_id and location_id.id or False})
return res
def change_product_qty(self, cr, uid, ids, context=None):

View File

@ -10,8 +10,8 @@
<group string="Select Quantity">
<field name="new_quantity" />
<field name="product_id" invisible="1"/>
<field name="location_id" />
<field name="prodlot_id" />
<field name="location_id" groups="stock.group_locations"/>
<field name="prodlot_id" groups="stock.group_tracking_lot"/>
</group>
<footer>
<button name="change_product_qty" string="_Apply" type="object" class="oe_highlight"/>