Fix Travis errors

This commit is contained in:
Pedro M. Baeza
2014-08-04 21:05:19 +02:00
parent b94bebee0e
commit b522f28ffb
23 changed files with 36 additions and 82 deletions

View File

@@ -19,10 +19,10 @@
#
##############################################################################
from openerp.osv import orm, fields
from openerp.osv import orm
class account_move(orm.Model):
class AccountMove(orm.Model):
_inherit = 'account.move'
def create(self, cr, uid, vals, context=None):
@@ -37,12 +37,12 @@ class account_move(orm.Model):
cr, uid, invoice, context=context)
vals = vals.copy()
vals['ref'] = ref
move_id = super(account_move, self).\
create(cr, uid, vals, context=context)
move_id = super(AccountMove, self).create(cr, uid, vals,
context=context)
return move_id
class account_invoice(orm.Model):
class AccountInvoice(orm.Model):
_inherit = 'account.invoice'
def _ref_from_invoice(self, cr, uid, invoice, context=None):
@@ -82,8 +82,8 @@ class account_invoice(orm.Model):
if (vals.get('supplier_invoice_reference') and not
vals.get('reference')):
vals['reference'] = vals['supplier_invoice_reference']
return super(account_invoice, self).create(cr, uid, vals,
context=context)
return super(AccountInvoice, self).create(cr, uid, vals,
context=context)
def write(self, cr, uid, ids, vals, context=None):
if vals.get('supplier_invoice_reference'):
@@ -93,9 +93,9 @@ class account_invoice(orm.Model):
if not invoice.reference:
locvals = vals.copy()
locvals['reference'] = vals['supplier_invoice_reference']
super(account_invoice, self).write(cr, uid, [invoice.id],
locvals, context=context)
super(AccountInvoice, self).write(cr, uid, [invoice.id],
locvals, context=context)
return True
else:
return super(account_invoice, self).write(cr, uid, ids, vals,
context=context)
return super(AccountInvoice, self).write(cr, uid, ids, vals,
context=context)