trytonpsk-staff_payroll_co/event_category.py
Camilo Sarmiento af0387c577 migrato to git
2020-04-15 17:38:42 -05:00

33 lines
1 KiB
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.pool import PoolMeta
from trytond.pyson import Eval
__all__ = ['EventCategory']
STATES_PAYROLL = {
'invisible': ~Eval('payroll_effect'),
}
class EventCategory:
__metaclass__ = PoolMeta
__name__ = 'staff.event_category'
payroll_effect = fields.Boolean('Payroll Effect')
discount_method = fields.Selection([
('', ''),
('uom', 'UoM'),
('fixed_amount', 'Fixed Amount'),
], 'Discount Method', select=True, states=STATES_PAYROLL)
wage_type = fields.Many2One('staff.wage_type', 'Wage Type',
states=STATES_PAYROLL)
discount_pay = fields.Boolean('Discount Pay', states=STATES_PAYROLL)
wage_type_discount = fields.Many2One('staff.wage_type', 'Wage Type Discount',
states=STATES_PAYROLL)
@classmethod
def __setup__(cls):
super(EventCategory, cls).__setup__()