mirror of
https://bitbucket.org/presik/trytonpsk-staff_payroll_co.git
synced 2023-12-14 06:42:56 +01:00
62 lines
2.2 KiB
Python
62 lines
2.2 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.pool import PoolMeta
|
||
|
from trytond.model import fields
|
||
|
from trytond.pyson import Eval
|
||
|
|
||
|
|
||
|
__all__ = ['WageType']
|
||
|
|
||
|
ROUND_AMOUNTS = [
|
||
|
('', ''),
|
||
|
('above_amount', 'Above Amount'),
|
||
|
('under_amount', 'Under Amount'),
|
||
|
('automatic', 'Automatic'),
|
||
|
]
|
||
|
|
||
|
|
||
|
class WageType:
|
||
|
__metaclass__ = PoolMeta
|
||
|
__name__ = 'staff.wage_type'
|
||
|
minimal_amount = fields.Numeric('Minimal Amount')
|
||
|
month_application = fields.Boolean('Month Application')
|
||
|
apply_special_salary = fields.Boolean('Apply Special Salary')
|
||
|
adjust_days_worked = fields.Boolean('Adjust Days Worked',
|
||
|
help='If is true, rounded month work days on payroll to 30 indeed'
|
||
|
' if month has 31 days, or rounded to 15 indeed the biweekly'
|
||
|
' pay has 16 days')
|
||
|
round_amounts = fields.Selection(ROUND_AMOUNTS, 'Rounds amounts', help='Approximates the highest value in hundreds')
|
||
|
# limit_days = fields.Numeric('Limit Days', states={
|
||
|
# 'invisible': Eval('type_concept') != 'special',
|
||
|
# 'required': Eval('type_concept') == 'special',
|
||
|
# })
|
||
|
|
||
|
@classmethod
|
||
|
def __setup__(cls):
|
||
|
super(WageType, cls).__setup__()
|
||
|
new_sel = [
|
||
|
('health', 'Health'),
|
||
|
('retirement', 'Retirement'),
|
||
|
('risk', 'Risk'),
|
||
|
('box_family', 'Box Family'),
|
||
|
('commission', 'Commission'),
|
||
|
('bonus_service', 'Bonus Service'),
|
||
|
('food', 'Food'),
|
||
|
('unemployment', 'Unemployment'),
|
||
|
('allowance', 'Allowance'),
|
||
|
('transport', 'Transport'),
|
||
|
('interest', 'Interest'),
|
||
|
('bonus', 'Bonus'),
|
||
|
('tax', 'Tax'),
|
||
|
('holidays', 'Holidays'),
|
||
|
('syndicate', 'Syndicate'),
|
||
|
('fsp', 'FSP'),
|
||
|
('sena', 'SENA'),
|
||
|
('icbf', 'ICBF'),
|
||
|
('acquired_product', 'Acquired Product'),
|
||
|
('loan', 'Loan'),
|
||
|
('advance', 'Advance'),
|
||
|
]
|
||
|
if new_sel not in cls.type_concept.selection:
|
||
|
cls.type_concept.selection.extend(new_sel)
|