Commit graph

38014 commits

Author SHA1 Message Date
Faris Ansari
96b30e714c feat: table_field.fieldname field syntax for db_query 2022-05-27 16:04:22 +05:30
Ankush Menat
6e53c3d339
fix: use reference to form instead of global var (#16942) 2022-05-20 15:11:01 +05:30
Suraj Shetty
9975391210
Merge pull request #16939 from surajshetty3416/fix-link-popover 2022-05-20 12:01:45 +05:30
Suraj Shetty
bb91907fd0 fix(form): Use actual doctype of link intead of parent doctype
Due to this wrong doctype, Link Preview popover was not working as expected.
2022-05-20 11:02:28 +05:30
Suraj Shetty
3234ad4a8e
Merge pull request #16936 from ron-ulitsky/patch-1 2022-05-20 08:57:32 +05:30
Ron Ulitsky
65b1474cad
Update importer.py
fixed bug that returned incorrect extensions for file paths with directories containing full stops
2022-05-19 14:29:36 -05:00
Ankush Menat
d667f169df
fix: Dashboard charts not loading (#16921)
* fix: field undefined in chart widget

* fix: check if email signature was returned

arrays are truthy empty array wont fail first check but fail with "can't
read signature of undefined"

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2022-05-19 18:11:13 +05:30
gavin
fcef38b185
Merge pull request #16932 from gavindsouza/db.query++
refactor: frappe.db.query
2022-05-19 18:07:01 +05:30
gavin
a20800ee2b fix: mport module from line N shadowed by loop variable
Flake8 F402 reported by sider
2022-05-19 17:45:22 +05:30
gavin
db11af2a5c feat(wip): Custom filters in db.query engine
* Added provision for semi-implemneted version
    * Hard to fix it completely given it's broken on develop / desk
* Added TODO for adding nestedset related filters
2022-05-19 17:31:35 +05:30
Ankush Menat
e8657d52ed
fix: remove old test runner doc (#16929)
Not sure from where this ever came but on some old site it's present and
causes installation issue.

closes https://github.com/frappe/frappe/issues/16917
2022-05-19 15:50:33 +05:30
Suraj Shetty
9b324b47c8
Merge pull request #16928 from shariquerik/quick-list-fix 2022-05-19 15:39:02 +05:30
Shariq Ansari
70fae0b725
Merge branch 'develop' into quick-list-fix 2022-05-19 15:04:15 +05:30
Ankush Menat
fcb9597f88 fix: make error log reference fields read only 2022-05-19 15:02:43 +05:30
Shariq Ansari
3a2cd2650e test: fixed failing UI test 2022-05-19 15:00:54 +05:30
Shariq Ansari
da999a9727 chore: used variable for better code visibility 2022-05-19 13:07:47 +05:30
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
gavin
72ad582b8a fix(db.query): Casefold key to match operators 2022-05-18 16:59:53 +05:30
gavin
5ebaf42468 feat(db.query): Add support for timespan operator 2022-05-18 16:59:10 +05:30
gavin
7c77bedbf2 refactor: Simplify logic + Add typing hints 2022-05-18 16:57:54 +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