Commit graph

42389 commits

Author SHA1 Message Date
Marica
90f8f945b4
feat: Disable Sharing globally (#20318)
* feat: Disable Sharing globally

- Checkbox in System Settings
- If disabled, avoid share UI render
- Share APIs return None (non-obstructing) if share APIs are invoked

* feat: Settings checkbox must toggle share permission globally

- Treat feature like a perm toggler. Essentially noone is allowed to explicity share anything
- Implicit sharing via `ignore_share_permissions` is allowed. Devs can decide where sharing should happen under the hood
- UI is made read only and not hidden. Users must see who doc is already shared with
- Make sure perm APIs used by share feature return false if sharing is disabled
- Rename checkbox to `Disable Document Sharing`

* test: (server side) Impact of disabling sharing on APIs

- Also, fix missed system setting rename in `assign_to`

* fix: Inform assigner if assignee lacks perms and sharing is disabled

- misc: readable conditions

* fix: throw instead of msgprint

* fix: Typo and appropriate message for `throw`

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-03-28 18:13:37 +05:30
Ahmed Hasanin
9fbed88d40
Merge branch 'develop' into fix-update-docfield-property-function 2023-03-28 14:05:06 +02:00
Ankush Menat
63338a3806
fix: date field shouldn't be formatted for TZ (#20486)
Date fields aren't timezone aware.
2023-03-28 17:33:05 +05:30
Saqib Ansari
e756d41790
chore: add insights banner (#20487)
* chore: add insights banner

* chore: cleanup message and title

[skip ci]

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-03-28 17:24:20 +05:30
Devin Slauenwhite
6bda014406
fix: install cypress plugins in frappe namespace (#20459) 2023-03-28 14:34:45 +05:30
Ahmed Hasanin
0dbe900d45
Merge branch 'develop' into fix-update-docfield-property-function 2023-03-28 10:19:22 +02:00
Ankush Menat
024faff025
build: bump pymysql (#20478)
Actual fix for this bandaid fix: https://github.com/frappe/frappe/pull/20475

Keeping pymysql hard pinned until we have better way to get last full
query.
2023-03-28 13:04:27 +05:30
Ankush Menat
229dcb3c91
fix: pin pymysql to avoid breaking behaviour (#20475)
```
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 920, in get_default
    d = self.get_defaults(key, parent)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 936, in get_defaults
    defaults = frappe.defaults.get_defaults_for(parent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/defaults.py", line 222, in get_defaults_for
    .run(as_dict=True)
     ^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/query_builder/utils.py", line 85, in execute_query
    return frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/database.py", line 264, in sql
    self.log_query(query, values, debug, explain)
  File "/home/ankush/benches/develop/apps/frappe/frappe/database/mariadb/database.py", line 203, in log_query
    self.last_query = query = self._cursor._last_executed
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Cursor' object has no attribute '_last_executed'. Did you mean: '_check_executed'?
```
2023-03-28 12:07:13 +05:30
Samuel Danieli
dc4509796d
fix: suggested email ids in New Email dialog (#20319)
* chore: enhance UX of New Email dialog

* do not show contacts without an email
* use name as value, y? if several contacts use the same email address, the entry will be displayed several times, but always with the same description, which leads to confusion - using name as value makes the entries distinguishable

* chore: ignore semgrep

Rewriting the query is not in the scope of this PR.

* chore: keep semgrep failing on raw query

[skip ci]

* fix: use email_id as value

* Revert "fix: use email_id as value"

This reverts commit e4c44e2094ddb9b525bc34d400642dcee5656096.

* chore: comment confusing code

---------

Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-03-28 11:47:56 +05:30
Rutwik Hiwalkar
69b22f3af2
chore: add ascending order to querybuilder (#20471) 2023-03-28 00:01:42 +05:30
AHasanin
60a5dc82c3 fix(grid row): fix prettier hook check 2023-03-27 17:09:50 +02:00
AHasanin
ed5ce1241f fix(grid row): fix update_docfield_property function not updating grid row 2023-03-27 16:48:09 +02:00
Saqib Ansari
32dbbb47bf
feat: redis cache decorator (#20452)
* feat: redis cache decorator

* fix: review changes

* fix: remove unintentional changes

* fix: remove unintentional changes

* refactor: cleanup and simplify code for redis

AIs suck

* fix: bug

* test: redis cache

* fix: remove unused import

* feat: make redis cache user specific

redis cache utils already support this, extending so everyone can use it

* feat: support @redis_cache without params

* test: flake in request site cache test

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-03-27 17:03:20 +05:30
Ankush Menat
f089e9108e
fix: hard link environment variable (#20467)
On docker based deploys symlinking inside volume doesn't work.

[skip ci]
2023-03-27 15:58:43 +05:30
Rucha Mahabal
08c0290777 fix: don't hide tab with dashboard if there is a visible section/control 2023-03-26 00:17:22 +05:30
Shariq Ansari
5cc6daa713
Merge branch 'develop' into cancel-doc-with-workflow-fix 2023-03-25 13:21:22 +05:30
Shariq Ansari
d2f529462b fix: cannot restore cancelled document if workflow is active 2023-03-25 13:07:05 +05:30
gavin
86f7219525
fix: Auto-Reload after changing time zone (#20456) 2023-03-24 21:02:30 +05:30
Ritwik Puri
d9383afae6
fix: exception handling for bulk email sending (#20451) 2023-03-24 13:45:46 +05:30
Ankush Menat
543a4c467b fix: social media links
[skip ci]
2023-03-24 12:50:36 +05:30
Himanshu Shivhare
0ec7ea45e9
fix: Update social media links (#20400)
* YouTube channel addded in about section. 

I have added ERPNext YouTube channel reference in the about section.
#Create an official Handle for YouTube Channel (Like @erpnext or erpnextofficial)

* chore: handle

[skip ci]

* Update about.js

YouTube channel name changed.

---------

[skip ci]
2023-03-24 12:49:42 +05:30
HarryPaulo
0374d37c62
feat: show if address is "Disabled" (#20446) 2023-03-24 12:43:09 +05:30
Ankush Menat
6b3d283cf7
fix: unsubscribe from list_update before resubbing (#20450)
resubbing can result in multiple events being fired, so unsubscribe all
of them before re-subscribing.

missed in https://github.com/frappe/frappe/pull/20423
2023-03-24 09:58:19 +05:30
Raffael Meyer
f7f575acbd
ci: copy docs checker from erpnext (#20441)
[skip ci]
2023-03-24 08:53:34 +05:30
Leonard Goertz
bd049a42a3
fix: fields are rendered empty after save (#20270)
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-03-24 08:44:34 +05:30
Ankush Menat
f8533010da
Merge pull request #20442 from ankush/perf/can_subscribe
perf: dont re-initate session in realtime.py
2023-03-23 18:14:51 +05:30
Shariq Ansari
806df53222
Merge pull request #20432 from shariquerik/avoid-list-refresh-fix 2023-03-23 18:12:18 +05:30
Shariq Ansari
6763f63455
Merge branch 'develop' into avoid-list-refresh-fix 2023-03-23 17:53:52 +05:30
Shariq Ansari
6e3ef3dc3d test: fixed failing UI test 2023-03-23 17:53:18 +05:30
Ankush Menat
3f717f2fbd perf: Don't re-initate sessions in realtime.py
Session is already created for all requests in app.py -> init_request -> HTTPRequest()
2023-03-23 16:55:09 +05:30
Ankush Menat
5a91ac945c fix: doctype form - hide irrelevant fields 2023-03-23 16:16:14 +05:30
Ankush Menat
b39b2e7923 fix: consider JSON as Data for filters
closes https://github.com/frappe/frappe/issues/20433
2023-03-23 16:03:13 +05:30
Shariq Ansari
d7ec66ef51
Merge pull request #20437 from shariquerik/translated-print-format-child-table-value 2023-03-23 13:31:52 +05:30
Shariq Ansari
2036dd19b2 fix: Get translated value for child tables in print format 2023-03-23 12:30:50 +05:30
Ankush Menat
7ac6199213
feat: re-enable scheduler from desk (#20434)
[skip ci]
2023-03-23 11:54:24 +05:30
Shariq Ansari
064ef5a15a fix: Avoid list update if user is doing some bulk operation 2023-03-22 19:41:41 +05:30
Shariq Ansari
3e282d2d5a
Merge branch 'develop' into clear-all-filters 2023-03-22 11:04:19 +05:30
Ankush Menat
516540ede9
perf: unsubscribe from list_update events (#20423) 2023-03-22 10:02:37 +05:30
Raffael Meyer
ef11d67bb3
chore: translations of "Login" and "Signup" (german) (#20409) 2023-03-21 17:04:28 +05:30
Ankush Menat
7fc6ae65ab
perf: Dont update list view data if list view not active (#20396)
Steps to reproduce:
1. visit a list view that's quite active
2. move to some other page
3. list view data keeps getting refreshed in background

Fix: Only refresh when user is back on list view
2023-03-21 14:11:26 +05:30
Bernhard Sirlinger
c5cfe8f5aa
feat(minor): log datetime in worker log (#20414) 2023-03-21 12:55:03 +05:30
Suraj Shetty
44d4010ea9
Merge pull request #20413 from surajshetty3416/website-analytics-enhancements 2023-03-21 11:36:17 +05:30
Suraj Shetty
02b661bbb9 fix: Remove mandatory and save URL params to localstorage
- Saving URL params to localstorage to avoid re-entering the data.
Usually only 1 or 2 param(s) change is required to generate new link
2023-03-21 11:31:05 +05:30
Suraj Shetty
1abcd5a11a feat: Add a simple tool to generate tracking URL 2023-03-20 23:53:42 +05:30
Suraj Shetty
ed7d6931ca fix: Update code to update links with campaign and medium 2023-03-20 23:42:50 +05:30
Suraj Shetty
c9e12edb42 feat: Add campaign and medium to web page view 2023-03-20 23:41:18 +05:30
Raffael Meyer
d48a1c9e7c
feat: make workflow state translatable (#20326) 2023-03-20 21:55:08 +05:30
Raffael Meyer
12144505bc
fix: clear contacts cache (#20397) 2023-03-20 21:15:53 +05:30
gavin
3da5a84d7c
fix(meta): get_permitted_fields with no field-columns (#20401) 2023-03-20 21:00:03 +05:30
gavin
eeeaedac65
fix(workspace): Setup Dynamic Link if value exists (#20402) 2023-03-20 20:44:32 +05:30