Patch will always fail if system language is not EN

This is a general information regarding the patch erpnext.patches.v11_0.set_default_email_template_in_hr #08-06-2018

This patch requires the system to have an Email template by the name “Leave Approval Notification” and “Leave Status Notification”. However, the email template name is localised (e.g. “Statusänderung eines Urlaubsantrags”). Therefore, this patch will fail in any case where this install wizard was done in a language other than EN.

Workaround (personal opinion, not official): exclude the patch using the patch log and make sure the value is set in the HR settings.

2 Likes

Here’s an additional information, as I have just talked with @lasalesi .
If you are running a multi-tenant server, make sure to exclude those patches in all databases.

You can open a site specific database with bench --site [Sitename] mariadb

How do you exclude patch from database, could you please elaborate ?

As I knew we can exclude from patch.txt file by commenting the patch.

You can manually add it to the “Patch Log” table, that will make the system think it was executed and it will be skipped.

INSERT INTO `tabPatch Log` (`name`, `creation`, `modified`, `modified_by`, `owner`, `docstatus`, `idx`, `patch`) VALUES ('PATCHLOG00930-1', '2019-10-15 11:47:41.259451', '2019-10-15 11:47:41.259451', 'Administrator', 'Administrator', '0', '0', 'erpnext.patches.v12_0.set_default_shopify_app_type');

Refer also to Error Updating from V10 to V12 - #17 by lasalesi

The issue with the patch.txt is that it is only temporary and breaks your sources (need to reset, which will then again fail in this case as this cannot work; classical catch 22 of a suboptimal patch)…