* fix: make automatically following documents optional
* fix: optimize email triggers for document followed
* test: add tests for document follow settings
* test: sync global search before testing
* fix: extend pypika's cast function to mimic varchar cast in MariaDB
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
Co-authored-by: phot0n <ritwikpuri5678@gmail.com>
* fix: call `frappe.db.exists` only if `options` are set and value is truthy
* fix: sider issue
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
* fix: use `get_value` instead of `exists`
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
* test: ensure currency formatting works without currency set in df options or param
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
In `search.py` it was hardcoded that **DocType** and **Role** get translated before matching against the search text. This way, a user can type in his local language and still see correct results.
This feature is useful for other DocTypes as well. The criterion would be: there is a small, fairly static number of records, so that the performance impact of translating all names first is not too bad.
This PR adds a hook `translated_search_doctypes` that determines which DocType names get translated before search.
I also added **Country** to `translated_search_doctypes` for frappe. The link to **Country** is frequently used in **Address**, but until now there was no way to use it in the local language. There are ~70% less Countries than DocTypes (including ERPNext), so the performance should be fine.
ERPNext could, for example, add the **Gender** DocType to this hook. As there are very few genders, translating them is fast and improves the UX.
Docs: https://frappeframework.com/docs/v13/user/en/python-api/hooks/edit?wiki_page_patch=b4d7c8d6fc
* feat: implement valued parameter 'stream_only' in 'get_logger()' in order to stream logs into stderr instead rotating log files.
Co-authored-by: gavin <gavin18d@gmail.com>
Similar to set_value for accepting multiple columns ot be updated for
the same Table through a Dict as the second positional arg
Misc: Added type hints