diff --git a/invoice.py b/invoice.py index e72246b40d..5c6e7b3aaf 100644 --- a/invoice.py +++ b/invoice.py @@ -1,10 +1,9 @@ #This file is part of Tryton. The COPYRIGHT file at the top level #of this repository contains the full copyright notices and license terms. - -from trytond.osv import fields, OSV +from trytond.model import ModelView, ModelSQL, fields -class Invoice(OSV): +class Invoice(ModelSQL, ModelView): _name = 'account.invoice' def write(self, cursor, user, ids, vals, context=None): @@ -28,7 +27,7 @@ class Invoice(OSV): Invoice() -class InvoiceLine(OSV): +class InvoiceLine(ModelSQL, ModelView): _name = 'account.invoice.line' def __init__(self): diff --git a/purchase.py b/purchase.py index 66519b2c06..5249e15ba6 100644 --- a/purchase.py +++ b/purchase.py @@ -1,10 +1,9 @@ #This file is part of Tryton. The COPYRIGHT file at the top level #of this repository contains the full copyright notices and license terms. - -from trytond.osv import fields, OSV +from trytond.model import ModelView, ModelSQL, fields -class Purchase(OSV): +class Purchase(ModelSQL, ModelView): _name = 'purchase.purchase' invoice_lines = fields.Many2Many('account.invoice.line',