From 4f952f17f2169e5e95521c097470af005a73e719 Mon Sep 17 00:00:00 2001 From: Charles-Henri Decultot Date: Sun, 18 Feb 2024 21:11:13 +0100 Subject: [PATCH 1/2] fix: small fixes --- erpnext/controllers/queries.py | 2 +- erpnext/setup/setup_wizard/operations/company_setup.py | 1 - .../reservation_de_ressource___notification_gestionnaire.html | 2 +- .../reservation_de_ressource___notification_gestionnaire.json | 2 +- ...reservation_de_ressources___notification_utilisateurs.html | 4 ++-- ...reservation_de_ressources___notification_utilisateurs.json | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index 6e7f243abca..faf6fe30dd8 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -926,7 +926,7 @@ def get_uoms(doctype, txt, searchfield, start, page_len, filters): [ (v[0], v[1] and _("Must be a whole number")) for v in list(uom_list) - if re.search(re.escape(txt) + ".*", _(v[0]), re.IGNORECASE) + if v[0] is not None and re.search(re.escape(txt) + ".*", _(v[0]), re.IGNORECASE) ] ) diff --git a/erpnext/setup/setup_wizard/operations/company_setup.py b/erpnext/setup/setup_wizard/operations/company_setup.py index 6e79bd71adf..544274773ff 100644 --- a/erpnext/setup/setup_wizard/operations/company_setup.py +++ b/erpnext/setup/setup_wizard/operations/company_setup.py @@ -74,7 +74,6 @@ def create_accounting_journals(bank_account_name, company): {"document_type": "Delivery Note"}, {"document_type": "Purchase Receipt"}, {"document_type": "Stock Entry"}, - {"document_type": "Expense Claim"}, ], }, { diff --git a/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.html b/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.html index c37abc6e81a..f1b1dd3c795 100644 --- a/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.html +++ b/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.html @@ -1,7 +1,7 @@

{{ _("Hello") }},

{% set user = frappe.get_doc("User", doc.owner) %} -

The following resources have been booked by {{ user.full_name }} {% if doc.customer != user.full_name%}({{ doc.customer_name }}){% endif %}:

+

{{ _("The following resources have been booked by") }} {{ user.full_name }} {% if doc.customer != user.full_name%}({{ doc.customer_name }}){% endif %}:

{% for item in doc.items %} diff --git a/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.json b/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.json index 5f83956c846..bdd704c1ac3 100644 --- a/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.json +++ b/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.json @@ -13,7 +13,7 @@ "is_standard": 1, "message": "

{{ _(\"Hello\") }},

\n\n{% set user = frappe.get_doc(\"User\", doc.owner) %}\n

The following resources have been booked by {{ user.full_name }} {% if doc.customer != user.full_name%}({{ doc.customer_name }}){% endif %}:

\n\n
\n {% for item in doc.items %}\n {% if item.item_booking %}\n {% set booking = frappe.get_doc(\"Item Booking\", item.item_booking) %}\n
{{ booking.item_name }}
\n
{{ _(\"Start\") }}: {{ frappe.utils.format_datetime(booking.starts_on) }}
\n
{{ _(\"End\") }}: {{ frappe.utils.format_datetime(booking.ends_on) }}
\n {% if booking.notes %}\n
{{ _(\"Notes\") }}: {{ booking.notes }}
\n {% endif %}\n {% endif%}\n {% endfor %}\n
", "message_type": "HTML", - "modified": "2024-02-02 14:26:34.227330", + "modified": "2024-02-03 14:26:34.227330", "modified_by": "Administrator", "module": "Venue", "name": "Reservation de ressource - Notification gestionnaire", diff --git a/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.html b/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.html index 9d79bca3d86..4a2d247e9f8 100644 --- a/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.html +++ b/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.html @@ -1,8 +1,8 @@

{{ _("Hello") }},

-

Your request to book the following resources has been registered.

+

{{ _("Your request to book the following resources has been registered.") }}

-

Please find the details below.

+

{{ _("Please find the details below.") }}

{% for item in doc.items %} {% if item.item_booking %} diff --git a/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.json b/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.json index 922f06c0548..1c28fc1f188 100644 --- a/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.json +++ b/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.json @@ -13,7 +13,7 @@ "is_standard": 1, "message": "

{{ _(\"Hello\") }},

\n\n

Your request to book the following resources has been registered.

\n\n

Please find the details below.

\n
\n {% for item in doc.items %}\n {% if item.item_booking %}\n {% set booking = frappe.get_doc(\"Item Booking\", item.item_booking) %}\n
{{ booking.item_name }}
\n
{{ _(\"Start\") }}: {{ frappe.utils.format_datetime(booking.starts_on) }}
\n
{{ _(\"End\") }}: {{ frappe.utils.format_datetime(booking.ends_on) }}
\n {% if booking.notes %}\n
{{ _(\"Notes\") }}: {{ booking.notes }}
\n {% endif %}\n {% if booking.status in (\"Confirmed\", \"Not confirmed\") %}\n
{{ booking.status }}
\n {% endif%}\n {% endif%}\n {% endfor %}\n
", "message_type": "HTML", - "modified": "2024-02-02 14:26:26.319836", + "modified": "2024-02-03 14:26:26.319836", "modified_by": "Administrator", "module": "Venue", "name": "Reservation de ressources - Notification utilisateurs", -- GitLab From c86a908d3faaee80f421e786f62bd1e483c74cb4 Mon Sep 17 00:00:00 2001 From: Charles-Henri Decultot Date: Mon, 19 Feb 2024 07:59:48 +0100 Subject: [PATCH 2/2] fix: enable only internal notification by default --- .../reservation_de_ressource___notification_gestionnaire.json | 2 +- .../reservation_de_ressources___notification_utilisateurs.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.json b/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.json index bdd704c1ac3..a91ee5271fc 100644 --- a/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.json +++ b/erpnext/venue/notification/reservation_de_ressource___notification_gestionnaire/reservation_de_ressource___notification_gestionnaire.json @@ -7,7 +7,7 @@ "docstatus": 0, "doctype": "Notification", "document_type": "Sales Order", - "enabled": 0, + "enabled": 1, "event": "Submit", "idx": 0, "is_standard": 1, diff --git a/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.json b/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.json index 1c28fc1f188..79bdec7669a 100644 --- a/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.json +++ b/erpnext/venue/notification/reservation_de_ressources___notification_utilisateurs/reservation_de_ressources___notification_utilisateurs.json @@ -7,7 +7,7 @@ "docstatus": 0, "doctype": "Notification", "document_type": "Sales Order", - "enabled": 1, + "enabled": 0, "event": "Submit", "idx": 0, "is_standard": 1, -- GitLab