[FIX] purchase: fiscal_position from PO in invoice
lp bug: https://launchpad.net/bugs/666617 fixed bzr revid: dhs@tinyerp.com-20101027055522-g5tfw4nxfbx72qd5
This commit is contained in:
parent
c95603512e
commit
73d818f71a
|
@ -34,7 +34,7 @@ from osv.orm import browse_record, browse_null
|
|||
# Model definition
|
||||
#
|
||||
class purchase_order(osv.osv):
|
||||
|
||||
|
||||
def _calc_amount(self, cr, uid, ids, prop, unknow_none, unknow_dict):
|
||||
res = {}
|
||||
for order in self.browse(cr, uid, ids):
|
||||
|
@ -42,7 +42,7 @@ class purchase_order(osv.osv):
|
|||
for oline in order.order_line:
|
||||
res[order.id] += oline.price_unit * oline.product_qty
|
||||
return res
|
||||
|
||||
|
||||
def _amount_all(self, cr, uid, ids, field_name, arg, context=None):
|
||||
res = {}
|
||||
cur_obj=self.pool.get('res.currency')
|
||||
|
@ -369,7 +369,7 @@ 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.fiscal_position.id or 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,
|
||||
'company_id': o.company_id.id,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue