Aayush Dalal
ca5b4cea0b
fix: throw permission error ( #32860 )
2025-06-10 08:47:49 +05:30
Ejaaz Khan
2e0db2d69e
fix: Module not found error for custom doctypes
2025-04-25 14:51:16 +05:30
sokumon
d943c9e463
fix: dont skip if any record is present
2025-02-23 19:49:41 +05:30
sokumon
78df15970c
fix: add check for child doctype if it has a valid parent
2025-02-23 00:59:03 +05:30
Akhil Narang
80d20ff745
fix(get_linked_docs): check if user can read doctype before fetching a list
...
Users might not have access to all the possible linked doctypes - they should still be able to access the others
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-02-12 18:34:43 +05:30
Deepesh Garg
5f31ffcc54
chore: linting issues
2025-01-06 17:55:28 +05:30
Deepesh Garg
d2e4d63c8f
fix: Ignoring linked doctypes on cancel
2025-01-03 18:23:20 +05:30
Gavin D'souza
cdacca91a6
refactor: get_linked_docs
...
- Cleaner logic flows
- Better variables naming & use of standard/cleaner APIs
- Use get_list to show only permitted docs
2024-06-27 13:39:00 +02:00
Akhil Narang
3f1e19de85
refactor(treewide): enable RUF rules
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 16:20:28 +05:30
Akhil Narang
26ae0f3460
fix: ruff fixes
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
8a71054c0c
Merge pull request #24765 from ankush/black_to_ruff
...
ci: switch to ruff-format
2024-02-05 19:20:51 +05:30
Ankush Menat
de9ac89748
style: re-format with ruff
2024-02-05 18:53:33 +05:30
Ankush Menat
b6eef6ebc2
fix: Skip virtual doctypes in link field checks ( #24759 )
2024-02-05 18:04:31 +05:30
Hussain Nagaria
8d2137c265
docs: consistent doc strings
2023-12-18 18:27:39 +05:30
Ankush Menat
6926669577
perf: Ignore amended_from link fields in link field checks
...
Small perf benefit at not much cost. `amended_from` are *always*
refererring to cancelled documents so there's no need to check these
fields.
2023-10-31 15:03:08 +05:30
Ankush Menat
440612f3b9
fix: Check perms before sharing linked docs ( #22783 )
2023-10-17 18:53:09 +05:30
Ankush Menat
018ed845bd
refactor: defer unnecessary json-dumping of messages
...
Also avoid accessing locals where interface is present like for popping last message.
2023-10-16 18:13:50 +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
Ankush Menat
fa6dc03cc8
refactor: frappe.cache() usage to frappe.cache ( #21282 )
2023-06-08 11:47:17 +05:30
Shariq Ansari
da6809ec09
revert: checking if user has permission to meta ( #19485 )
2023-01-05 13:47:14 +05:30
Ankush Menat
025906840d
perf: remove order_by from linked_with checks ( #19229 )
2022-12-12 15:39:46 +05:30
Sagar Vora
b1703117fc
chore: remove unused whitelisting from API ( #19000 )
2022-11-25 11:59:04 +05:30
Ankush Menat
2eec621e95
chore: db.get_all -> get_all
...
Reduces 1 pointless function call.
Function calls are also not "super cheap" in python.
2022-08-22 11:35:14 +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
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
Gavin D'souza
39fc90cb5b
fix(ux): Pop from message_log if DoesNotExistError
2022-03-07 16:35:53 +05:30
Gavin D'souza
38fbe76ebf
fix: Eliminate broken & impermissible links from get_linked_docs
2022-03-07 15:50:17 +05:30
Gavin D'souza
6edb1f09e4
refactor: Fetch Linked Documents in single request ;)
...
This action was broken into some heavy UI stuff that seems to be handled
from the current UI from what I can tell and a request triggered from
the Desk for every suspected linked document (talk about self DOS xD)
Removed long dead with_doctype option in get_linked_docs API. How do i
know it's been long dead? I've not come across code that won't very
obviously break when hit with any non None value.
2022-03-07 15:02:20 +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
Rucha Mahabal
d56fea4a47
fix: use get_all instead of get_list while fetching linked doctypes
2021-12-16 09:11:21 +05:30
Subin Tom
2b8328715e
fix: Sales invoice cancellation error due to get_list ( #15243 )
...
* fix: Sales invoice cancellation error due to get_list
* fix: missed out one `get_list`
2021-12-10 07:51:27 +00:00
Suraj Shetty
615db9b55e
style: Fix sider alerts
2021-11-28 09:44:05 +05:30
Suraj Shetty
3b276df7c1
Merge branch 'develop' into refactor-linked-with
2021-11-03 11:13:53 +05:30
Ankush Menat
af4ce8156d
fix: remove mutable defaults ( #14597 )
...
* fix: mutable defaults
* fix: missing defaults
2021-10-28 09:36:31 +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
leela
8a8fbad0f3
refactor: getting submitted linked reference docs
2021-08-30 12:34:21 +05:30
Gavin D'souza
793b5638d3
style: Fix E201, E202, E401, E701
...
reported by sider: https://sider.review/gh/repos/1864194/pulls/13344?statuses#issues
2021-05-27 12:48:01 +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
Ankush Menat
d25909c799
fix: ZeroDivision error in progress
...
When list of docs is of same length as list of doctypes to ignore, the
formula would throw ZeroDivision error. It's meaningless to subtract
these two quantities hence removed it.
Showing accurate progress bar would require pre-computing number of docs
to be cancelled, which is unnecessary.
Related issue: ISS-20-21-10442
2021-03-17 10:08:50 +05:30
Ankush Menat
fb1eac23c5
docs: update docs for linked_with functions
2021-03-16 11:49:37 +05:30
Anurag Mishra
6bfd07be51
feat: Ignore doctypes for cancel_all ( #11034 )
2020-08-14 16:12:02 +05:30
Prssanna Desai
20815aa349
refactor: remove unnecessary code from get_submitted_linked_docs ( #10844 )
...
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2020-06-30 08:03:28 +05:30
Anand Narayan
fc69f77f73
fix(linked_docs): infinite recursion due to loops
2020-06-27 22:05:24 -07:00
mergify[bot]
4f6f9f3293
fix: check for self linking (bp #10181 ) ( #10426 )
2020-05-20 23:30:27 +05:30
mergify[bot]
0826a9db45
fix: check for self linking and circular linking while getting submitted linked docs (bp #10179 ) ( #10425 )
2020-05-20 21:24:09 +05:30
vishal
b2a44e922e
fix: added auto_cancel_exempted_doctypes in boilerplate
2020-01-13 13:31:00 +05:30
vishal
9cc39377fe
fix: deepsource
2020-01-13 13:31:00 +05:30
vishal
9cf251e53e
fix: Distinct check added for possible links
2020-01-13 13:31:00 +05:30
vishal
9be267b96a
fix: deepsource
2020-01-13 13:31:00 +05:30
vishal
95f04583e2
fix: validation added for cancel document
2020-01-13 13:31:00 +05:30