From 1662a4c9c33cea29357b557a734474e461f865c6 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Fri, 17 Nov 2023 15:01:22 +0100 Subject: [PATCH 1/4] fix(notification): align with https://github.com/frappe/frappe/pull/22595 --- .../notification_for_new_fiscal_year.html | 3 +++ .../notification_for_new_fiscal_year.json | 12 +++++++----- ...material_request_receipt_notification.html | 19 +++++++++++++++++++ ...material_request_receipt_notification.json | 10 ++++++---- 4 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.html create mode 100644 erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.html diff --git a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.html b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.html new file mode 100644 index 0000000000..fedbfc43ab --- /dev/null +++ b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.html @@ -0,0 +1,3 @@ +

{{_("Fiscal Year")}}

+ +

{{ _("New fiscal year created :- ") }} {{ doc.name }}

diff --git a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json index 4c7faf4f65..925cb39164 100644 --- a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json +++ b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json @@ -11,19 +11,21 @@ "event": "New", "idx": 0, "is_standard": 1, - "message": "

{{_(\"Fiscal Year\")}}

\n\n

{{ _(\"New fiscal year created :- \") }} {{ doc.name }}

", - "modified": "2018-04-25 14:30:38.588534", + "message_type": "HTML", + "modified": "2023-11-17 08:54:51.532104", "modified_by": "Administrator", "module": "Accounts", "name": "Notification for new fiscal year", "owner": "Administrator", "recipients": [ { - "email_by_role": "Accounts User" + "receiver_by_document_field": "Accounts User" }, { - "email_by_role": "Accounts Manager" + "receiver_by_document_field": "Accounts Manager" } ], + "send_system_notification": 0, + "send_to_all_assignees": 0, "subject": "Notification for new fiscal year {{ doc.name }}" -} \ No newline at end of file +} diff --git a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.html b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.html new file mode 100644 index 0000000000..d8133ae114 --- /dev/null +++ b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.html @@ -0,0 +1,19 @@ +

Material Request Type: {{ doc.material_request_type }}
+Company: {{ doc.company }}

+ +

Order Summary

+ + + + + + + {% for item in doc.items %} + {% if frappe.utils.flt(item.received_qty, 2) > 0.0 %} + + + + + {% endif %} + {% endfor %} +
Item NameReceived Quantity
{{ item.item_code }}{{ frappe.utils.flt(item.received_qty, 2) }}
diff --git a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.json b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.json index 5391a31497..6ef2ea3041 100644 --- a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.json +++ b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.json @@ -11,19 +11,21 @@ "event": "Value Change", "idx": 0, "is_standard": 1, - "message": "Material Request Type: {{ doc.material_request_type }}
\nCompany: {{ doc.company }}\n\n

Order Summary

\n\n\n \n \n \n \n {% for item in doc.items %}\n {% if frappe.utils.flt(item.received_qty, 2) > 0.0 %}\n \n \n \n \n {% endif %}\n {% endfor %}\n
Item NameReceived Quantity
{{ item.item_code }}{{ frappe.utils.flt(item.received_qty, 2) }}
", + "message_type": "HTML", "method": "", - "modified": "2019-05-01 18:02:51.090037", + "modified": "2023-11-17 08:53:29.525296", "modified_by": "Administrator", "module": "Manufacturing", "name": "Material Request Receipt Notification", "owner": "Administrator", "recipients": [ { - "email_by_document_field": "requested_by" + "receiver_by_document_field": "requested_by" } ], + "send_system_notification": 0, + "send_to_all_assignees": 0, "sender_email": "", "subject": "{{ doc.name }} has been received", "value_changed": "status" -} \ No newline at end of file +} From c61925598af27b836fd2d479b7cba169c9fa7e80 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Fri, 15 Dec 2023 18:08:52 +0100 Subject: [PATCH 2/4] fix: translatable strings Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com> --- .../notification_for_new_fiscal_year.html | 2 +- .../material_request_receipt_notification.html | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.html b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.html index fedbfc43ab..0c4a46241d 100644 --- a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.html +++ b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.html @@ -1,3 +1,3 @@ -

{{_("Fiscal Year")}}

+

{{ _("Fiscal Year") }}

{{ _("New fiscal year created :- ") }} {{ doc.name }}

diff --git a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.html b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.html index d8133ae114..ca97516e02 100644 --- a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.html +++ b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.html @@ -1,12 +1,12 @@ -

Material Request Type: {{ doc.material_request_type }}
-Company: {{ doc.company }}

+

{{ _("Material Request Type") }}: {{ doc.material_request_type }}
+{{ _("Company") }}: {{ doc.company }}

-

Order Summary

+

{{ _("Order Summary") }}

- - + + {% for item in doc.items %} {% if frappe.utils.flt(item.received_qty, 2) > 0.0 %} From 3fd43cd6bb10b07390a46cb3430f4615a391cdf6 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Tue, 30 Jan 2024 10:54:29 +0100 Subject: [PATCH 3/4] chore: remove old md files --- .../notification_for_new_fiscal_year.md | 3 --- .../material_request_receipt_notification.md | 19 ------------------- 2 files changed, 22 deletions(-) delete mode 100644 erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.md delete mode 100644 erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.md diff --git a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.md b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.md deleted file mode 100644 index c674ab6d0e..0000000000 --- a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.md +++ /dev/null @@ -1,3 +0,0 @@ -

{{_("Fiscal Year")}}

- -

{{ _("New fiscal year created :- ") }} {{ doc.name }}

\ No newline at end of file diff --git a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.md b/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.md deleted file mode 100644 index e6feee971d..0000000000 --- a/erpnext/manufacturing/notification/material_request_receipt_notification/material_request_receipt_notification.md +++ /dev/null @@ -1,19 +0,0 @@ -Material Request Type: {{ doc.material_request_type }}
-Company: {{ doc.company }} - -

Order Summary

- -
Item NameReceived Quantity{{ _("Item Name") }}{{ _("Received Quantity") }}
- - - - - {% for item in doc.items %} - {% if frappe.utils.flt(item.received_qty, 2) > 0.0 %} - - - - - {% endif %} - {% endfor %} -
Item NameReceived Quantity
{{ item.item_code }}{{ frappe.utils.flt(item.received_qty, 2) }}
\ No newline at end of file From d86186ec472bac0556c5815d28259a2b0fa6c90d Mon Sep 17 00:00:00 2001 From: David Arnold Date: Tue, 30 Jan 2024 12:12:15 +0100 Subject: [PATCH 4/4] fix: correct receiver field --- .../notification_for_new_fiscal_year.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json index 925cb39164..f605ad3ba6 100644 --- a/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json +++ b/erpnext/accounts/notification/notification_for_new_fiscal_year/notification_for_new_fiscal_year.json @@ -19,10 +19,10 @@ "owner": "Administrator", "recipients": [ { - "receiver_by_document_field": "Accounts User" + "receiver_by_role": "Accounts User" }, { - "receiver_by_document_field": "Accounts Manager" + "receiver_by_role": "Accounts Manager" } ], "send_system_notification": 0,