Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO:
TraceBack:
ERROR: test_make_shift_assignment (erpnext.hr.doctype.shift_assignment.test_shift_assignment.TestShiftAssignment)
Traceback (most recent call last):
File "/home/vishal/digi_frappe_sprint/apps/erpnext/erpnext/hr/doctype/shift_assignment/test_shift_assignment.py", line 23, in test_make_shift_assignment
"date": nowdate()
File "/home/vishal/digi_frappe_sprint/apps/frappe/frappe/model/document.py", line 224, in insert
self._validate_links()
File "/home/vishal/digi_frappe_sprint/apps/frappe/frappe/model/document.py", line 772, in _validate_links
frappe.LinkValidationError)
File "/home/vishal/digi_frappe_sprint/apps/frappe/frappe/init.py", line 380, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable)
File "/home/vishal/digi_frappe_sprint/apps/frappe/frappe/init.py", line 359, in msgprint
_raise_exception()
File "/home/vishal/digi_frappe_sprint/apps/frappe/frappe/init.py", line 319, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.LinkValidationError: Could not find Shift Type: Day Shift
Traceback (most recent call last):
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/erpnext/erpnext/hr/doctype/salary_structure/test_salary_structure.py", line 60, in test_salary_structure_deduction_based_on_gross_pay
ss = make_salary_slip(sal_struct.name, employee = emp)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/erpnext/erpnext/hr/doctype/salary_structure/salary_structure.py", line 172, in make_salary_slip
}, target_doc, postprocess, ignore_child_tables=True, ignore_permissions=ignore_permissions)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/model/mapper.py", line 122, in get_mapped_doc
postprocess(source_doc, target_doc)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/erpnext/erpnext/hr/doctype/salary_structure/salary_structure.py", line 162, in postprocess
target.run_method('process_salary_structure', for_preview=for_preview)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/model/document.py", line 803, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/model/document.py", line 1079, in composer
return composed(self, method, *args, **kwargs)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/model/document.py", line 1062, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/model/document.py", line 797, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py", line 929, in process_salary_structure
self.calculate_net_pay()
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py", line 297, in calculate_net_pay
self.calculate_component_amounts("earnings")
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py", line 322, in calculate_component_amounts
self.set_component_amounts_based_on_payment_days(component_type)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py", line 830, in set_component_amounts_based_on_payment_days
d.amount = self.get_amount_based_on_payment_days(d, joining_date, relieving_date)[0]
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/erpnext/erpnext/hr/doctype/salary_slip/salary_slip.py", line 691, in get_amount_based_on_payment_days
if frappe.get_cached_value("Salary Component", row.salary_component, "round_to_the_nearest_integer"):
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/init.py", line 728, in get_cached_value
doc = get_cached_doc(doctype, name)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/init.py", line 713, in get_cached_doc
doc = get_doc(*args, **kwargs)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/init.py", line 756, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/model/document.py", line 71, in get_doc
return controller(*args, **kwargs)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/model/document.py", line 106, in init
self.load_from_db()
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/model/document.py", line 149, in load_from_db
frappe.throw(("{0} {1} not found").format((self.doctype), self.name), frappe.DoesNotExistError)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/init.py", line 380, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable)
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/init.py", line 359, in msgprint
_raise_exception()
File "/home/neha/Frappeoffice/frappe_bloomstack_core/apps/frappe/frappe/init.py", line 319, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: Salary Component Basic Salary not found