Files
tryton/account.py
T
Jonathan Levy a5b48bc6d1 Add Python3 support
issue3211
review21741002
2016-02-29 22:38:24 +01:00

31 lines
951 B
Python

# 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.model import fields
from trytond.pyson import Eval
from trytond.pool import PoolMeta
__all__ = ['Configuration', 'Move']
class Configuration:
__metaclass__ = PoolMeta
__name__ = 'account.configuration'
asset_sequence = fields.Property(fields.Many2One('ir.sequence',
'Asset Reference Sequence', domain=[
('company', 'in', [Eval('context', {}).get('company', -1),
None]),
('code', '=', 'account.asset'),
], required=True))
class Move:
__metaclass__ = PoolMeta
__name__ = 'account.move'
@classmethod
def _get_origin(cls):
origins = super(Move, cls)._get_origin()
origins.append('account.asset')
origins.append('account.asset.line')
return origins