From 4efb6155224312e4dc428e593b655eaf748f6d26 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Tue, 21 Apr 2009 17:44:23 +0530 Subject: [PATCH] =?UTF-8?q?[FIX]=20Bug=20358307=20:=20Stock=20Picking=20cu?= =?UTF-8?q?rrency=20problem=20of=20invoicing=20on=20differnt=20currency=20?= =?UTF-8?q?formats(ref:Rapha=C3=ABl=20Valyi,ANP)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bzr revid: jvo@tinyerp.com-20090421121423-1d5sukptxwki4ee2 --- addons/crm/crm.py | 4 ++-- addons/purchase/stock.py | 6 ++++++ addons/sale/stock.py | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index a8bea6951d2..335cccda516 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -273,8 +273,8 @@ class crm_case_rule(osv.osv): def _check(self, cr, uid, ids=False, context={}): ''' - Function called by the sceduler to proccess cases for date actions - Only works on not done and canceled cases + Function called by the scheduler to process cases for date actions + Only works on not done and cancelled cases ''' cr.execute('select * from crm_case \ where (date_action_last<%s or date_action_last is null) \ diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py index d3c8ba95a65..df74b52036a 100644 --- a/addons/purchase/stock.py +++ b/addons/purchase/stock.py @@ -46,6 +46,12 @@ class stock_picking(osv.osv): _defaults = { 'purchase_id': lambda *a: False, } + + def get_currency_id(self, cursor, user, picking): + if picking.purchase_id: + return picking.purchase_id.pricelist_id.currency_id.id + else: + return super(stock_picking, self).get_currency_id(cursor, user, picking) def _get_comment_invoice(self, cursor, user, picking): if picking.purchase_id and picking.purchase_id.notes: diff --git a/addons/sale/stock.py b/addons/sale/stock.py index d66db3fb9ef..9e3cd377f03 100644 --- a/addons/sale/stock.py +++ b/addons/sale/stock.py @@ -44,7 +44,8 @@ class stock_picking(osv.osv): def get_currency_id(self, cursor, user, picking): if picking.sale_id: return picking.sale_id.pricelist_id.currency_id.id - return False + else: + return super(stock_picking, self).get_currency_id(cursor, user, picking) def _get_payment_term(self, cursor, user, picking): res = {}