Skip to content

Commit

Permalink
exclude current doc while validating (#13450)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyashah115 authored and nabinhait committed Apr 2, 2018
1 parent e9ca5e8 commit d021e45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions erpnext/hr/doctype/salary_component/salary_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ def validate_abbr(self):
self.salary_component.split()]).upper()

self.salary_component_abbr = self.salary_component_abbr.strip()

self.salary_component_abbr = append_number_if_name_exists('Salary Component',
self.salary_component_abbr, 'salary_component_abbr', separator='_')
self.salary_component_abbr = append_number_if_name_exists('Salary Component', self.salary_component_abbr,
'salary_component_abbr', separator='_', filters={"name": ["!=", self.name]})

0 comments on commit d021e45

Please sign in to comment.