Commit graph

659 commits

Author SHA1 Message Date
Sagar Vora
f35e8045d9 feat: set CORS headers based on allow_cors site config 2021-01-09 14:55:55 +05:30
Rushabh Mehta
b5b3d5a920
Merge pull request #12165 from resilient-tech/perf-get_controller
perf: revert to using global instead of frappe.cache for 75% reduction in call time
2021-01-08 14:33:28 +05:30
Sagar Vora
34ad0cf331 fix: introduce frappe.controllers; clear global if cache is cleared; replace old references 2021-01-07 10:57:08 +05:30
Sagar Vora
213744aa49
test: fix test_money_in_words (#12166) 2021-01-06 17:34:48 +05:30
Sagar Vora
bc305dab10 test: fix test_override_doctype_class by resetting cached values 2021-01-06 16:59:40 +05:30
mergify[bot]
2fd50e1202
Merge pull request #11912 from conncampbell/Read-Only-Grid-Field
fix: Read-only table has read-only form fields.
2021-01-04 09:32:11 +00:00
Prssanna Desai
dc8d6a99d3
Merge pull request #11202 from Monogramm/feat/map-develop 2020-12-29 17:25:41 +05:30
Saurabh
97b693c6b0
feat: Added permission to grant only Select access to document (#12063)
* feat: add permtype 'select' to DocPerm and CustomDocPerm

* feat: add 'select' perm in rights tupple

* feat: provisions to handle select permission

* feat: toggle href based on permissions

* feat: pass permission type explicitly while validating link in permission check

* fix: sider

* feat: added test cases to validate select perm

* feat: add method frappe.only_has_select_perm to explicitly check the select perm

* fix: if user only has select perm then do not show anchor tag for link fields

* fix: sider
2020-12-29 16:58:28 +05:30
Mathieu Brunot
7d490528f5
Merge branch 'develop' into feat/map-develop 2020-12-23 01:28:42 +01:00
Gavin D'souza
2b4299a105 test: Set frappe.conf.developer_mode for test_rename_doc 2020-12-17 11:18:13 +05:30
Gavin D'souza
9d75094ba9 chore: Move reset flags to setup method
Reason for unsetting flags in setUp:
1. frappe.flags.whatever is reset in each request...since it's a werzeug local (ref: https://werkzeug.palletsprojects.com/en/1.0.x/local/)
2. so until it is in the context of current request, it has the same value
3. when you call rename_doc via a request, it's flags are forgotten post that
4. but in a test suite, the whole module's tests run in a single process and the flags aren't (un|re)set
5. which is why frappe.flags.whatever has the same value throughout this module's tests
2020-12-15 21:54:55 +05:30
marination
2d8550619d fix: Reset frappe.flag.link_fields in test
- Reset frappe.flag.link_fields in rename doctype tests
- Teardown doctypes appropriately after test
2020-12-15 16:04:16 +05:30
Gavin D'souza
1a5ed2a6fd Merge branch 'develop' of github.com:frappe/frappe into fix-broken-folders 2020-12-10 14:17:05 +05:30
Faris Ansari
9e954a7372 style: quotes 2020-12-10 13:52:21 +05:30
Faris Ansari
5a60048a0a test: for get_bench_relative_path 2020-12-10 12:31:01 +05:30
Abhishek Balam
e306f5601c fix: made requested changes 2020-11-30 18:58:53 +05:30
Abhishek Balam
8f8489d9b3 fix: test fix 2020-11-30 17:43:28 +05:30
Abhishek Balam
f7444b7b44 fix: removed unused import 2020-11-30 15:01:07 +05:30
Abhishek Balam
76b3fd811e fix: added tests, cleaned up code 2020-11-30 14:56:56 +05:30
Gavin D'souza
147a3def0d fix: Use get_value to find value of linked_to_doctype instead
Tests ran successfully when run locally for mariaDB and postgres
2020-11-27 18:36:23 +05:30
Gavin D'souza
8a6bdf5466 chore: Move rename doctype method to dedicated TestCase
Co-authored-by: Marica <maricadsouza221197@gmail.com>
2020-11-27 16:49:49 +05:30
Gavin D'souza
861f41684c Merge branch 'develop' of github.com:frappe/frappe into fix-broken-folders 2020-11-27 16:23:59 +05:30
Gavin D'souza
58806db5c7 Merge branch 'develop' of github.com:frappe/frappe into rename-doc-rename-link-fields 2020-11-27 15:10:02 +05:30
Gavin D'souza
d8335e7a0e Merge branch 'develop' of github.com:frappe/frappe into fix-broken-folders 2020-11-23 11:17:41 +05:30
barredterra
e93a38f912 refactor: move encode_params from test to oauth2.py 2020-11-20 19:02:33 +01:00
conncampbell
2c4b5c67b0 fix: Read-only table has read-only form fields. 2020-11-19 14:05:11 -07:00
Gavin D'souza
f1cd3388ba style: Black-ish + fixed typos + Optimized imports 2020-11-17 16:29:54 +05:30
Gavin D'souza
2911799046 fix: Re-write restore tests to process another site 2020-11-17 15:14:23 +05:30
Gavin D'souza
84e2fcd6a8 fix: Add missing quote 2020-11-17 12:33:59 +05:30
Gavin D'souza
22b752ac21 test: Add tests for bench restore 2020-11-13 20:38:44 +05:30
Gavin D'souza
05c8e3c5a7 Merge branch 'develop' of github.com:frappe/frappe into skip-backup-tables 2020-11-13 19:44:17 +05:30
Gavin D'souza
6357bb6392 test: Drop table if exists 2020-11-12 11:51:42 +05:30
Gavin D'souza
71225783e6 test: Rename doc tests 2020-11-11 20:05:31 +05:30
Gavin D'souza
a22cd461ac test: Commit after insert, not before count check 2020-11-10 13:34:48 +05:30
Gavin D'souza
34af8cb326 fix: Show partial backups when flag set
* in fetch_latest_backups whitelisted API
* BackupGenerator.get_recent_backup
2020-11-10 13:12:22 +05:30
Gavin D'souza
3fed5c7255 test: Add tests for bench partial-restore 2020-11-10 13:11:34 +05:30
Gavin D'souza
7394427df0 test: Add tests for bench list-apps 2020-11-09 16:45:21 +05:30
gavin
91822b3c3d
Merge branch 'develop' into rename-doc-rename-link-fields 2020-11-09 15:45:37 +05:30
Gavin D'souza
fb0d1fbac1 Merge branch 'develop' of github.com:frappe/frappe into skip-backup-tables 2020-11-09 14:53:59 +05:30
Gavin D'souza
012f98191a Merge branch 'develop' of github.com:frappe/frappe into fix-broken-folders 2020-11-09 10:56:02 +05:30
gavin
9571fb0269
Merge pull request #11830 from gavindsouza/fix-remove-from-installed-apps
fix: Clear cache after updating defaults manually
2020-11-06 16:49:52 +05:30
Gavin D'souza
d284d38b62 Merge branch 'develop' of github.com:frappe/frappe into fix-remove-from-installed-apps 2020-11-05 18:30:38 +05:30
Suraj Shetty
5632541b99
Merge branch 'develop' into non_negative 2020-11-04 15:14:28 +05:30
marination
841f2f4a36 chore: Rename Doctype Test and more explicit comment
- Better decription of why the fix is done, what case it handles
- Test for Renaming Doctype and Record having same name as DocType
2020-11-03 21:57:26 +05:30
Gavin D'souza
5ba92a3ae1 test: Use insert instead of save 2020-11-03 15:42:52 +05:30
Gavin D'souza
50f6f83912 test: Added tests for dt controller + db sync 2020-11-03 15:11:38 +05:30
Gavin D'souza
cb44492feb test: Added tests for bench remove-from-installed-apps 2020-11-03 13:55:26 +05:30
Suraj Shetty
3368d83238
fix: Remove @ from relevance query (#11837) 2020-11-02 13:07:09 +05:30
Deepesh Garg
3d9e4bbd8e Merge branch 'develop' of https://github.com/frappe/frappe into non_negative 2020-10-29 16:53:36 +05:30
Deepesh Garg
dbd8f52e54 feat: Non negative check for Int, Float and Currency fields 2020-10-29 16:40:38 +05:30