Skip to content

Commit

Permalink
[fix] hr_employee_id use deprecated sequence.get_id() (OCA#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
simahawk authored and mtelahun committed Jul 14, 2021
1 parent 20e82e2 commit 73067a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hr_employee_id/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Employee ID',
'version': '10.0.1.0.0',
'version': '10.0.1.0.1',
'license': 'AGPL-3',
'category': 'Generic Modules/Human Resources',
'author': 'Michael Telahun Makonnen, '
Expand Down
3 changes: 1 addition & 2 deletions hr_employee_id/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def _generate_identification_id(self):
company = self.env.user.company_id
employee_id = False
if company.employee_id_gen_method == 'sequence':
employee_id = self.env['ir.sequence'].get_id(
company.employee_id_sequence.id)
employee_id = company.employee_id_sequence.next_by_id()
elif company.employee_id_gen_method == 'random':
employee_id_random_digits = company.employee_id_random_digits
tries = 0
Expand Down

0 comments on commit 73067a7

Please sign in to comment.