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',
|
help='Salary monthly of person',
|
||||||
depends=['contract'], readonly=True), 'get_salary')
|
depends=['contract'], readonly=True), 'get_salary')
|
||||||
contract = fields.Function(fields.Many2One('staff.contract',
|
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')
|
position = fields.Function(fields.Many2One('staff.position', 'Position'), 'get_position')
|
||||||
curses = fields.Text('Curses')
|
curses = fields.Text('Curses')
|
||||||
career = fields.Text('Career')
|
career = fields.Text('Career')
|
||||||
|
@ -68,6 +68,10 @@ class Employee(metaclass=PoolMeta):
|
||||||
if contracts:
|
if contracts:
|
||||||
return contracts[0].id
|
return contracts[0].id
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def search_contract(cls, name, clause):
|
||||||
|
return
|
||||||
|
|
||||||
def get_salary(self, name=None):
|
def get_salary(self, name=None):
|
||||||
if self.contract:
|
if self.contract:
|
||||||
return self.contract.salary
|
return self.contract.salary
|
||||||
|
|
Loading…
Reference in New Issue