[FIX] 327394 : Corrected Payment Term Line notification on supplier invioce(ref:GPA)

bzr revid: jvo@tinyerp.com-20090317132802-dv317a771oi1y8w7
This commit is contained in:
Jay (Open ERP) 2009-03-17 18:58:02 +05:30
parent 9ee3e29d7b
commit 0931056444
1 changed files with 3 additions and 2 deletions

View File

@ -382,13 +382,14 @@ class account_invoice(osv.osv):
if not date_invoice :
date_invoice = time.strftime('%Y-%m-%d')
pterm_list= pt_obj.compute(cr, uid, payment_term_id, value=1, date_ref=date_invoice)
pterm_list = pt_obj.compute(cr, uid, payment_term_id, value=1, date_ref=date_invoice)
if pterm_list:
pterm_list = [line[0] for line in pterm_list]
pterm_list.sort()
res= {'value':{'date_due': pterm_list[-1]}}
else:
raise osv.except_osv(_('Data Insufficient !'), _('The Payment Term of Supplier does not have Payment Term Lines(Computation) defined !'))
return res
def onchange_invoice_line(self, cr, uid, ids, lines):