I created a new button (check employees data) for hr_employee to check if we have multi employees who have the same name and same passport number and I created a new field employee_code.
I want when the user clicks this button the function will check for the employees who have the same names and passports numbers and fill employee_code for these employees with the same number.
Eg:
name| passport number| employee code
emp1 123 10001
emp1 123 10001
emp2 5555 10002
emp1 0000 10003