Skip to content

Commit

Permalink
[FIX] hr_commission: Runbot warning fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-CA authored and jesusVMayor committed Aug 11, 2017
1 parent 1d04f0a commit 63cacc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hr_commission/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _get_employee(self):
if len(self.users) == 1 and len(self.users[0].employee_ids) == 1:
self.employee = self.users[0].employee_ids[0]

@api.constrains('agent_type', 'employee')
@api.constrains('agent_type', 'users')
def _check_employee(self):
if self.agent_type == 'salesman' and not self.employee:
raise exceptions.ValidationError(
Expand Down

0 comments on commit 63cacc9

Please sign in to comment.