Commit graph

2484 commits

Author SHA1 Message Date
Ankush Menat
6c79a13641 feat: UUID naming support 2024-03-29 19:02:28 +05:30
Ankush Menat
87ffe25e71
fix: reserved keywords as col name (#25718) 2024-03-29 15:43:33 +05:30
Ankush Menat
23204c0c05
Merge pull request #25256 from ankush/no_commit_doc_events
fix: disable transaction commits during doc events
2024-03-28 12:28:12 +05:30
Ankush Menat
f66b23b96d fix: handle nested event calls
Treat disable_transaction_control as a stack incr/decr when moving in
and out of context.
2024-03-28 11:27:24 +05:30
Ankush Menat
432c8cf48c
Merge pull request #25624 from ankush/creation
fix!: Switch to `creation` as default sort order
2024-03-27 13:25:53 +05:30
Ankush Menat
ff1f8ddbda
fix: allow any sequence container (#25664) 2024-03-27 06:31:15 +00:00
Ankush Menat
dbcf7ad30c refactor: update usage of modified everywhere 2024-03-27 11:23:13 +05:30
Ankush Menat
071e269548 fix!: Switch to creation as default sort order 2024-03-27 11:18:28 +05:30
Dany Robert
6e02df7ea2
fix: ordered fields on get_list returning list (#25663)
* fix: ordered `fields` on get_list returning list

* chore: linters
2024-03-27 05:11:09 +00:00
Ankush Menat
76096f5fb8
perf: use meta for virtual and single checks (#25620)
RQ workers spawn a new process for every job so site_cache does
nothing to prevent repeated queries.
2024-03-26 13:10:15 +05:30
Ankush Menat
a12fc118f4
perf: remove useless sorting on docstatus (#25571) 2024-03-21 06:17:23 +00:00
Ankush Menat
f642b1881f fix: invalid select star expansions 2024-03-20 16:31:02 +05:30
Ankush Menat
065674236c refactor: duplicate check for * 2024-03-20 12:29:58 +05:30
Ankush Menat
5eca52b2c7 fix: only trim tab if it starts with tab 2024-03-20 12:29:58 +05:30
Ankush Menat
ea193ecd48 Revert "Revert "fix: search_link fails when txt contains parentheses (#22892)""
This reverts commit c0cf13b8e8.
2024-03-20 12:29:57 +05:30
Ankush Menat
8a7beebf30
fix: handle distinct for fieldname (#25511)
`distinct count(fieldname)` is supported well but `count(distinct fieldname)` fails if fieldname contains full field with table name included. This PR just adds basic handling for it.

Needs to be rewritten entirely in QB __some day__.
2024-03-18 13:38:29 +00:00
Ankush Menat
adf24b24d4
perf: use base32 space for random names instead of base16 (#25497) 2024-03-17 20:02:57 +05:30
Ankush Menat
ce124d8ec2
fix: Skip virtual doctype rename for dynamic links (#25479) 2024-03-15 14:01:40 +00:00
Ankush Menat
b28db475fd
fix: Skip virtual doctypes while renaming (#25473) 2024-03-15 18:56:22 +05:30
Ankush Menat
f6e58f229c
fix: child table rating fields (#25433) 2024-03-14 09:19:29 +00:00
Ankush Menat
8a3dd85503
Merge pull request #25295 from ankush/virtual-doctype-dx
fix(DX)!: virtual doctype APIs
2024-03-11 18:37:20 +05:30
Ankush Menat
f7c0dd66fd refactor: migrate virtual doctypes to new API 2024-03-11 18:25:05 +05:30
Ankush Menat
b8c4eff68a fix: Skip child table management for children of virt doctypes 2024-03-11 18:15:25 +05:30
Ankush Menat
a28921750d fix(DX): Avoid use of args in virtual doctype 2024-03-11 15:20:35 +05:30
Ankush Menat
68a78d33d3 fix!: Enqueue action after commit 2024-03-11 14:19:59 +05:30
Ankush Menat
495273dcf9 fix: faster change of hash prefix 2024-03-10 21:48:56 +05:30
Ankush Menat
665f1fdf79 perf: optimize hash naming for MySQL storage
Random names can send rows all over the place, typically documents
created closer in time should live closer on mysql pages too.
2024-03-10 21:22:36 +05:30
Ankush Menat
638dbb6bcd fix: disable transaction commits during doc events
- Events like doc.save and doc.submit need to be atomic
- Document hooks can make it not so atomic.

This is extending server script behaviour where server script hooks are
not allowed to commit/rollback.
2024-03-06 14:53:00 +05:30
Suraj Shetty
9a1bd6c1ac
fix: No need to sort keys while saving JSON to DB (#25205)
* fix: No need to sort keys while saving JSON to DB

Also, adding indent is unnecessary.
2024-03-04 05:44:46 +00:00
Ankush Menat
fc5ce044e6 fix: prevent deletion if document is locked 2024-02-29 16:34:39 +05:30
Ankush Menat
8f00aae160 fix: lock the doc before deleting
Locking only prevents this kinda race conditions:
- User A deletes doc
- User B modifies doc so that it's not deletable anymore.
2024-02-29 16:22:02 +05:30
Jannat Patel
898f982a88
fix: replaced created by with owner in base_document (#25059) 2024-02-26 12:12:26 +00:00
Riandrys Gongora Roman
f992821459
fix: translation get label from fieldname 2024-02-22 16:00:59 -05: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
Ankush Menat
beb75ef66e
Merge pull request #24919 from scdanieli/fix-has-value-changed
fix: ensure has_value_changed works for Datetime, Date and Time fields
2024-02-19 10:54:45 +05:30
Ankush Menat
0d847439b6 test: add more tests for has_value_changed 2024-02-19 10:42:21 +05:30
scdanieli
a1cb19c820 fix: ensure has_value_changed works for datetime, date and timedelta fields 2024-02-18 16:05:31 +01:00
Raffael Meyer
fc64e8a0fb
feat: pass doctype as context when translating label (#24903) 2024-02-18 19:42:15 +05:30
Ankush Menat
72c2207e0f refactor: useless use of dict in frappe.get_doc 2024-02-10 12:52:38 +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
d89e0e7e4c feat: let users unlock stuck documents 2024-02-06 12:55:31 +05:30
Ankush Menat
d616341ad4 fix: Auto delete very old document locks
locks older than 12 hours are most likely from dead processes. They can be (mostly) safely ignored.
2024-02-06 12:28:05 +05:30
Ankush Menat
1f9efb7b3f fix: better file locking 2024-02-06 11:55:30 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Raffael Meyer
6c8a08d955
refactor: skip permlevel check if all levels are 0 (#24727)
* refactor: skip permlevel check if all levels are 0

* chore: fix outdated docstring

* chore: equality instead of le
2024-02-05 05:19:09 +00:00
Raffael Meyer
833d108614
fix: remove _lt from frappe.model.std_fields (#24662) 2024-02-01 16:05:25 +05:30
Raffael Meyer
b5f3873177
Merge pull request #24465 from barredterra/extract-js-microtemplate 2024-02-01 10:32:42 +01:00
Ankush Menat
ca293c9aa3 fix: Enqueue deletion of dynamic link after comitting 2024-01-31 18:37:12 +05:30
Ankush Menat
2f28a5e224
Merge pull request #23904 from cogk/fix-fieldlevel-access-to-shared-document-list
fix(meta)!: Allow level 0 fields if a doc has been shared with user
2024-01-29 20:17:29 +05:30
Ankush Menat
d2d1b14cc6 fix: Always allow meta/standard fields in perm level
Perm levels CANNOT applied on these fields so these should ALWAYS be allowed.
2024-01-29 20:00:41 +05:30