'order.partner_id.property_account_tax' does not exists anymore -> now using 'fiscal position'

bzr revid: olt@tinyerp.com-20081217093731-f0gcwsi8356pzbv3
This commit is contained in:
Olivier Laurent 2008-12-17 10:37:31 +01:00
parent 8bc8d7e1eb
commit ddfaa6678f
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,9 @@ class pos_order(osv.osv):
res = dict(cr.fetchall())
for rec in self.browse(cr, uid, ids, context):
if rec.partner_id and rec.partner_id.property_account_tax:
if rec.partner_id \
and rec.partner_id.property_account_position \
and rec.partner_id.property_account_position.tax_ids:
res[rec.id] = res[rec.id] - rec.amount_tax
return res