[FIX] Initialize the context if this one is none

lp bug: https://launchpad.net/bugs/324192 fixed

bzr revid: stephane@tinyerp.com-20090202071001-wb1k2nv0y3xhq0pg
This commit is contained in:
Stephane Wirtel 2009-02-02 08:10:01 +01:00
parent 3f62a9b476
commit 3f5276b901
1 changed files with 2 additions and 0 deletions

View File

@ -427,6 +427,8 @@ class account_invoice(osv.osv):
return ok
def button_reset_taxes(self, cr, uid, ids, context=None):
if not context:
context = {}
ait_obj = self.pool.get('account.invoice.tax')
for id in ids:
cr.execute("DELETE FROM account_invoice_tax WHERE invoice_id=%s", (id,))