Commit graph

42389 commits

Author SHA1 Message Date
Shariq Ansari
ad2f4d7902
Merge pull request #20460 from shariquerik/cancel-doc-with-workflow-fix 2023-04-03 16:36:59 +05:30
Shariq Ansari
3e695a05e6
Merge branch 'develop' into cancel-doc-with-workflow-fix 2023-04-03 16:01:38 +05:30
Raffael Meyer
d13ac4b17c
Merge branch 'develop' into gc-perms 2023-04-03 12:23:15 +02:00
Rucha Mahabal
1655eaca1e
Merge branch 'develop' into fix-dashboard 2023-04-03 15:14:55 +05:30
Rucha Mahabal
d586d283c5 fix: use chart type passed to render_graph on form dashboards 2023-04-03 15:12:39 +05:30
Rucha Mahabal
e6b09ec771 fix: heatmap not reset on dashboard refresh 2023-04-03 15:05:08 +05:30
Daizy Modi
3db1c1aea0
fix: allowed only POST and PUT methods in rename_doc (#20504) 2023-04-03 15:04:46 +05:30
Daizy Modi
d2bde19b5c
fix: removed unnecessary usage of @frappe.whitelist (#20503) 2023-04-03 15:03:37 +05:30
Daizy Modi
06580bdbff
fix: allow reset_otp_secret only if Two Factor Auth is enabled (#20506)
* fix: display `Reset OTP Secret` button only if Two factor Auth is enabled

* fix: added validations and fetched value from cached doc

* fix: linter changes
2023-04-03 15:02:05 +05:30
Ankush Menat
fa32b610d6
fix: rewrite query for postgres (#20557) 2023-04-03 14:47:45 +05:30
Rucha Mahabal
b443bca2d5 fix: hide chart and heatmap on dashboard reset 2023-04-03 12:37:43 +05:30
Shariq Ansari
106f32e28c
Merge branch 'develop' into cancel-doc-with-workflow-fix 2023-04-03 11:46:57 +05:30
Sabu Siyad
a1aaed0a5f
feat(util): get_table_name: wrap in backticks (#20553) 2023-04-03 11:26:49 +05:30
Wolfram Schmidt
75973fd22a
chore: Update de.csv (#20548)
translations for new feature to crop images on upload. Crop (cutting) is in conflict with crop (Agricultural) but as this module is not part of ERPNext-Standard installation. This should not matter for now.
2023-04-03 11:23:59 +05:30
Wolfram Schmidt
62a1f234fe
chore: Update de.csv (#20547)
added missing DocType translation. This used to be Naming Series (Nummernkreis) https://doku.phamos.eu/books/erpnext-benutzerhandbuch-v14/page/dokumentenbenennungseinstellungen-document-naming-settings
2023-04-03 11:23:49 +05:30
Wolfram Schmidt
492fdbeec4
chore: Update de.csv (#20545)
added translations related to Navbar-Settings. Cleanup.
2023-04-03 11:23:34 +05:30
Wolfram Schmidt
3d626dd364
chore: Update de.csv (#20546)
alligned singular and plural. Has effect on DocType naming of DocType Notification!
2023-04-03 11:23:12 +05:30
Shariq Ansari
a3458798f1
Merge branch 'develop' into cancel-doc-with-workflow-fix 2023-04-02 15:34:36 +05:30
Shariq Ansari
ee9cb43835 fix: get workflow_state_fieldname instead of setting workflow_state to none 2023-04-02 15:33:43 +05:30
Ankush Menat
5fff6698ad fix: use develop as branch name for new apps
dont ask me why
2023-04-02 15:26:32 +05:30
Marica
f206b1582e
test: Kanban Test fails to remove System Manager role (#20505)
* fix: Kanban Test fails to remove System Manager role

- As there's only one user with System Manager role, role removal is reverted
- Add another user with this role, so that role removal on test user works

* chore: Reuse `create_test_user` util

* fix: user switching in kanban test

---------

Co-authored-by: barredterra <14891507+barredterra@users.noreply.github.com>
2023-04-02 15:14:40 +05:30
Shariq Ansari
d35e486124
Merge pull request #20549 from shariquerik/align-chart-link-card 2023-04-02 15:11:38 +05:30
Ankush Menat
10dcbc5ecf fix: fix address query for postgres
refer https://github.com/frappe/frappe/pull/20537#ref-pullrequest-1645575433
2023-04-02 15:10:54 +05:30
Shariq Ansari
b72ec114ee fix(UI): align link cards & charts on workspace 2023-04-02 14:33:35 +05:30
Ahmed Hasanin
0834899069
Merge branch 'develop' into fix-update-docfield-property-function 2023-04-01 22:23:52 +02:00
Raffael Meyer
ae3b3ebb17
chore: remove excessive whitespace (#20544)
to make the linter happy

[skip ci]
2023-04-01 22:22:03 +05:30
Yash Jain
96395d60db fix: change z-index of freeze component to make it appear above all components
changed the z-index value of #freeze id to 9999 so that it appears above all UI components

fixes #20538
2023-03-31 19:34:56 +05:30
Ankush Menat
b9e994b297
Merge pull request #20537 from ankush/perf/address_query
perf: Faster address query with explicit joins
2023-03-31 19:06:12 +05:30
Ankush Menat
fba3497ba0 test: address query 2023-03-31 19:04:11 +05:30
Ankush Menat
09e32c3085 perf: Faster address query with explicit joins
This querry is particularly problamatic when there are OR conditions due
to shared docs.

```sql
ANALYZE SELECT `tabAddress`.name,
       `tabAddress`.city,
       `tabAddress`.country
FROM `tabAddress`
join `tabDynamic Link` on (`tabDynamic Link`.parent = `tabAddress`.name AND `tabDynamic Link`.parenttype = 'Address')
WHERE
  `tabDynamic Link`.link_doctype = 'Customer'
  AND `tabDynamic Link`.link_name = 'CUSTOMER NAME'
  AND coalesce(`tabAddress`.disabled, 0) = 0
  AND (`tabAddress`.`country` like '%%'
       OR `tabAddress`.`state` like '%%'
       OR `tabAddress`.`name` like '%%'
       OR `tabAddress`.`name` like '%%')
  AND ((((coalesce(`tabAddress`.`branch`, '')=''
          OR `tabAddress`.`branch` in ('something')))))
  OR (`tabAddress`.name in ('SOME SHARED DOC'))
ORDER BY if(locate('', `tabAddress`.name), locate('', `tabAddress`.name), 99999),
         `tabAddress`.idx DESC,
         `tabAddress`.name
LIMIT 0, 20;
```

**Before:** Never terminates and reads entire table with millions of lines :LOL:

**After:** Reads ~100 rows max.

```
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: tabDynamic Link
         type: index_merge
possible_keys: parent,link_doctype_link_name_index,link_name
          key: link_name,link_doctype_link_name_index,parent
      key_len: 563,1126,563
          ref: NULL
         rows: 40
       r_rows: 79.00
     filtered: 100.00
   r_filtered: 100.00
        Extra: Using union(intersect(link_name,link_doctype_link_name_index),parent); Using where; Using temporary; Using filesort
*************************** 2. row ***************************
           id: 1
  select_type: SIMPLE
        table: tabAddress
         type: eq_ref
possible_keys: PRIMARY,selco_branch
          key: PRIMARY
      key_len: 562
          ref: _900a733bdc3bb9ed.tabDynamic Link.parent
         rows: 1
       r_rows: 1.00
     filtered: 100.00
   r_filtered: 100.00
        Extra: Using where
2 rows in set (0.001 sec)
```

<!--

Some key notes before you open a PR:

 1. Select which branch should this PR be merged in?
 2. PR name follows [convention](http://karma-runner.github.io/4.0/dev/git-commit-msg.html)
 3. All tests pass locally, UI and Unit tests
 4. All business logic and validations must be on the server-side
 5. Update necessary Documentation
 6. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes

Also, if you're new here

- Documentation Guidelines => https://github.com/frappe/erpnext/wiki/Updating-Documentation

- Contribution Guide => https://github.com/frappe/frappe/blob/develop/.github/CONTRIBUTING.md

- Pull Request Checklist => https://github.com/frappe/erpnext/wiki/Pull-Request-Checklist

-->

> Please provide enough information so that others can review your pull request:

<!-- You can skip this if you're fixing a typo or updating existing documentation -->

> Explain the **details** for making this change. What existing problem does the pull request solve?

<!-- Example: When "Adding a function to do X", explain why it is necessary to have a way to do X. -->

> Screenshots/GIFs

<!-- Add images/recordings to better visualize the change: expected/current behviour -->
2023-03-31 17:46:06 +05:30
Ankush Menat
5ad9350b14
fix: Handle JsBarcode exceptions (#20533)
JsBarcode exceptions prevent entire page from loading. Instead of that
catch error and show it in helpbox so user can correct the barcode if
required.

Steps to reproduce:
1. Add barcode field
2. Set barcode type in options
3. add invalid barcode and save

(cherry picked from commit 57d40b2614068c13b4b14f42438b46b22c0f5533)
2023-03-31 14:37:51 +05:30
Suraj Shetty
9b6ceab68c
Merge pull request #20530 from ankush/bump_redis 2023-03-31 14:06:36 +05:30
Suraj Shetty
06cb58aa85
Merge branch 'develop' into bump_redis 2023-03-31 14:04:02 +05:30
Suraj Shetty
7a92a604e0
style: Fix formatting 2023-03-31 14:03:49 +05:30
Suraj Shetty
f46d16713f
Merge pull request #20115 from pstuhlmueller/email_sent_as_cc_to_todo_allocated_users 2023-03-31 13:49:04 +05:30
Ankush Menat
c509983ca4 build: bump redis version
https://github.com/redis/redis-py/releases
2023-03-31 13:37:55 +05:30
Suraj Shetty
aab37e0a6c
fix: Check if reference_name is set 2023-03-31 13:31:18 +05:30
Himanshu Shivhare
2cb492561a
fix(ux): correct email account setup path in error message (#20513) 2023-03-30 17:57:00 +05:30
Raffael Meyer
9758781f80
fix: bulk update using doc method, check perms (#20522)
* fix: bulk update

* fix: always check permission
2023-03-30 17:10:44 +05:30
barredterra
54ec1a764c fix(Google Calendar): authorize_access 2023-03-30 11:55:09 +02:00
barredterra
fcb6fa8233 refactor(Google Contact): authorize_access 2023-03-30 11:47:52 +02:00
barredterra
2cfe3622d4 fix: role perms on Google Contacts 2023-03-30 11:34:11 +02:00
Sagar Vora
1cbb60adf9
Merge pull request #20508 from resilient-tech/escape-html
fix: escape HTML instead of sanitizing
2023-03-30 07:05:31 +00:00
Sagar Vora
a56ea73b7d fix: escape HTML instead of sanitizing 2023-03-30 06:27:07 +00:00
Ahmed Hasanin
80f9cfdc78
Merge branch 'develop' into fix-update-docfield-property-function 2023-03-29 10:21:08 +02:00
Raffael Meyer
40ad983598
feat(contact template): clickable email ids and phone numbers, less labels (#20247)
* refactor(contact template): use for .. of loop

* refactor(contact template): clickable phone numbers and email ids

* refactor(contact template): less labels

* fix: escape phone and email ids
2023-03-29 13:01:32 +05:30
Ankush Menat
45c86e2ff8
fix: nestedset rename (#20498) 2023-03-29 12:49:28 +05:30
Raffael Meyer
6096e45b36
test: switch tests to supported methods (#20494)
* fix: switch tests to supported methods

get_fetch_fields, update_linked_doctypes

* test: semantic assertions

* test: fixup deprecation tests imports

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-03-29 10:31:01 +05:30
Ankush Menat
513a209d53 test: fix test case to modified behaviour
We throw instead of showing warning now
2023-03-29 09:25:20 +05:30
Ahmed Hasanin
c0c1b233b2
Merge branch 'develop' into fix-update-docfield-property-function 2023-03-28 15:08:48 +02:00