Commit 777e791b authored by agb80's avatar agb80

Removed account_payment_term calculate override

No longer need the account_payment_term calculate method override
and was crashing server when computing invoices
parent bec33174
Pipeline #199 failed with stage
......@@ -106,24 +106,6 @@ def conv_ascii(text):
return text
class account_payment_term(orm.Model):
_inherit = "account.payment.term"
def compute(self, cr, uid, ids, value, date_ref=False, context=None):
if context is None:
context = {}
if date_ref:
try:
date_ref = time.strftime(
'%Y-%m-%d', time.strptime(date_ref, '%Y-%m-%d %H:%M:%S')
)
except:
pass
return super(account_payment_term, self).compute(
cr, uid, ids, value, date_ref, context=context
)
class account_invoice(orm.Model):
_inherit = 'account.invoice'
......@@ -163,7 +145,7 @@ class account_invoice(orm.Model):
test = 'code=%s'
cr.execute(
'SELECT id FROM ir_sequence WHERE ' +
test+' AND active=%s LIMIT 1', (sequence_str, True))
test + ' AND active=%s LIMIT 1', (sequence_str, True))
res2 = cr.dictfetchone()
sequence_id = res2 and res2['id'] or False
res[invoice.id] = sequence_id
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment