Commit graph

1831 commits

Author SHA1 Message Date
Suraj Shetty
f5d89de3bb
Merge pull request #16003 from resilient-tech/update-if-missing 2022-02-23 14:17:44 +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
Suraj Shetty
7ee56ac5eb
Merge branch 'develop' into update-if-missing 2022-02-21 20:12:53 +05:30
mergify[bot]
12870ffd77
Merge pull request #15976 from resilient-tech/perf-tree
perf: reduce one query in `get_controller`
2022-02-16 10:36:02 +00:00
mergify[bot]
32024b4440
Merge pull request #15990 from hrwX/translated_doctype_links
fix: Merge groups for doctype links
2022-02-16 05:24:56 +00:00
Sagar Vora
24a750c048 chore: remove redundant code from update_if_missing 2022-02-16 10:53:03 +05:30
Suraj Shetty
d9ef033927
Merge branch 'develop' into perf-tree 2022-02-16 10:39:52 +05:30
mergify[bot]
a851af05ba
Merge pull request #15963 from resilient-tech/remove-unnecessary-code
perf: reduce loop in `doc.update`
2022-02-16 04:17:41 +00:00
mergify[bot]
4dae96d721
Merge pull request #15957 from resilient-tech/always-set-doctype-for-child
fix: always set `doctype` from `options` for child Document
2022-02-16 03:34:41 +00:00
hrwx
1a912aa787 fix: merge groups for doctype links 2022-02-15 15:14:22 +00:00
mergify[bot]
1df33cbfcf
Merge pull request #15975 from resilient-tech/fix-limit-without-filter
fix: limit without filter
2022-02-15 13:40:56 +00:00
Sagar Vora
1a20f376f3 perf: reduce loop in doc.update 2022-02-15 15:29:04 +05:30
mergify[bot]
4b27569d13
Merge pull request #15962 from resilient-tech/ignore-doctype-in-setter
fix: Ignore `doctype` in setter
2022-02-15 09:31:20 +00:00
Sagar Vora
18ba5fcd49 perf: reduce one query in get_controller 2022-02-15 14:10:55 +05:30
Pruthvi Patel
7ce9f1eaa1 fix: limit without filter 2022-02-15 13:06:55 +05:30
Sagar Vora
8a264d05ca fix: remove ignore_in_getter; cleaner implementation 2022-02-15 13:02:52 +05:30
Gavin D'souza
57c7f63d44 fix: Add ignore_virtual option to get_valid_dict
Allows to create new Documents with virtual docfields
2022-02-14 20:26:56 +05:30
Ankush Menat
c38d1f8a25
Merge pull request #15906 from ankush/ignore_duplicates_db
feat(db/pg): ability to ignore pk collision
2022-02-14 18:58:07 +05:30
Pruthvi Patel
882c68671d fix: ignore doctype in setter 2022-02-14 12:22:40 +05:30
mergify[bot]
04bf47f117
Merge pull request #14593 from gavindsouza/dynamic-docfields
feat: Virtual DocFields
2022-02-14 05:31:35 +00:00
Pruthvi Patel
b1197a89be fix: always set doctype from options for child 2022-02-12 18:21:55 +05:30
Ankush Menat
d3f768fef9 feat(db/pg): ability to ignore pk colission 2022-02-09 16:25:36 +05:30
Rucha Mahabal
78e606bd0f
Merge branch 'develop' into fix-naming-validation 2022-02-09 10:52:24 +05:30
Gavin D'souza
0482f1362a Merge branch 'develop' of github.com:frappe/frappe into dynamic-docfields 2022-02-08 16:50:58 +05:30
Ankush Menat
c5fbd07840
revert: "fix: use now instead of is_async in tests (#15893)" (#15899)
This reverts commit 1cd4722235.
2022-02-07 19:10:42 +05:30
phot0n
7bd84496c1 fix: use int for docstatus in get_default_df 2022-02-07 16:43:16 +05:30
phot0n
266e1f95ed chore: adding back idx column
This is needed for ordering in display of links as it keeps
track of the clicks on a particular link item
2022-02-07 16:40:01 +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
Ankush Menat
1cd4722235
fix: use now instead of is_async in tests (#15893) 2022-02-07 14:00:26 +05:30
Mohammad Hasnain Mohsin Rajan
4ff86e1d63
revert: "refactor: set amended docname to original docname" (#15867)
* Revert: "refactor: set amended docname to original docname"

80d111baf2.

* test: test if amended doc has different name
2022-02-04 17:22:18 +05:30
Raffael Meyer
89922bae90
feat: utility methods for docstatus (#15515)
* feat: utility methods for docstatus

* refactor: use utility method for doctsatus

* refactor: enum for docstatus

* refactor: docstatus as property

* fix: set docstatus

* feat: docstatus extends int class

* test: docstatus of BaseDocument

* refactor: occurrences of docstatus

* fix: typo

* refactor: move docstatus to a separate file

* test: docstatus

* fix: sider
2022-02-04 07:41:25 +00:00
Gavin D'souza
4d00579667 fix: Skip data field validations for virtual field 2022-02-01 18:38:31 +05:30
Gavin D'souza
bd89a9de86 Merge branch 'develop' of github.com:frappe/frappe into dynamic-docfields 2022-02-01 18:14:58 +05:30
Gavin D'souza
5c4905dd37 feat(minor): Allow expressions in options for DocFields
This means you don't have to write a custom controller or change backend
code to use Virtual DocFields! Write it in the options column for the
virtual field in Customize Form

Added doc and safe globals (from safe_exec) into the evaluation
namespace
2022-02-01 18:08:27 +05:30
Gavin D'souza
66b09afda6 fix: Don't create DB column for Virtual DocFields 2022-02-01 17:48:02 +05:30
Gavin D'souza
9e3e3f804a feat: Virtual DocField
Add virtual docfield through which you can make callable properties for
the controller
2022-01-27 22:38:48 +05:30
Gavin D'souza
6c83d82d14 Merge branch 'develop' of github.com:frappe/frappe into dynamic-docfields 2022-01-27 18:50:57 +05:30
Gavin D'souza
d01688bf2d fix: Don't set creation time during doctype sync 2022-01-27 18:33:26 +05:30
Rucha Mahabal
66c8fb9cfa fix: validate doc naming when set via prompt or by passing set_name 2022-01-27 12:24:22 +05:30
gavin
d78b496208
fix(Custom DocPerm): Use Link type instead of Data for parent (#15715)
* fix: Use Link type instead of Data for parent

This makes sure frappe.rename_doc updates linked doctype records

* Revert "fix: Use Link type instead of Data for parent"

This reverts commit 93b37351069df9a79f04bfa326378f09bf97700f.

* fix(rename_doc): Handle re-linking Custom DocPerm records
2022-01-25 11:14:34 +00:00
barredterra
b1383df15a refactor: use is None instead of == None 2022-01-17 10:37:51 +01:00
mergify[bot]
2ea25f0baa
Merge pull request #15615 from ankush/perm_import
fix: AttributeError when calling frappe.permissions.$function
2022-01-14 12:52:56 +00:00
Ankush Menat
d09fd25ad7 fix: import permissions
For some reason not importing this is causing issue with running the
functionality directly; specifically when running from background job.
2022-01-14 18:03:41 +05:30
Rushabh Mehta
853287f49d fix: load user_info on-demand 2022-01-13 16:39:24 +05:30
Gavin D'souza
6502c4b340 fix: Don't add property value if NoneType or Falsy 2022-01-12 16:02:43 +05:30
Gavin D'souza
d9daefc54d fix: Calculate dynamic properties for as_dict
If you have a @property in the controller class, this data used to not
be accessible anywhere other than directly through the object via
`frappe.get_doc`. This fix changes that.
2022-01-12 12:46:08 +05:30
mergify[bot]
6f8f792c01
Merge pull request #15574 from resilient-tech/fix-limit-in-get-method
fix: limit in `Document.get`
2022-01-11 08:18:12 +00:00
Pruthvi Patel
d1852242a0 fix: limit in Document.get 2022-01-10 15:52:25 +05:30
Gavin D'souza
981564e544 Merge branch 'develop' into frappe-postgres-changes 2022-01-07 11:37:28 +05:30
Gavin D'souza
d9b571cf43 refactor(minor): DatabaseQuery.prepare_select_args
* Used regex to replace instead of re-iteration (for-loop)
* Used f-strings for better readability
* Renamed and re-ordered vars, code block
2022-01-07 11:35:52 +05:30