Commit graph

128 commits

Author SHA1 Message Date
Ankush Menat
824229ce0a refactor: no need to cast bools manually 2023-10-16 18:13:50 +05:30
Ankush Menat
bf037acb5b chore: deprecate get_js
Pointless function for loading public JS files
2023-09-23 15:30:23 +05:30
barredterra
88c8baa9ee refactor: for append to extend, merge list extend
Replace a for append loop with list extend.
Create the list with values instead of creating
an empty list and extending it with another list.
2023-08-09 13:25:39 +02:00
Gavin D'souza
84ccf3d128 fix: Apply field permlevel for doc GET via REST 2023-01-09 15:47:21 +05:30
marination
d6bdd636dc fix: Check Reference Doctype perms & control indicator change
- Don’t change indicator on filter change if user can’t write to board. They can’t save filters
- Invoke `update_order` on Kanban board init() only if user has `write` access to reference doctype (non-deliberate invocation)
- All deliberate invocations of `update_order` via UI actions are blocked/hidden without `write` access
- Remove elements with no access instead of hiding to avoid inspect element hacks
- Card Actions: Block card dragging if no `write` access to reference doctype
- Card Actions: Block card adding  if no `create` access to reference doctype
2022-11-25 12:13:49 +05:30
marination
299831d209 fix: server method to return evaluated dict of perms for a document 2022-11-16 19:24:12 +05:30
Raffael Meyer
09d35c74eb
fix: remove redundant translation (#18775) 2022-11-06 17:27:02 +05:30
Faris Ansari
aa8957e785
fix(insert_many): list instead of set to maintain order (#18641) 2022-10-28 14:37:17 +05:30
Faris Ansari
8acbc38670 fix: raise error if child doc not found 2022-10-18 13:46:57 +05:30
Faris Ansari
55bc60433f fix(frappe.client): delete child doc via parent
so that parent's on_update is called
no change for deletion of normal doctype
2022-10-18 01:23:37 +05:30
Ankush Menat
0686097de2
fix: get single doc using client.get (#17817) 2022-08-13 14:38:06 +05:30
Sagar Vora
ebb0cd13fe
perf: reduce DB call in frappe.client.get (#17665) 2022-08-02 15:38:39 +05:30
Sagar Vora
9a7f92ca1d fix!: allow system managers to toggle email queue 2022-07-18 16:53:49 +00:00
Sagar Vora
6597dedaed
chore!: remove unused APIs from frappe.client (#17446)
chore: remove unused APIs from `frappe.client`
2022-07-08 10:49:39 +05:30
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
Sagar Vora
217644ac07
fix!: remove unnecessary get_default API (#17295) 2022-06-27 01:01:03 +05:30
Raffael Meyer
7b67e1f847
fix: translate doctype in error messages (#17239) 2022-06-20 10:35:57 +05:30
Ankush Menat
5affa2248d
fix: pass parent doctype on client.get_value (#17196) 2022-06-15 14:59:25 +05:30
Gavin D'souza
5ec2690160 Merge branch 'develop' into refactor-file 2022-06-01 15:47:55 +05:30
phot0n
b1a2007024 fix: use set instead of list in insert_many client function 2022-05-11 23:41:47 +05:30
phot0n
98c60dbb1f chore: remove else condition, improve formatting & comment in insert_doc 2022-05-06 23:59:11 +05:30
phot0n
534911a1b4 refactor(minor): move out common functionality in insert and insert_many client functions
to a separate function
2022-05-06 00:27:09 +05:30
Faris Ansari
95816f0340 fix: better validation for child insert 2022-04-24 10:38:58 +05:30
Gavin D'souza
4b51b72119 Merge branch 'develop' of github.com:frappe/frappe into refactor-file 2022-04-18 17:28:56 +05:30
Gavin D'souza
42a020978d refactor(minor): frappe.client.attach_file
* Use standard doc.check_permission instead
* Don't re-check for http method type inside API
* Cleanup variable naming
* Return file object - let the API layer manage marshalling /
  serialization
2022-04-18 12:04:02 +05:30
Faris Ansari
7233c257c7 fix: handle filters passed as dict to client.get 2022-04-16 05:45:15 +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
phot0n
b31f3c24f6 refactor: remove parent, parenttype, parentfield, idx columns from non-child table doctypes
* feat: add parent, parenttype, idx, parentfield columns to doctypes when transitioning from normal -> child table

* fix: remove parent, parenttype, parentfield, idx from DocType DocType
2022-02-07 15:12:37 +05:30
Gavin D'souza
d81fe8699c feat: frappe.db.set_single_value
Alias to frappe.db.set_value without having to pass the doctype name
twice or teh second one as None

Other changes:
* set/get db APIs for single DocTypes
* Make use of redundant cache key in frappe.db.get_single_value
2022-01-10 21:03:14 +05:30
Gavin D'souza
3b7b555148 fix: Pass parent_doctype required for DatabaseQuery perm checks
has_child_table_permission would throw 'Parent DocType Required: Please
specify a valid parent DocType for {TEST DOCTYPE}' after the previous
commit 33b7d7d74f. Passing parent_doctype
solves this
2021-12-24 13:57:07 +05:30
Ankush Menat
b1d0e574a0 feat(REST): OR filters in REST API 2021-11-27 17:17:05 +05:30
Sagar Vora
0b0f896258 fix: cleaner implementation for link validation 2021-11-12 10:36:21 +05:30
Sagar Vora
af41d9f8a5 fix: stricter validation 2021-11-11 12:29:49 +05:30
Sagar Vora
9503e7788a fix: restore validate_link 2021-11-11 12:24:22 +05:30
Faris Ansari
179960d67f
Merge pull request #14134 from netchampfaris/print-format-builder-beta
feat: New Print Format Builder
2021-10-25 12:12:08 +05:30
Sagar Vora
b60f0772db fix: do not pop doctype and docname 2021-10-23 15:51:16 +05:30
mergify[bot]
868d545ba5
Merge branch 'develop' into print-format-builder-beta 2021-10-22 04:38:08 +00:00
Sagar Vora
9df93d341b fix: ignore flags in frappe.client.bulk_update 2021-10-21 15:35:02 +05:30
Faris Ansari
f4bd62c010 feat: More features
- Letterhead editing
- Edit Header and Footer
- Margin Text
- PrintFormatGenerator class handles generation of HTML and PDF and repeating of Header/Footer
- Simplify /printpreview
- Separate renderer files for each fieldtype
2021-09-15 18:50:41 +05:30
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
ahashad
ecb81929c7
Update client.py (#12790)
Fix You do not have enough permissions to access this resource Error, when adding barcode during creating new stock Item.
2021-04-08 04:43:36 +00:00
Walstan Baptista
193dbec47c
fix: frappe.client.get_value() to work when as_dict is false (#12739) 2021-03-31 16:33:34 +00:00
Rushabh Mehta
d959fc7310 fix(minor): tests and linting 2021-03-30 11:52:46 +05:30
Rushabh Mehta
2248c6c410 fix(minor): lockdown frappe.client.get_list 2021-03-30 11:25:40 +05:30
Saurabh
a0086db9b6
fix(frappe client): validate http method for frappe.client api (#11228) 2020-09-14 12:30:30 +05:30
Rushabh Mehta
7895ddf865 fix(minor): client.get_value fix for single 2020-08-22 21:18:38 +05:30
Rushabh Mehta
2b80e710bc fix(minor): client.get_value fix for single 2020-08-22 21:15:45 +05:30
Rushabh Mehta
ffa785bb47 fix(client.py): fix get_value for name 2020-08-21 15:14:59 +05:30
Rushabh Mehta
a4dfac507b fix(minor): use get_list in client.get_value for tighter checks 2020-08-19 14:57:59 +05:30