Commit graph

29 commits

Author SHA1 Message Date
Ankush Menat
81b37cb7d2
refactor: clean up code to py310 supported features (#17367)
refactor: clean up code to py39+ supported syntax

- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes

Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
2022-07-01 11:51:05 +05:30
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
barredterra
745297a49d refactor: a not in b
Search: if not ([\w\d]*?) in ([\w\d]*?)
Replace: if $1 not in $2
2022-02-21 19:54:34 +01:00
Conor
40ba1ac9ba fix: Postgres Compatibility
* Handle inconsistencies in type handling in DatabaseQuery & Database
  APIs
* Update incompatible queries with frappe.qb notation
* Fixed use cases discovered by failing ERPNext CI tests

fix: db independent syntax for user_type

fix: handle postgres datetime values

feat: add ability to auto commit on db inserts

feat: add ability to escape underscore in postgres

fix: handle missing data in test runner bootstrapping

fix: db independent syntax for queries

fix: refactor to use qb

fix: update cache for language

fix: use pluck in email_queue

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

fix: don't auto insert on tests for make_property_setter

fix: remove auto_commit in custom_field insertion

fix: remove auto_commit functionality

fix: review comments

fix: revert link validation

fix: style suggestion for readability

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

fix: revert .lower() in link validation

fix: add rollback for setup_wizard

Revert "fix: add rollback for setup_wizard"

This reverts commit 83b3b0913db17718ccd5edae01858cff15603829.

Revert "feat: add ability to escape underscore in postgres"

This reverts commit 8ed9c2aa3306438e94bb813f60e65b416d0b947b.

fix: more concise representation of order fields

Co-authored-by: gavin <gavin18d@gmail.com>
2022-01-07 10:44:57 +05:30
leela
768e4052f9 fix: node creation from tree view
(cherry picked from commit f8cd2ad388c96eefff4730ce130806231bc0d87e)
2021-09-06 07:04:05 +00:00
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
e407b78506 chore: Drop dead and deprecated code
* Remove six for PY2 compatability since our dependencies are not, PY2
  is legacy.
* Removed usages of utils from future/past libraries since they are
  deprecated. This includes 'from __future__ ...' and 'from past...'
  statements.
* Removed compatibility imports for PY2, switched from six imports to
  standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
  versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
2021-05-26 15:31:29 +05:30
Suraj Shetty
06ea52b964
fix(treeview): Accept filters as kwargs to avoid TypeError (#12920) 2021-04-20 14:54:40 +05:30
mustafaelagamey
75822a323a
fix: Remove cmd only if exist (#12886)
* only remove cmd if exist

When calling this function from backend this line raises key error as there's no such key called cmd

* style: Simplify code

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2021-04-18 04:46:19 +00:00
Sagar Vora
3b3b9e7e4a fix: create _get_children for passing ignore_permissions when needed 2021-04-01 15:04:51 +05:30
Rushabh Mehta
248e9cd7d1 feat(doctype-urls): pretty doctype urls and removed social JS code 2020-11-16 09:44:56 +05:30
Glen Whitney
a24104da53
feat(treeview): Display multiple roots automatically in tree view (#10967)
Co-authored-by: Prssanna Desai <prssud@gmail.com>
2020-09-07 10:24:30 +05:30
Deepesh Garg
86263496d5 fix: Remove unnecessary code from treeview 2020-02-18 09:01:24 +05:30
Aditya Hase
56f6bcc261
fix(desk): Pop data from keyword arguments when it isn't needed (#7082) 2019-03-14 18:53:29 +05:30
Zarrar
a7a3d0da20 extract value from dict (#5733) 2018-06-27 15:13:22 +05:30
Zarrar
ff83f97f44 fix filter query for get_children tree query (#5655) 2018-06-05 10:28:52 +05:30
Suraj Shetty
555a80d8ac Treeview permissions (#5615)
* Replace frappe.db.sql to frappe.get_list to apply permissions (#5556)

* Replace frappe.db.sql with frappe.get_list
- Permission check for treeviews

* Optimize get_role_permissions
- Avoid setting of roles each time when is_perm_appicable is called

* Fix codacy
- Remove trailing whitespace

* Add parent filter

* Add ifnull check
2018-05-27 12:48:49 +05:30
Rushabh Mehta
a2e1af2a55
Revert "Replace frappe.db.sql to frappe.get_list to apply permissions" (#5559)
* Revert "[minor] remove in_dialog old property"

This reverts commit b4650f42a1.

* Revert "JWT response does not contain email attribute for Office 365, reading upn instead (#5525)"

This reverts commit 51f5988a76.

* Revert "Fix "frappe.is_user_logged_in" js function (#5548)"

This reverts commit affe5b8659.

* Revert "[Translation] Updated Translations (#5552)"

This reverts commit f3930a7026.

* Revert "Fix a bug with whitelisted method (#5551)"

This reverts commit 92e4db1dd9.

* Revert "Python 3 fixes for PR bot (#5554)"

This reverts commit 7b003a71bc.

* Revert "Replace frappe.db.sql to frappe.get_list to apply permissions (#5556)"

This reverts commit 2e52177f51.
2018-05-16 12:57:43 +05:30
Suraj Shetty
2e52177f51 Replace frappe.db.sql to frappe.get_list to apply permissions (#5556)
* Replace frappe.db.sql with frappe.get_list
- Permission check for treeviews

* Optimize get_role_permissions
- Avoid setting of roles each time when is_perm_appicable is called

* Fix codacy
- Remove trailing whitespace
2018-05-16 11:10:45 +05:30
Saurabh
7d150a49a3 [fix] pass is root parameter on node creation (#4730) 2018-01-01 16:12:10 +05:30
Rushabh Mehta
d5af6dd9c8
[fix] treeview fixes, adding title field (#4463)
* [fix] treeview fixes, adding title field

* [fix] [tree] add a flag is_root
2017-11-10 18:52:17 +05:30
Zarrar
f81bee7d05 minor fix to suppport treeview for task (#4279) 2017-10-17 12:23:42 +05:30
Nabin Hait
5c3bbe8ef4 Get parent node for tree view 2017-02-17 15:49:23 +05:30
Saurabh
8c0a67cde8 [fix] make tree params which includs custom mandatory params (#2571) 2017-01-12 11:26:14 +05:30
Rushabh Mehta
e0d582bfd4 [minor] expand all in tree frappe/erpnext#6915 (#2431) 2016-12-09 16:00:48 +05:30
Saurabh
7d5123dd54 [fix] pull all madatory fields from meta while creatting new node in tree 2016-09-19 16:45:07 +05:30
Saurabh
737a46bfec [fix] convert is_group from select type to check 2016-07-14 18:22:20 +05:30
Saurabh
3209cb274c [fixes] rename ctype to doctype 2016-06-25 09:35:57 +05:30
Saurabh
9323595708 [enhance] hookable treeview 2016-06-25 09:35:56 +05:30