Notification in notification.py to be based on Or instead of And

Hello;

At the notification.py which is used to determine the condition to give notification on the doctype, I used the below:

                    "Trip Order": {
                            "outstanding_amount": (">", 0),
                            "docstatus": ("<", 2)
                    },

But this conditions work as AND and not as OR. Actually I need to get notification if the document is not submitted or if the outstanding is > 0. How to apply this “Or” condition because as I see it is working for AND?

Regards
Bilal

1 Like

I tried the below but it did not work, actually after applied it, I was not able to login for the erpnext.

                    "Trip Order": {
                            "outstanding_amount": (">", 0) or "docstatus": ("<", 2)
                    },

But logically, this is the required logic for me.
Regards
Bilal

Try using email alerts

These indicators usage differ than email alert.
There is not any way to make the condition works as “Or” instead of “And”?

Regards
Bilal

If I need to modify it to be possible to work in “or” condition instead of being only working with “and” condition, from where I can do it?

Regards
Bilal