Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3245 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

Hi,

  Inside the button click method you can search for employee records having same passport number and name .if such employee exists write the sequence number to our record.if doesnt exist assign a sequence number to it (like this self.env['ir.sequence'].next_by_code('sale.order', sequence_date=seq_date)

Avatar
Zrušit
Autor

Thank You, I was made the search but how can I write the sequence number to my existing records.

Autor

if exist it should be the same sequence number

Related Posts Odpovědi Zobrazení Aktivita
5
srp 18
16875
1
čvn 25
951
0
dub 21
2777
0
říj 19
4308
1
bře 15
3829