trytond-babi_reports_accoun.../model.py
Albert Cervera i Areny c0cc3bfa1d Migrate to python 3
2018-08-24 12:18:50 +02:00

20 lines
571 B
Python

# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
from trytond.pool import PoolMeta
__all__ = ['Model']
class Model(metaclass=PoolMeta):
__name__ = 'ir.model'
@classmethod
def __register__(cls, module_name):
super(Model, cls).__register__(module_name)
models = cls.search([('model', 'in', ['account.invoice',
'account.invoice.line'])])
if models:
cls.write(models, {
'babi_enabled': True
})