From 533d176df743896eacec44bd39cf50b25a187522 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Tue, 22 Oct 2013 17:29:58 +0200 Subject: [PATCH] [FIX] warning: fixed dependancies and product_id_change() method bzr revid: qdp-launchpad@openerp.com-20131022152958-2w7xpn0fox88m5w2 --- addons/warning/__openerp__.py | 2 +- addons/warning/warning.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/warning/__openerp__.py b/addons/warning/__openerp__.py index e44b9624251..887e43b939c 100644 --- a/addons/warning/__openerp__.py +++ b/addons/warning/__openerp__.py @@ -32,7 +32,7 @@ Warning messages can be displayed for objects like sale order, purchase order, picking and invoice. The message is triggered by the form's onchange event. """, 'author': 'OpenERP SA', - 'depends': ['base', 'sale', 'purchase'], + 'depends': ['base', 'sale_stock', 'purchase'], 'data': ['warning_view.xml'], 'demo': [], 'installable': True, diff --git a/addons/warning/warning.py b/addons/warning/warning.py index aaf15d350bd..fe3b93dff0a 100644 --- a/addons/warning/warning.py +++ b/addons/warning/warning.py @@ -170,8 +170,6 @@ class stock_picking(osv.osv): return {'value': result.get('value',{}), 'warning':warning} -# FIXME:(class stock_picking_in and stock_picking_out) this is a temporary workaround because of a framework bug (ref: lp:996816). -# It should be removed as soon as the bug is fixed class stock_picking(osv.osv): _inherit = 'stock.picking' @@ -218,7 +216,7 @@ class sale_order_line(osv.osv): def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True, date_order=False, packaging=False, - fiscal_position=False, flag=False, context=None): + fiscal_position=False, flag=False, warehouse_id=False, context=None): warning = {} if not product: return {'value': {'th_weight' : 0, 'product_packaging': False, @@ -239,7 +237,7 @@ class sale_order_line(osv.osv): result = super(sale_order_line, self).product_id_change( cr, uid, ids, pricelist, product, qty, uom, qty_uos, uos, name, partner_id, - lang, update_tax, date_order, packaging, fiscal_position, flag, context=context) + lang, update_tax, date_order, packaging, fiscal_position, flag, warehouse_id=warehouse_id, context=context) if result.get('warning',False): warning['title'] = title and title +' & '+result['warning']['title'] or result['warning']['title']