[FIX] Purchase : Setting the value of payment term while creatying invoice from PO
lp bug: https://launchpad.net/bugs/438725 fixed bzr revid: jvo@tinyerp.com-20091003105353-4153l3coj3g30bvn
This commit is contained in:
parent
f04d6c24c9
commit
ecad1e7e6c
|
@ -329,7 +329,8 @@ class purchase_order(osv.osv):
|
|||
'journal_id': len(journal_ids) and journal_ids[0] or False,
|
||||
'origin': o.name,
|
||||
'invoice_line': il,
|
||||
'fiscal_position': o.partner_id.property_account_position.id
|
||||
'fiscal_position': o.partner_id.property_account_position.id,
|
||||
'payment_term':o.partner_id.property_payment_term and o.partner_id.property_payment_term.id or False,
|
||||
}
|
||||
inv_id = self.pool.get('account.invoice').create(cr, uid, inv, {'type':'in_invoice'})
|
||||
self.pool.get('account.invoice').button_compute(cr, uid, [inv_id], {'type':'in_invoice'}, set_total=True)
|
||||
|
|
Loading…
Reference in New Issue