Commit graph

40961 commits

Author SHA1 Message Date
Ankush Menat
3821167f66
Merge pull request #19725 from ankush/migration_fixes_moar
fix: misc migration issues
2023-01-23 16:44:19 +05:30
Ankush Menat
391edba10a fix(UX): better error message for dead link fields
Link fields referring to non-existing doctypes are possible when

- Removing customizations.
- Removing app which added a custom field but didn't clean up after
  itself.

[skip ci]
2023-01-23 16:43:57 +05:30
Ankush Menat
224ab37924 fix: Dont apply non-standard perms in migrate
ref: agent-job/b8bca95f25
2023-01-23 15:07:13 +05:30
Ankush Menat
87561940a4
feat: Interactively add a new patch (#19722) 2023-01-23 15:04:43 +05:30
Anand Baburajan
6554919f1e
fix: improve invalid naming series message (#19711)
* fix: show the invalid naming series in special chars error msg

* chore: translations

[skip ci]
2023-01-23 15:00:04 +05:30
Richard Case
0e6e2609b5 fix: unhelpful error message (#19666) 2023-01-23 14:48:27 +05:30
Ritwik Puri
65a76cc0f3
Merge pull request #19083 from Aradhya-Tripathi/refactor-bg-submissions
fix: misc fixes (background submission)
2023-01-23 13:18:18 +05:30
phot0n
4144c45b2a fix: make job_id link field and allow all (if owner) to read their submission queues 2023-01-23 13:13:27 +05:30
phot0n
230d36e789 chore: revert things related to workflow 2023-01-23 12:59:18 +05:30
phot0n
99fbe969e8 Revert "fix: workflow mechanics for submission queue (start)"
This reverts commit bb8b0d415e.
2023-01-23 12:57:20 +05:30
phot0n
af093dd598 fix: traceback with context for submission queue 2023-01-23 12:57:20 +05:30
phot0n
bb8b0d415e fix: workflow mechanics for submission queue (start) 2023-01-23 12:45:22 +05:30
phot0n
08c8ab0229 chore: better notification message
Co-authored-by: Aradhya-Tripathi
2023-01-23 12:45:22 +05:30
phot0n
64cb507fae chore: verbose confimation dialog message 2023-01-23 12:45:22 +05:30
Suraj Shetty
eb086268b0
Merge pull request #19681 from surajshetty3416/fix-indicator-colors 2023-01-20 20:01:31 +05:30
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
Ankush Menat
e1ed1e9899
fix: rate limit newsletter subscriptions (#19690) 2023-01-20 19:05:51 +05:30
Ankush Menat
e8209b5dce
fix: invalid "empty form" message (#19696) 2023-01-20 19:03:56 +05:30
Shariq Ansari
f81dc3fce8
Merge pull request #19695 from frappe/fix-comment-email-title 2023-01-20 18:47:59 +05:30
Hussain Nagaria
0411328101 fix: use document title instead of name in subject 2023-01-20 18:30:27 +05:30
Richard Case
457114521f
fix: prevent web form button resubmit and add freeze (#19670)
Co-authored-by: Shariq Ansari <30859809+shariquerik@users.noreply.github.com>
2023-01-20 17:22:37 +05:30
Richard Case
b66f93bdf5
feat: allow 'content' attribute for website structured data schema (#19667) 2023-01-20 14:37:18 +05:30
Sagar Vora
e208db7104
perf: only clear controller cache from current site (#19661)
* perf: only clear controller from current site

* chore: only pop current site controllers if doctype isnt specified
2023-01-20 14:36:42 +05:30
Suraj Shetty
dcbc9e54ca fix: Indicator dot colors in dark mode 2023-01-20 14:16:04 +05:30
Ritwik Puri
98191c5a94
Merge pull request #19677 from phot0n/commentcountui
fix(minor): show 0 as comment count if _comment_count doesnt exist
2023-01-20 13:52:39 +05:30
Ankush Menat
0449f851c7
fix: correct exit code on missing app failure (#19676) 2023-01-20 13:51:00 +05:30
phot0n
586555a1c4 fix(minor): show 0 as comment count if _comment_count doesnt exist 2023-01-20 13:48:47 +05:30
Richard Case
e80c8ac862
fix: improved installed app fail feedback (#19668) 2023-01-20 13:02:09 +05:30
Shariq Ansari
07df794ea4
Merge pull request #19646 from shariquerik/form-builder-fixes-2 2023-01-20 12:43:12 +05:30
Shariq Ansari
cba7c638ae
Merge branch 'develop' into form-builder-fixes-2 2023-01-20 11:52:15 +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
Shariq Ansari
91408f7242
Merge branch 'develop' into form-builder-fixes-2 2023-01-18 23:58:55 +05:30
Shariq Ansari
3b2cfcad2c fix: ask if need to delete tab/section/column with or without children 2023-01-18 23:51:52 +05:30
Shariq Ansari
b3f9e69a6e fix: use frappe.desk.form.save.savedocs instead of frappe.client.save for saving 2023-01-18 22:49:05 +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
Shariq Ansari
986cc8d634 fix: make duplicated field as unsaved field
reset creation, modified, modified_by, owner
2023-01-18 21:30:17 +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
Shariq Ansari
4bc6903164 fix: on duplicate of standard field create a custom field in customize form 2023-01-18 20:51:11 +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
b212149008 fix: change column placeholder color to white in preview mode 2023-01-18 14:18:09 +05:30
Shariq Ansari
2e5d53ef6f fix: if section has one column input field's width should be half 2023-01-18 14:17:05 +05:30