[FIX] Bug 358307 : Stock Picking currency problem of invoicing on differnt currency formats(ref:Raphaël Valyi,ANP)
bzr revid: jvo@tinyerp.com-20090421121423-1d5sukptxwki4ee2
This commit is contained in:
+2
-2
@@ -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) \
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user