minor fix searcher contract
This commit is contained in:
parent
e0a39863e4
commit
6dea21cafc
|
@ -13,7 +13,7 @@ class Employee(metaclass=PoolMeta):
|
|||
help='Salary monthly of person',
|
||||
depends=['contract'], readonly=True), 'get_salary')
|
||||
contract = fields.Function(fields.Many2One('staff.contract',
|
||||
'Contract'), 'get_contract')
|
||||
'Contract'), 'get_contract', searcher='search_contract')
|
||||
position = fields.Function(fields.Many2One('staff.position', 'Position'), 'get_position')
|
||||
curses = fields.Text('Curses')
|
||||
career = fields.Text('Career')
|
||||
|
@ -68,6 +68,10 @@ class Employee(metaclass=PoolMeta):
|
|||
if contracts:
|
||||
return contracts[0].id
|
||||
|
||||
@classmethod
|
||||
def search_contract(cls, name, clause):
|
||||
return
|
||||
|
||||
def get_salary(self, name=None):
|
||||
if self.contract:
|
||||
return self.contract.salary
|
||||
|
|
Loading…
Reference in New Issue