Bonjour @toussaint,
Est-il possible d’avoir le message d’erreur complet en utilisant le bouton « Copier l’erreur dans le presse-papier » ? Je n’arrive pas à reproduire le problème.
Merci,
Corentin
App Versions
{
"erpnext": "4.29.1",
"frappe": "4.31.0",
"hrms": "2.30.0",
"payments": "2.4.5",
"webshop": "1.20.0"
}
Route
Form/Salary Slip/Sal Slip/HR-EMP-00001/00001
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/utils/typing_validations.py", line 30, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/desk/form/save.py", line 37, in savedocs
doc.submit()
File "apps/frappe/frappe/utils/typing_validations.py", line 30, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1093, in submit
return self._submit()
File "apps/frappe/frappe/model/document.py", line 1076, in _submit
return self.save()
File "apps/frappe/frappe/model/document.py", line 338, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 411, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1176, in run_post_save_methods
self.run_method("on_submit")
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/hrms/hrms/payroll/doctype/salary_slip/salary_slip.py", line 194, in on_submit
self.email_salary_slip()
File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip.py", line 1857, in email_salary_slip
password = generate_password_for_pdf(payroll_settings.password_policy, self.employee)
File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip.py", line 2085, in generate_password_for_pdf
return policy_template.format(**employee.as_dict())
ValueError: expected '}' before end of string
Request Data
{
"type": "POST",
"args": {
"doc": "{\"name\":\"Sal Slip/HR-EMP-00008/00001\",\"owner\":\"Administrator\",\"creation\":\"2024-08-28 16:43:44.607105\",\"modified\":\"2024-09-03 13:32:18.034903\",\"modified_by\":\"Administrator\",\"docstatus\":0,\"idx\":4,\"employee\":\"HR-EMP-00008\",\"employee_name\":\"Gardien D\",\"designation\":\"gardiens\",\"posting_date\":\"2024-08-01\",\"status\":\"Draft\",\"company\":\"Restaurant SAKAFO\",\"currency\":\"MGA\",\"exchange_rate\":1,\"payroll_frequency\":\"Monthly\",\"start_date\":\"2024-08-01\",\"end_date\":\"2024-08-31\",\"salary_structure\":\"Moins 350000\",\"mode_of_payment\":\"Cash\",\"salary_slip_based_on_timesheet\":0,\"deduct_tax_for_unclaimed_employee_benefits\":0,\"deduct_tax_for_unsubmitted_tax_exemption_proof\":0,\"total_working_days\":31,\"unmarked_days\":0,\"leave_without_pay\":0,\"absent_days\":0,\"payment_days\":31,\"total_working_hours\":0,\"hour_rate\":0,\"base_hour_rate\":0,\"gross_pay\":350000,\"base_gross_pay\":350000,\"gross_year_to_date\":350000,\"base_gross_year_to_date\":0,\"total_deduction\":0,\"base_total_deduction\":0,\"net_pay\":350000,\"base_net_pay\":350000,\"rounded_total\":350000,\"base_rounded_total\":350000,\"year_to_date\":350000,\"base_year_to_date\":0,\"month_to_date\":350000,\"base_month_to_date\":0,\"total_in_words\":\"Trois Cent Cinquante Mille MGA\",\"base_total_in_words\":\"Trois Cent Cinquante Mille MGA\",\"ctc\":0,\"income_from_other_sources\":0,\"total_earnings\":0,\"non_taxable_earnings\":0,\"standard_tax_exemption_amount\":0,\"tax_exemption_declaration\":0,\"deductions_before_tax_calculation\":0,\"annual_taxable_amount\":0,\"income_tax_deducted_till_date\":0,\"current_month_income_tax\":0,\"future_income_tax_deductions\":0,\"total_income_tax\":0,\"doctype\":\"Salary Slip\",\"deductions\":[],\"earnings\":[{\"docstatus\":0,\"doctype\":\"Salary Detail\",\"name\":\"9u7kh4nlj2\",\"__unsaved\":1,\"owner\":\"Administrator\",\"is_recurring_additional_salary\":0,\"statistical_component\":0,\"depends_on_payment_days\":0,\"exempted_from_income_tax\":0,\"is_tax_applicable\":1,\"is_flexible_benefit\":0,\"variable_based_on_taxable_salary\":0,\"do_not_include_in_total\":0,\"deduct_full_tax_on_selected_payroll_date\":0,\"amount_based_on_formula\":1,\"parent\":\"Sal Slip/HR-EMP-00008/00001\",\"parentfield\":\"earnings\",\"parenttype\":\"Salary Slip\",\"idx\":1,\"abbr\":\"BS\",\"salary_component\":\"base\",\"condition\":\"BS < 350000\",\"formula\":\"BS * .1\",\"amount\":350000,\"year_to_date\":350000,\"default_amount\":0,\"additional_amount\":0,\"tax_on_flexible_benefit\":0,\"tax_on_additional_salary\":0,\"creation\":\"2024-08-28 16:43:44.607105\",\"modified\":\"2024-09-03 13:32:18.034903\",\"modified_by\":\"Administrator\"}],\"timesheets\":[],\"leave_details\":[{\"name\":\"9u7plndei4\",\"owner\":\"Administrator\",\"creation\":\"2024-09-03 13:32:18.512007\",\"modified\":\"2024-09-03 13:32:18.512007\",\"modified_by\":\"Administrator\",\"docstatus\":0,\"idx\":1,\"leave_type\":\"Congés payés\",\"total_allocated_leaves\":0,\"expired_leaves\":0,\"used_leaves\":0,\"pending_leaves\":0,\"available_leaves\":0,\"parent\":\"Sal Slip/HR-EMP-00008/00001\",\"parentfield\":\"leave_details\",\"parenttype\":\"Salary Slip\",\"doctype\":\"Salary Slip Leave\"},{\"name\":\"9u7pmmfgmv\",\"owner\":\"Administrator\",\"creation\":\"2024-09-03 13:32:18.518114\",\"modified\":\"2024-09-03 13:32:18.518114\",\"modified_by\":\"Administrator\",\"docstatus\":0,\"idx\":2,\"leave_type\":\"RTT\",\"total_allocated_leaves\":0,\"expired_leaves\":0,\"used_leaves\":0,\"pending_leaves\":0,\"available_leaves\":0,\"parent\":\"Sal Slip/HR-EMP-00008/00001\",\"parentfield\":\"leave_details\",\"parenttype\":\"Salary Slip\",\"doctype\":\"Salary Slip Leave\"},{\"name\":\"9u7p9f7006\",\"owner\":\"Administrator\",\"creation\":\"2024-09-03 13:32:18.529328\",\"modified\":\"2024-09-03 13:32:18.529328\",\"modified_by\":\"Administrator\",\"docstatus\":0,\"idx\":3,\"leave_type\":\"Arrêt Maladie\",\"total_allocated_leaves\":0,\"expired_leaves\":0,\"used_leaves\":0,\"pending_leaves\":0,\"available_leaves\":0,\"parent\":\"Sal Slip/HR-EMP-00008/00001\",\"parentfield\":\"leave_details\",\"parenttype\":\"Salary Slip\",\"doctype\":\"Salary Slip Leave\"},{\"name\":\"9u7p9qukd9\",\"owner\":\"Administrator\",\"creation\":\"2024-09-03 13:32:18.530252\",\"modified\":\"2024-09-03 13:32:18.530252\",\"modified_by\":\"Administrator\",\"docstatus\":0,\"idx\":4,\"leave_type\":\"Décès Proches (Parents, Beaux parents, Conjoint, enfant, ascendants)\",\"total_allocated_leaves\":0,\"expired_leaves\":0,\"used_leaves\":0,\"pending_leaves\":0,\"available_leaves\":0,\"parent\":\"Sal Slip/HR-EMP-00008/00001\",\"parentfield\":\"leave_details\",\"parenttype\":\"Salary Slip\",\"doctype\":\"Salary Slip Leave\"},{\"name\":\"9u7pmmsvik\",\"owner\":\"Administrator\",\"creation\":\"2024-09-03 13:32:18.531256\",\"modified\":\"2024-09-03 13:32:18.531256\",\"modified_by\":\"Administrator\",\"docstatus\":0,\"idx\":5,\"leave_type\":\"Congé annuelle\",\"total_allocated_leaves\":0,\"expired_leaves\":0,\"used_leaves\":0,\"pending_leaves\":0,\"available_leaves\":0,\"parent\":\"Sal Slip/HR-EMP-00008/00001\",\"parentfield\":\"leave_details\",\"parenttype\":\"Salary Slip\",\"doctype\":\"Salary Slip Leave\"}],\"department\":\"parking - RS\"}",
"action": "Submit"
},
"btn": {
"jQuery3700482680198446559851": {
"events": {
"click": [
{
"type": "click",
"origType": "click",
"guid": 8099,
"namespace": ""
}
]
}
}
},
"freeze": true,
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.form.save.savedocs",
"request_id": null
}
Response Data
{
"exception": "ValueError: expected '}' before end of string",
"exc_type": "ValueError",
"_exc_source": "hrms (app)"
}
1 « J'aime »
Je vous invite à regarder dans les Paramètres de Paie si le champ « Politique de mots de passe » est bien correct (c’est-à-dire que toutes les accolades ouvrantes « {
» sont refermées par une accolade fermante « }
»).
Si jamais la case « crypter les fiches de paie » n’est pas cochée, alors indiquez-le moi parce qu’il s’agit sûrement d’un bug.
@corentin
en décochée la case Crypter les fiche de paie dans dans les emails le problème est résolu
Merci
1 « J'aime »
Superbe ! Bonne journée