Commit graph

40920 commits

Author SHA1 Message Date
Suraj Shetty
ee3a6fab7d fix: Add cyan and pink indicator color for dark theme
- fix gray indicator colors on dark... make them lighter to make it more consistent and visible
2023-01-20 19:24:21 +05:30
Suraj Shetty
e2b3dd60c2 fix: Indicator contrast to make it more readable 2023-01-20 19:12:21 +05:30
Suraj Shetty
dcbc9e54ca fix: Indicator dot colors in dark mode 2023-01-20 14:16:04 +05:30
Ankush Menat
2971fcf657
fix: misc migration related fixes (#19623)
* fix: Dont check for hidden-mandatory during migration

This is being added programatically and can be addressed later. No need
to fail migrations for this.

* refactor: Convert patch log naming to hash

Naming series isn't required and can cause collision if patches were
incorrectly executed or reattempted.
2023-01-20 11:43:21 +05:30
Ankush Menat
945a2b34fe
fix(UX): drag handles on app resolution order table (#19672)
[skip ci]

Co-Authored-By: Suraj Shetty <surajshetty3416@gmail.com>

Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2023-01-20 11:35:15 +05:30
Ankush Menat
40d0c8aaaf
Merge pull request #19657 from ankush/invalid_filters
fix(UX): invalid filters, incorrect std fieldtypes
2023-01-19 22:07:50 +05:30
Ankush Menat
b483f27ae8
fix: only generate fieldname for inconsequential fields (#19663)
Creating columns that are altered in DB on save automatically is kinda
bad and will leave unnecessary columns in DB if user makes a mistake or
forgets to add a fieldname explicitly.

The default generated names are meaningless like "float_asdx", there is
no use case for this.

[skip ci]
2023-01-19 21:55:31 +05:30
Ankush Menat
9588455515
Merge branch 'develop' into invalid_filters 2023-01-19 21:39:58 +05:30
jiangying
e324ad2094
chore(file): better error msg for file_upload (#19609)
* chore(file): better error msg for file_upload

current, if No `file` or `file_url` field set in form-data, err is cryptic:
```
172.19.0.1 - - [16/Jan/2023 16:52:27] "POST /api/method/upload_file HTTP/1.1" 403 -
Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1590, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/handler.py", line 221, in upload_file
    return frappe.get_doc(
  File "apps/frappe/frappe/model/document.py", line 305, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 327, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 253, in insert
    self.run_method("before_insert")
  File "apps/frappe/frappe/model/document.py", line 909, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1259, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1241, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 906, in fn
    return method_object(*args, **kwargs)
  File "apps/frappe/frappe/core/doctype/file/file.py", line 61, in before_insert
    self.set_file_name()
  File "apps/frappe/frappe/core/doctype/file/file.py", line 335, in set_file_name
    self.file_name = re.sub(r"/", "", self.file_name)
  File "/home/frappe/.pyenv/versions/3.10.5/lib/python3.10/re.py", line 209, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object
```

this pr make it understandable

* Update frappe/core/doctype/file/file.py

Co-authored-by: gavin <gavin18d@gmail.com>

* fix: SyntaxError

Co-authored-by: gavin <gavin18d@gmail.com>
2023-01-19 21:11:41 +05:30
Ankush Menat
96afc5ebd9 fix: correct invalid filters
- Datetime - equality doesn't make sense because of milliseconds. A separate operator for "date" part can be useful here maybe.
- Code - data like filter and remove comparison operators.
- Phone - treat like Data
- Barcode - treat like data
- attach - treat like data
- attach image - treat like data
- rating - remove invalid operators
- password - LOL
2023-01-18 22:45:50 +05:30
Ankush Menat
30134a2cc9 fix: Correct standard docfield types
- `creation` and `modified` are timestamps not dates.
- `modified_by` is similar to `owner` so not sure why we can't have this render
  as link as well
2023-01-18 22:10:55 +05:30
Ankush Menat
fa55793a52
Merge pull request #19405 from netchampfaris/refactor-qb-engine
refactor: qb.engine
2023-01-18 21:17:17 +05:30
Ankush Menat
fb2c6a5573
Merge pull request #19653 from ankush/modify_installed_orderig
feat: let users modify hook resolution order
2023-01-18 21:01:25 +05:30
Ankush Menat
c14379ce5c fix: log changes made to installed_apps order 2023-01-18 19:16:09 +05:30
Ankush Menat
1796cae6bf feat: let users modify hook resolution order
Since hook resolution depends on the order in which apps were installed
on site, it should be made configurable as escape hatch in case a
different resolution order is desired.

Keep in mind that changing order affects every hook, page, customization
so you can't pick and choose priority for individual hooks as of now.

Separate proposals are welcome for such configurabilty.
2023-01-18 18:45:33 +05:30
Shariq Ansari
555b88ffd9
Merge pull request #19642 from shariquerik/update-profile-redirect-fix
Fixes https://github.com/frappe/frappe/issues/19377
2023-01-18 11:25:26 +05:30
Shariq Ansari
1b4b6cce15 fix: Edit Profile link is not redirecting correctly 2023-01-18 10:30:40 +05:30
Ankush Menat
e31db5d502
fix: handle tel: links in emails (#19635) 2023-01-17 20:31:06 +05:30
Suraj Shetty
f9496ff7e5
fix: Initialize "r" to avoid UnboundLocalError (#19630)
fixes https://github.com/frappe/frappe/issues/19608
2023-01-17 18:29:07 +05:30
Suraj Shetty
bc13f909fb
fix: Argument name should be letterhead instead of letter_head (#19627)
fixes https://github.com/frappe/frappe/issues/19515
2023-01-17 18:10:23 +05:30
Shariq Ansari
72119d44b4
Merge pull request #19624 from shariquerik/number-card-fix
Fixes https://github.com/frappe/frappe/issues/17209
2023-01-17 17:35:08 +05:30
Shariq Ansari
52da1a8e4c
Merge branch 'develop' into number-card-fix 2023-01-17 16:49:14 +05:30
Shariq Ansari
c6c9401f06 fix: cannot add number card on dashboard 2023-01-17 16:45:49 +05:30
Suraj Shetty
551f58bde9
fix: Convert extension to lowercase before comparison 2023-01-17 16:32:44 +05:30
Ritwik Puri
6b1e98e0d6
chore: reorder disable_email_accounts_with_oauth to post model sync (#19620) 2023-01-17 14:19:33 +05:30
Faris Ansari
ee17b22110 fix: only replace "tab" at the beginning 2023-01-17 14:04:31 +05:30
Ankush Menat
4bb5b10c7f
fix(DX): better error msg for non-whitelisted methods (#19616)
[skip ci]
2023-01-17 12:06:39 +05:30
Ritwik Puri
647ac83abf
chore(patch): send notification to system managers for resetup of oauth enabled email accounts (#19610) 2023-01-17 11:44:04 +05:30
Ankush Menat
53f8154907
chore(flake8): ignore B028 (#19612)
[skip ci]
2023-01-17 10:55:54 +05:30
Ritwik Puri
75ae0fa248
chore: remove unnecessary query condition from get_other_system_managers (#19611) 2023-01-17 10:50:07 +05:30
Ankush Menat
433115f62d
test: rollback test transaction after executing cmd (#19606)
In command tests if connection is active then due to repeatable read
isolation you will continue to read old data which might be modified by
the command you're trying to test.

It makes sense to end transaction after each command execution here.

[skip ci]
2023-01-16 18:43:52 +05:30
Ankush Menat
c7edd7e57c chore: remove unnecessary assertion 2023-01-16 18:02:40 +05:30
Ankush Menat
366ba4720e
Merge pull request #17869 from resilient-tech/refactor-installed
refactor!: deprecate sorting based on `apps.txt` in `get_installed_apps`
2023-01-16 17:56:06 +05:30
Ankush Menat
8adfdcbc1d tests: clear DB transactions before all db calls
Because of repeatable read isolation,
changes from externally executed command dont reflect until transaction is ended.
2023-01-16 17:32:29 +05:30
Deepesh Garg
0f5d17663d
fix: Remove setup wizard user image (#19601) 2023-01-16 16:44:04 +05:30
Ritwik Puri
1e6086fd75
fix(minor): only show authorization message if connected app is set (#19605) 2023-01-16 16:22:38 +05:30
Faris Ansari
543458b473 fix: handle empty list as filters 2023-01-16 15:38:15 +05:30
Ritwik Puri
50327203ce
Merge pull request #18750 from revant/oauth-email
feat: use Connected App for OAuth based Email Account
2023-01-16 15:24:05 +05:30
Faris Ansari
5bc5ff100b test: tests for various filter options 2023-01-16 14:12:04 +05:30
Faris Ansari
52e3d8d58b fix: handle empty string passed to filters 2023-01-16 14:11:37 +05:30
Ankush Menat
5e2bbf834f refactor: filter out apps not installed on bench 2023-01-16 13:54:40 +05:30
Sagar Vora
f5cbcec103 fix: defer local.all_apps loading 2023-01-16 13:54:27 +05:30
Sagar Vora
d8b7bc18d7 refactor!: deprecate sorting based on apps.txt in get_installed_apps 2023-01-16 13:54:27 +05:30
phot0n
b5c81cc015 chore(patch): disable all email accounts with oauth mechanism 2023-01-16 12:56:22 +05:30
aissa-berrachiche
bfaadfd32d
fix: passwords are updated on every login (#19594)
Co-authored-by: aberrachiche <aberrachiche@aas.com.sa>
2023-01-16 11:06:05 +05:30
Shariq Ansari
701415142b
Merge pull request #19597 from shariquerik/test-form-builder-fix 2023-01-16 10:47:40 +05:30
Shariq Ansari
fae098f661
Merge pull request #19587 from shariquerik/hide-workspace-firefox-fix 2023-01-16 10:27:20 +05:30
Shariq Ansari
cd8049e569
Merge pull request #19586 from ruchamahabal/fix-fetch-if-empty 2023-01-16 10:26:42 +05:30
Shariq Ansari
8abd144de6 test: fixed failing UI test 2023-01-16 10:24:45 +05:30
Shariq Ansari
35f4f22c7d
Merge branch 'develop' into fix-fetch-if-empty 2023-01-16 09:34:50 +05:30