[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:
Jay (Open ERP)
2009-04-21 17:44:23 +05:30
parent 3f49360d12
commit 4efb615522
3 changed files with 10 additions and 3 deletions
+2 -2
View File
@@ -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) \
+6
View File
@@ -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:
+2 -1
View File
@@ -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 = {}