Quand je clique sur le bouton Mettre à jour les congés , une message d’erreur s’affiche.
App Versions
{
"erpnext": "4.29.1",
"frappe": "4.31.0",
"hrms": "2.30.0",
"payments": "2.4.5",
"webshop": "1.20.0"
}
Route
Form/Employment Contract/HR-EMP-CONT-00008
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 114, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 48, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 84, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1738, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/handler.py", line 349, in run_doc_method
response = doc.run_method(method)
File "apps/frappe/frappe/model/document.py", line 1010, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1384, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1366, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 1007, in fn
return method_object(*args, **kwargs)
File "apps/frappe/frappe/utils/typing_validations.py", line 30, in wrapper
return func(*args, **kwargs)
File "apps/hrms/hrms/hr/doctype/employment_contract/employment_contract.py", line 31, in update_leaves
allocate_earned_leaves(contract=self.name)
File "apps/erpnext/erpnext/__init__.py", line 147, in caller
return fn(*args, **kwargs)
TypeError: allocate_earned_leaves() got an unexpected keyword argument 'contract'
Request Data
{
"type": "POST",
"args": {
"docs": "{\"name\":\"HR-EMP-CONT-00008\",\"owner\":\"Administrator\",\"creation\":\"2024-08-28 11:21:05.157267\",\"modified\":\"2024-09-18 15:14:16.575009\",\"modified_by\":\"respadfin@yopmail.com\",\"docstatus\":0,\"idx\":0,\"naming_series\":\"HR-EMP-CONT-\",\"employee\":\"HR-EMP-00008\",\"employee_name\":\"Gardien D Gardien D\",\"company\":\"Restaurant SAKAFO\",\"contract_type\":\"Salarié\",\"designation\":\"gardiens\",\"date_of_joining\":\"2024-08-01\",\"weekly_working_hours\":48,\"monday\":8,\"tuesday\":8,\"wednesday\":8,\"thursday\":8,\"friday\":8,\"saturday\":0,\"sunday\":8,\"doctype\":\"Employment Contract\",\"leave_types\":[{\"name\":\"ekoo8etlit\",\"owner\":\"Administrator\",\"creation\":\"2024-08-28 11:21:05.157267\",\"modified\":\"2024-09-18 15:14:16.575009\",\"modified_by\":\"respadfin@yopmail.com\",\"docstatus\":0,\"idx\":2,\"leave_type\":\"RTT\",\"parent\":\"HR-EMP-CONT-00008\",\"parentfield\":\"leave_types\",\"parenttype\":\"Employment Contract\",\"doctype\":\"Employment Contract Leaves\"},{\"name\":\"ekoo1ur9rh\",\"owner\":\"Administrator\",\"creation\":\"2024-08-28 11:21:05.157267\",\"modified\":\"2024-09-18 15:14:16.575009\",\"modified_by\":\"respadfin@yopmail.com\",\"docstatus\":0,\"idx\":3,\"leave_type\":\"Congés payés\",\"parent\":\"HR-EMP-CONT-00008\",\"parentfield\":\"leave_types\",\"parenttype\":\"Employment Contract\",\"doctype\":\"Employment Contract Leaves\"}],\"__last_sync_on\":\"2024-09-19T06:11:40.038Z\"}",
"method": "update_leaves"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/run_doc_method",
"request_id": null
}
Response Data
{
"exception": "TypeError: allocate_earned_leaves() got an unexpected keyword argument 'contract'",
"exc_type": "TypeError",
"_exc_source": "hrms (app)"
}