Remove wrong default
This commit is contained in:
parent
b9d0402deb
commit
61ae8cb4f5
|
@ -0,0 +1,29 @@
|
||||||
|
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/build
|
||||||
|
/dist
|
||||||
|
*egg-info
|
||||||
|
|
||||||
|
|
||||||
|
/node_modules
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
package-lock*
|
||||||
|
|
||||||
|
/__pycache__
|
||||||
|
/app/__pycache__
|
||||||
|
/app/commons/__pycache__
|
16
employee.py
16
employee.py
|
@ -3,7 +3,6 @@
|
||||||
from trytond.model import fields, Unique
|
from trytond.model import fields, Unique
|
||||||
from trytond.pool import PoolMeta, Pool
|
from trytond.pool import PoolMeta, Pool
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from sql import Table, Null
|
|
||||||
|
|
||||||
__all__ = ['Employee']
|
__all__ = ['Employee']
|
||||||
|
|
||||||
|
@ -14,16 +13,11 @@ class Employee:
|
||||||
active = fields.Boolean('Active')
|
active = fields.Boolean('Active')
|
||||||
code = fields.Char('Code', size=None, select=True)
|
code = fields.Char('Code', size=None, select=True)
|
||||||
salary = fields.Function(fields.Numeric('Salary', digits=(16, 2),
|
salary = fields.Function(fields.Numeric('Salary', digits=(16, 2),
|
||||||
help='Salary monthly of person',
|
help='Salary monthly of person',
|
||||||
depends=['contract'], readonly=True), 'get_salary')
|
depends=['contract'], readonly=True), 'get_salary')
|
||||||
# salary = fields.Numeric('Salary', digits=(16, 2),
|
|
||||||
# help='Salary monthly of person',
|
|
||||||
# depends=['contract'])
|
|
||||||
contract = fields.Function(fields.Many2One('staff.contract',
|
contract = fields.Function(fields.Many2One('staff.contract',
|
||||||
'Contract'), 'get_contract')
|
'Contract'), 'get_contract')
|
||||||
position = fields.Function(fields.Many2One('staff.position', 'Position'), 'get_position')
|
position = fields.Function(fields.Many2One('staff.position', 'Position'), 'get_position')
|
||||||
# position = fields.Many2One('staff.position', 'Position',
|
|
||||||
# select=True, readonly=True)
|
|
||||||
curses = fields.Text('Curses')
|
curses = fields.Text('Curses')
|
||||||
career = fields.Text('Career')
|
career = fields.Text('Career')
|
||||||
contracting_state = fields.Selection([
|
contracting_state = fields.Selection([
|
||||||
|
@ -61,10 +55,6 @@ class Employee:
|
||||||
def default_active():
|
def default_active():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def default_contracting_state():
|
|
||||||
return 'in_process'
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def default_company():
|
def default_company():
|
||||||
return Transaction().context.get('company')
|
return Transaction().context.get('company')
|
||||||
|
|
Loading…
Reference in New Issue