Commit graph

37995 commits

Author SHA1 Message Date
Shariq Ansari
58df70fc00 fix(minor): ui tweaks & override workflow status 2022-05-19 12:53:41 +05:30
Suraj Shetty
58e779f0a3
Merge pull request #16262 from RAJKRIS/develop 2022-05-19 11:06:37 +05:30
Suraj Shetty
e9e839af01 fix: Use duration field and update fieldname for reset password link expiry 2022-05-19 10:30:02 +05:30
Suraj Shetty
eb70f0aa9a
Merge branch 'develop' into develop 2022-05-19 09:25:00 +05:30
Ritwik Puri
20d73cae24
fix: allow guests/users without desk access to upload text files (#16920)
* fix: allow guests/users without desk access to upload text files

* chore: update error message

Co-authored-by: Shariq Ansari <30859809+shariquerik@users.noreply.github.com>
2022-05-18 17:39:44 +05:30
Shariq Ansari
176518ed2c
fix: Mandatory field bad UX (#16919)
Mandatory fields are highlighted red on page load. It should only highlight if we save the document.

**Before:** Form

https://user-images.githubusercontent.com/30859809/168791201-049c1de2-b7f5-4dff-bf40-093ff96d4510.mov

**After:** Form

https://user-images.githubusercontent.com/30859809/168791164-45e2289b-2d2c-4ebb-8b4d-cd2932140572.mov

**Before:** Dialog

https://user-images.githubusercontent.com/30859809/168791207-800ba9e5-b4eb-419f-8a99-f94916c21c79.mov

**After:** Dialog

https://user-images.githubusercontent.com/30859809/168791210-f2761d23-3a60-40c2-8aff-2d2cebbd77fa.mov

Resolves https://github.com/frappe/frappe/issues/16866
2022-05-18 09:57:49 +00:00
Suraj Shetty
a35098acf7
Merge pull request #16924 from frappe/mergify/bp/develop/pr-16922
fix: Check if email account exists before picking signature (backport #16922)
2022-05-18 15:14:45 +05:30
Suraj Shetty
31d6b0a513 fix: Check if email account exists before picking signature
(cherry picked from commit 2e5bd71d95c1ab2d5d089945da6065b1a059ae59)
2022-05-18 09:43:35 +00:00
Abhishek M
378149375d
fix: Passing dev server variable to jenv globals correctly (#16843)
Encountered the same issue during a fresh setup: https://discuss.erpnext.com/t/v13-fresh-install-develop-socket-io-using-wrong-port/74562

The problem originates from the `socketio_client.js` file.  During development, the `socket.io` client by default sends request to port 8000 but ideally it should've been 9000 (that's where it's actually running) since the latter is defined in `frappe.boot.socketio_port`. This is happening because the `jenv` variable `dev_server` is always being returned as 0.

In [this](0f7d8e7903/frappe/__init__.py (L237)) line, we are seting `frappe.local.dev_server` but in safe exec we are using `frappe._dev_server` as the source to populate the variable `dev_server` which eventually gets pushed to the `app.html` via `jinja`. (`frappe._dev_server` evaluates to `None`)

In `socketio_client`, we are using [this](0f7d8e7903/frappe/public/js/frappe/socketio_client.js (L112)) variable as a flag to decide whether or not `frappe.boot.socketio_port` should be the port that the `socket.io` client connects to.
2022-05-18 09:19:24 +00:00
gavin
211fb8e97d
Merge pull request #16804 from saxenabhishek/aks-test-query_builder
test: increase coverage for query builder
2022-05-18 14:44:08 +05:30
Aradhya Tripathi
7a0dc40693
feat!: Added support for IS in frappe qb (#16877)
Fixes #16869
Using 53148c3f90
2022-05-18 09:09:22 +00:00
gavin
3ca56b8a4a
Merge pull request #16918 from surajshetty3416/fix-list-view-filters
revert: "refactor: new query engine in `get_count()`"
2022-05-17 19:19:40 +05:30
Suraj Shetty
84122c6eec fix: Pass field object instead of string 2022-05-17 18:27:19 +05:30
Suraj Shetty
1469339335 revert: "refactor: new query engine in get_count()"
Co-Authored-By: Gavin Dsouza <gavin18d@gmail.com>
2022-05-17 13:30:36 +05:30
Komal-Saraf0609
fea45bf341
test: Added test script for control type "Color" (#16619) 2022-05-17 12:40:37 +05:30
Ankush Menat
8eaa87b2a2 chore: add exceptions for release PRs 2022-05-17 12:16:03 +05:30
Shariq Ansari
fcfb5ca901
feat: Add font sizes dropdown in text editor(quill) (#16910) 2022-05-17 12:12:03 +05:30
Shariq Ansari
1a4f1a6243
fix(minor): add_options breaking (#16913) 2022-05-16 22:18:01 +05:30
Himanshu
70409a3c7b
fix: set translated text to link field (#15451)
- Fixes [Issue/15324](https://github.com/frappe/frappe/issues/15324)
- When selecting a value for Link Field, the English text was set as link field value.
- This PR aims to fix it by setting the translated text as link field value on selection.

Todo:

- [x] Show translated text in the select dropdown
- [x] Set translated value to Link field on select
- [x] Show original value when link field is in focus
- [x] Add option to toggle this behaviour

### Behaviour

- Link field loses focus: show the translated name.
- Link field is focused
    - If old value is present
        - If options **are** one of [Role, DocType]: show the translated name
        - Else: show the name (untranslated) to enable search in untranslated values
    - Else: show what the user typed (untranslated) to enable search in untranslated values
- Value is selected: link field loses focus

## Demo

### Link to UOM in a custom Item DocType

The UOM names are in english, so the search needs to happen in english. When possible, the translation is displayed.

#### Before

https://user-images.githubusercontent.com/14891507/156415248-e5e80d05-53dc-4ca8-89c7-998986ff6e99.mov

#### After

https://user-images.githubusercontent.com/14891507/156410386-a874430c-f340-43ed-9c3a-92e8d4d50fc9.mov

### Link to DocType in Customize Form

The DocType names get translated before being searched. This is a preexisting hack in the framework for DocType and Role. In this case, we can search in the translations.

#### Before

https://user-images.githubusercontent.com/14891507/156414648-8e505f8c-9dee-4358-8182-3b358c28bb62.mov

#### After

https://user-images.githubusercontent.com/14891507/156411881-c4ca22e1-1397-4e13-9768-5e16b72f8d6d.mov

https://docs.erpnext.com/docs/v13/user/manual/en/customize-erpnext/customize-form/edit?wiki_page_patch=fdafee2715
2022-05-16 13:21:42 +00:00
mergify[bot]
07dd2371b1
fix: Filters Won't Work While Routing in Report (backport #16895) (#16908) 2022-05-16 16:16:41 +05:30
Rushabh Mehta
5958b41c91
Merge pull request #16909 from rmehta/select-fix
fix(minor): refactor add_options
2022-05-16 15:56:02 +05:30
saxenabhishek
2189088459 test: get_query_builder 2022-05-16 15:20:23 +05:30
saxenabhishek
81aed8f900 test: patch_query_execute error case 2022-05-16 15:20:23 +05:30
saxenabhishek
2578868f3f test: Table() from utils 2022-05-16 15:20:23 +05:30
saxenabhishek
f4f42ba91c test: NamedParameterWrapper 2022-05-16 15:20:23 +05:30
saxenabhishek
1df3e8f5e7 test: test agg funtions 2022-05-16 15:20:23 +05:30
saxenabhishek
846b89a703 test: test cast funtion 2022-05-16 15:20:23 +05:30
saxenabhishek
e59c2f7b04 test: match edge case 2022-05-16 15:20:23 +05:30
saxenabhishek
98d21827b3 test: custom func with schema 2022-05-16 15:20:23 +05:30
saxenabhishek
624e68c792 test: custom function 2022-05-16 15:20:23 +05:30
Rushabh Mehta
8b854cac70 fix(minor): refactor add_options 2022-05-16 14:55:31 +05:30
Ankush Menat
1bf272b1d4
fix: add dependent status field in reportview (#16903) 2022-05-16 14:05:35 +05:30
Ankush Menat
a9d6147999
fix(server_scripts): warn about restricted context (#16900)
Server script UX is bad when you don't know what's whitelisted and what isn't... this often requires executing-rewrite-execute cycle for trivial things.

So instead, on saving just compile server script and immediately give warnings for whatever that can be caught at compile time.
2022-05-16 13:34:25 +05:30
Faris Ansari
4b13d6d7e4
fix(webform): only title on the page should be h1 (#16880)
Co-authored-by: Shariq Ansari <sharique.rik@gmail.com>
2022-05-16 13:33:29 +05:30
Shariq Ansari
8a61c7489f
fix(patch): Reload workspace child tables in pre_model_sync (#16897)
* chore: used better db API arguments

Co-authored-by: gavin <gavin18d@gmail.com>
2022-05-14 12:59:54 +05:30
Ankush Menat
26b54221ea test: verify ALL translation file syntax 2022-05-13 16:12:40 +05:30
Ankush Menat
55def8b718 fix: recursion error in translations
If bad translations is found then while `msgprint` it attempts to load
translation again because of its arg `title = _("Message")`
2022-05-13 16:12:40 +05:30
Shariq Ansari
78489cd700
feat: Quick List Block for Workspace (#16887) 2022-05-13 15:34:35 +05:30
Suraj Shetty
a5995b2a10
Merge pull request #16805 from phot0n/autoinc-customize-form-fix
fix: don't allow setting autoincrement autoname from customize form
2022-05-13 07:27:15 +05:30
Ritwik Puri
968343b302
Merge branch 'develop' into autoinc-customize-form-fix 2022-05-13 00:41:58 +05:30
phot0n
f14fb2326d test(customize form): rename test_autoincrement_autoname to test_change_to_autoincrement_autoname 2022-05-13 00:09:51 +05:30
phot0n
f6dac70033 refactor(minor): convert change_name_type_and_make_sequence function to setup_autoincrement_and_sequence method
* chore(Customize Form): remove autoincrement naming option from autoname description

* chore: move sequence cache comment from schema.py to database.py

* chore: added docstrings to some functions
2022-05-13 00:03:19 +05:30
phot0n
b1d61906d1 test: update and rename test_change_autoname
* chore: remove unnecessary decorators for skiprun
2022-05-13 00:03:19 +05:30
gavin
04baffb1ab
Merge pull request #16885 from gavindsouza/show-all-role-warning
fix(ux): Show note on how 'All' Role impacts users
2022-05-12 18:05:56 +05:30
Chillar Anand
485988682d
refactor: Remove dead code (#16886) 2022-05-12 18:04:44 +05:30
gavin
53d2d64e91
Merge pull request #16890 from ankush/bump_plyr
chore: bump plyr to latest version
2022-05-12 18:04:06 +05:30
Ankush Menat
ba5004e5cc chore: bump plyr to latest version 2022-05-12 16:30:30 +05:30
phot0n
82aa8dee08 fix: don't allow autoincrement autoname from customize form
* test: test_change_autoname for doctype

* test: test_autoincrement_autoname for customize form
2022-05-12 15:18:02 +05:30
gavin
20f28e760f
Merge pull request #16888 from gavindsouza/drop-site-no-partial-backup
fix(drop-site): Take full backup before dropping site
2022-05-12 14:40:21 +05:30
gavin
2c6299e65c fix: Take full backup before dropping site 2022-05-12 14:20:13 +05:30