Commit graph

2659 commits

Author SHA1 Message Date
gavin
d193ea22d1
Merge pull request #17007 from gavindsouza/frappe-qb-subquery
refactor(qb): Term subqry renamed to SubQuery
2022-05-27 23:48:07 +05:30
Shariq Ansari
8f245be460
fix: Strip all spacing characters from Message-ID & In-Reply-To (#16999) 2022-05-27 21:06:07 +05:30
gavin
e92ead1257 refactor: Re-write queries using SubQuery 2022-05-27 17:32:37 +05:30
gavin
15af545acf chore: Update typing + noqa - flake8 failures 2022-05-23 18:55:55 +05:30
gavin
6dedf899ff
Merge pull request #16899 from ChillarAnand/imports
refactor: Removed unused imports & added flake8 check in CI
2022-05-23 15:53:18 +05:30
chillaranand
6afe4809f2 refactor: Clean up setup file 2022-05-21 08:27:04 +05:30
gavin
db11af2a5c feat(wip): Custom filters in db.query engine
* Added provision for semi-implemneted version
    * Hard to fix it completely given it's broken on develop / desk
* Added TODO for adding nestedset related filters
2022-05-19 17:31:35 +05:30
chillaranand
25f82e966c refactor: Remove unused imports & code 2022-05-19 15:34:35 +05:30
chillaranand
1d763a6659 refactor: Fix flake8 issues 2022-05-19 15:34:35 +05:30
gavin
7c77bedbf2 refactor: Simplify logic + Add typing hints 2022-05-18 16:57:54 +05:30
Abhishek M
378149375d
fix: Passing dev server variable to jenv globals correctly (#16843)
Encountered the same issue during a fresh setup: https://discuss.erpnext.com/t/v13-fresh-install-develop-socket-io-using-wrong-port/74562

The problem originates from the `socketio_client.js` file.  During development, the `socket.io` client by default sends request to port 8000 but ideally it should've been 9000 (that's where it's actually running) since the latter is defined in `frappe.boot.socketio_port`. This is happening because the `jenv` variable `dev_server` is always being returned as 0.

In [this](0f7d8e7903/frappe/__init__.py (L237)) line, we are seting `frappe.local.dev_server` but in safe exec we are using `frappe._dev_server` as the source to populate the variable `dev_server` which eventually gets pushed to the `app.html` via `jinja`. (`frappe._dev_server` evaluates to `None`)

In `socketio_client`, we are using [this](0f7d8e7903/frappe/public/js/frappe/socketio_client.js (L112)) variable as a flag to decide whether or not `frappe.boot.socketio_port` should be the port that the `socket.io` client connects to.
2022-05-18 09:19:24 +00:00
Chillar Anand
485988682d
refactor: Remove dead code (#16886) 2022-05-12 18:04:44 +05:30
gavin
cdb92f2dfa
Merge pull request #16747 from ChillarAnand/atom
feat: Added force flag to install-app command
2022-05-12 13:50:16 +05:30
Ankush Menat
8c02971224 chore: misleading typehint
[skip ci]
2022-05-12 11:30:05 +05:30
Ritwik Puri
7fa9c42711
Merge branch 'develop' into atom 2022-05-11 22:35:09 +05:30
phot0n
c89a66a694 fix: only set home_page in after_install, if the key doesn't have value 2022-05-11 16:18:14 +05:30
phot0n
5b4fb3f2cf fix: don't add navbar items if theyre already present
* fix: don't set installed_apps global value in after_install hook
2022-05-11 16:18:14 +05:30
chillaranand
d2b63d0935 feat: Added force flag to install-app command 2022-05-11 16:18:14 +05:30
Ankush Menat
c55c8e4f97
refactor(DX): add type hints for some utilities (#16871)
- Added type hints to majority of most used functions in `utils/data.py`
- added overloads for functions whose output depends on input type. This helps A LOT if your LSP supports type narrowing (like pyright)


Example:
Same function with 3 diff singatures narrowed by input value. 
<img width="1270" alt="Screenshot 2022-05-10 at 8 02 02 PM" src="https://user-images.githubusercontent.com/9079960/167653595-2ab9441f-da40-4645-aa87-9ec0d96cbec9.png">
2022-05-11 06:14:31 +00:00
gavin
3370d227e8
Merge branch 'develop' into dashboard-view-fixes 2022-05-10 17:47:31 +05:30
Ankush Menat
8a1889301a chore!: remove dead hooks app_icon & app_color 2022-05-10 14:41:01 +05:30
Ankush Menat
42942f36a6 feat: provide github workflow for unittest in new app 2022-05-10 14:41:01 +05:30
Ankush Menat
3fd4759dd4 fix: gitignore node_modules in new frappe apps 2022-05-10 14:41:01 +05:30
Ankush Menat
53f54c3761 refactor: use click for new-app prompts 2022-05-10 14:41:01 +05:30
Ankush Menat
74d7753a5a refactor: split make_boilerplate function 2022-05-10 14:41:01 +05:30
Gavin D'souza
d0efa8e3ff fix: Show site name along with debugging messages
Without the site name, the output doesn't really make sense :')
2022-05-10 13:33:53 +05:30
Suraj Shetty
ccc82e2c4c
Merge pull request #15538 from noahjacob/phone_field_control
feat: Phone Control Type
2022-04-28 10:27:52 +05:30
barredterra
8f53a039a6 refactor: Sync fixtures 2022-04-26 23:43:07 +02:00
Raffael Meyer
5d61482fb3
fix: Replace password with asterisks before logging (#16743) 2022-04-26 10:30:46 +00:00
Saurabh
e2d3d1d0be
feat: provision to handle payment authorization event in server script for custom documents (#16712)
Currently, there is no provision to handle payment authorization events via server script. So it's not possible if a user wants to link payments against custom documents. 

Thus adding a provision in server script 
- Setup checkout for custom doc 
<img width="1299" alt="Screenshot 2022-03-11 at 2 44 19 PM" src="https://user-images.githubusercontent.com/3784093/157838010-989f6009-83d6-4329-92a6-bb2b6b38438b.png">

- Handle payment callback
<img width="1051" alt="Screenshot 2022-04-22 at 11 28 19 AM" src="https://user-images.githubusercontent.com/3784093/164612613-d321edb3-c7f8-4063-b809-8ae5fe46ee66.png">

## Documentation
https://frappeframework.com/docs/v13/user/en/desk/scripting/server-script/edit?wiki_page_patch=bbed0fcd9a
2022-04-26 10:02:30 +00:00
Shadrak Gurupnor
e0c89cdc73
fix: properly validate google sheets url (#16683)
* fix: properly validate google sheets url

* fix: check for spreadsheets in path

* fix(minor): error should throw if any of the cond fails
2022-04-26 15:17:19 +05:30
gavin
5f2f387a9c
Merge pull request #16130 from gavindsouza/bg-rename_doc
feat: Async Document Renaming
2022-04-26 12:57:31 +05:30
gavin
2da85fa8da
Merge pull request #16698 from gavindsouza/traceback-with-context
feat: Traceback with context
2022-04-22 13:04:07 +05:30
Gavin D'souza
ffc2b9427f Merge branch 'develop' of github.com:frappe/frappe into bg-rename_doc 2022-04-22 12:14:21 +05:30
Gavin D'souza
ab1f893e41 feat: Add get_mapped_doc in safe_exec under frappe 2022-04-21 16:52:06 +05:30
Gavin D'souza
9823e51512 feat(safe_exec): Allow new_doc, get_last_doc, rename_doc, delte_doc
* rename_doc points to the unwhitelisted method which supports
  ignore_permissions check
* Allowed other safe utils for better DX
2022-04-21 16:00:24 +05:30
Gavin D'souza
418dcdd2f4 fix!: Use event as a differentiator for frappe.utils.log 2022-04-21 13:33:40 +05:30
Gavin D'souza
4e533682ba feat: get_traceback with context 2022-04-21 13:26:12 +05:30
Gavin D'souza
892e05fdc1 Merge branch 'develop' of github.com:frappe/frappe into bg-rename_doc 2022-04-20 16:04:27 +05:30
Suraj Shetty
8f94cb655f
Merge branch 'develop' into phone_field_control 2022-04-19 16:28:18 +05:30
Rushabh Mehta
6e6fe9521e fix(linting): no single quotes :'| 2022-04-18 17:29:03 +05:30
Rushabh Mehta
57a55e4225 feat(minor): Add document reference to Error Log and doc.log_error 2022-04-18 17:29:03 +05:30
Deepesh Garg
2af2b80ba6
feat: Expose add index in exec_globals (#16605)
* feat: Expose add index in exec_globals

* fix: Linting issues
2022-04-14 18:59:39 +05:30
Suraj Shetty
a396afc7d4 fix: Validation error 2022-04-14 17:05:07 +05:30
Suraj Shetty
48cd1c2ad4 refactor: Fix naming and simpify code
- Ability to clear code, by hiting backspace
2022-04-14 14:14:00 +05:30
Gavin D'souza
66655eb8ed Merge branch 'develop' of github.com:frappe/frappe into bg-rename_doc 2022-04-14 13:41:56 +05:30
Noah Jacob
1637e3af08 fix: linting 2022-04-12 21:06:59 +05:30
Noah Jacob
c2f2fc10e7 Merge branch develop into phone_field_control 2022-04-12 20:40:29 +05:30
Ankush Menat
3fb1eaf13b
perf: dont query for impossible child/ancestor (#16577)
Also avoid manual plucking
2022-04-12 13:31:57 +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