Files
tryton/trytond/tests/trigger.py
T

28 lines
624 B
Python
Raw Normal View History

2014-12-02 12:54:01 +01:00
# 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 ModelSQL, fields
2012-09-24 22:16:53 +02:00
__all__ = [
2013-03-06 17:00:34 +01:00
'Triggered', 'TriggerAction',
2012-09-24 22:16:53 +02:00
]
TRIGGER_LOGS = []
2012-04-01 23:08:15 +02:00
class Triggered(ModelSQL):
'Triggered'
2012-09-24 22:16:53 +02:00
__name__ = 'test.triggered'
name = fields.Char('Name')
2013-03-06 17:00:34 +01:00
class TriggerAction(ModelSQL):
'Trigger Action Model'
__name__ = 'test.trigger_action'
2012-09-24 22:16:53 +02:00
@staticmethod
def trigger(records, trigger):
'''
Trigger function for test
'''
2012-09-24 22:16:53 +02:00
TRIGGER_LOGS.append((records, trigger))