Migrate to python 3
This commit is contained in:
parent
e4461e24cf
commit
b48f3318d9
3
sale.py
3
sale.py
@ -18,8 +18,7 @@ __all__ = ['Sale', 'SalePaymentForm', 'WizardSalePayment',
|
||||
'WizardSaleReconcile']
|
||||
|
||||
|
||||
class Sale:
|
||||
__metaclass__ = PoolMeta
|
||||
class Sale(metaclass=PoolMeta):
|
||||
__name__ = 'sale.sale'
|
||||
payments = fields.One2Many('account.statement.line', 'sale', 'Payments')
|
||||
paid_amount = fields.Function(fields.Numeric('Paid Amount', readonly=True),
|
||||
|
3
setup.py
3
setup.py
@ -7,10 +7,7 @@ from setuptools import setup
|
||||
import re
|
||||
import os
|
||||
import io
|
||||
try:
|
||||
from configparser import ConfigParser
|
||||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
|
||||
MODULE2PREFIX = {}
|
||||
|
||||
|
@ -12,14 +12,12 @@ __all__ = ['Journal', 'Statement', 'Line', 'OpenStatementStart',
|
||||
'CloseStatementDone', 'CloseStatement']
|
||||
|
||||
|
||||
class Journal:
|
||||
__metaclass__ = PoolMeta
|
||||
class Journal(metaclass=PoolMeta):
|
||||
__name__ = 'account.statement.journal'
|
||||
devices = fields.One2Many('sale.device', 'journal', 'Devices')
|
||||
|
||||
|
||||
class Statement:
|
||||
__metaclass__ = PoolMeta
|
||||
class Statement(metaclass=PoolMeta):
|
||||
__name__ = 'account.statement'
|
||||
users = fields.Function(fields.One2Many('res.user', None, 'Users'),
|
||||
'get_users', searcher='search_users')
|
||||
@ -58,8 +56,7 @@ class Statement:
|
||||
return [('id', 'in', query)]
|
||||
|
||||
|
||||
class Line:
|
||||
__metaclass__ = PoolMeta
|
||||
class Line(metaclass=PoolMeta):
|
||||
__name__ = 'account.statement.line'
|
||||
sale = fields.Many2One('sale.sale', 'Sale', ondelete='RESTRICT')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user