From 39afa56669b137149939d7da7415a7078cf33450 Mon Sep 17 00:00:00 2001 From: "rha@tinyerp.com" <> Date: Fri, 28 Jan 2011 16:48:48 +0530 Subject: [PATCH 1/3] [Fix]: stock: Anglo-saxon Accounting does not use input stock account when purchase order invoicing control set to From picking lp bug: https://launchpad.net/bugs/708874 fixed bzr revid: rha@tinyerp.com-20110128111848-y3pqbmiu3l9sl0kh --- addons/stock/wizard/stock_invoice_onshipping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_invoice_onshipping.py b/addons/stock/wizard/stock_invoice_onshipping.py index c7eab1eef4d..37b3d09810f 100644 --- a/addons/stock/wizard/stock_invoice_onshipping.py +++ b/addons/stock/wizard/stock_invoice_onshipping.py @@ -127,7 +127,7 @@ class stock_invoice_onshipping(osv.osv_memory): res = picking_pool.action_invoice_create(cr, uid, active_ids, journal_id = onshipdata_obj[0]['journal_id'], group = onshipdata_obj[0]['group'], - type = None, + type = context.get('inv_type'), context=context) return res From f76e0fc097531b414fd1d7dd5cf13c6ef29ebfa3 Mon Sep 17 00:00:00 2001 From: "rha@tinyerp.com" <> Date: Tue, 1 Feb 2011 18:57:50 +0530 Subject: [PATCH 2/3] [Fix]: product: Pricelist with base price set to 0 lp bug: https://launchpad.net/bugs/710521 fixed bzr revid: rha@tinyerp.com-20110201132750-lvp43mmvs0kxqwif --- addons/product/pricelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 6899b673c70..9413ceebbe2 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -264,7 +264,7 @@ class product_pricelist(osv.osv): product_obj.price_get(cr, uid, [product_id], price_type.field)[product_id], round=False, context=context) - if price: + if price or price == 0.0: price_limit = price price = price * (1.0+(res['price_discount'] or 0.0)) From a54b002a98dc50c0c5f6036606f4cb6235055583 Mon Sep 17 00:00:00 2001 From: "rha@tinyerp.com" <> Date: Wed, 2 Feb 2011 17:47:37 +0530 Subject: [PATCH 3/3] [Fix]: stock: cancelling move availability doesn't change packing lp bug: https://launchpad.net/bugs/707031 fixed bzr revid: rha@tinyerp.com-20110202121737-y0mqh83pnetbwv9f --- addons/stock/stock.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index c942818a3d4..f0d6ca83b32 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1886,6 +1886,14 @@ class stock_move(osv.osv): @return: True """ self.write(cr, uid, ids, {'state': 'confirmed'}) + + # fix for bug lp:707031 + # called write of related picking because changing move availability does + # not trigger workflow of picking in order to change the state of picking + wf_service = netsvc.LocalService('workflow') + for move in self.browse(cr, uid, ids, context): + if move.picking_id: + wf_service.trg_write(uid, 'stock.picking', move.picking_id.id, cr) return True #