* fix: Ignore permissions while assigning if flag set
* fix: Avoid double permission checks on assignment rule
When it's triggered via doc events either:
- Permission check is done or
- Permission checks are not applicable
* fix: dont create communication upon auto repeat notification
creating communication for notification doesnt make sense
* test: rename test_notification_is_attached -> test_email_notification
now tests for email queue creation
There is `Notification` doctype but it doesn't work so well for small
one-off reminders. Imagine these scenarios:
1. Remind me to follow up on this lead in 5 days.
2. Remind me to revoke temporary access I am giving to this user.
For such scenarios, I am proposing a simple reminder system built into
framework. All it does is:
1. For any document you can set a reminder with time and message.
2. When time comes you'll get a system notification with message and
link to the document.
Permissions:
1. Users can only see their own set reminders.
### BREAKING CHANGE
#### Datetime, Date and Time fields will always be cast to respective objects in `setattr`, this will ensure uniformity while accessing the values, no more `getdate`, `get_datetime`, `to_timedelta` wrapper.
- While importing data, the framework does check for `set_only_once`.
- In normal case scenarios, this will work flawlessly since most date fields might not be set_only_once.
- But in Subscription, the date field is set to `set_only_once` and in `after_insert`, `document.save` is called, and while doing so, `set_only_once` is checked [here](1944a547f9/frappe/model/document.py (L566)).
-This works fine if the data imported is in the correct format.
- If the date's data is not in the correct format, the framework throws an error.
- for eg `06-02-2022 00:00:00 != 06-02-2022`
- fixes [Issue/#15370](https://github.com/frappe/frappe/issues/15370)
> no-docs
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
Defining translated strings as globals means the strings are evaluated
at import time. So the value of these variables is set based on which
site or user initializes the module. This makes it possible for an
english user to get Russian errors.
---
Other changes: Remove unreachable code, avoid importing _socket.error alias to
OSError