Commit graph

46040 commits

Author SHA1 Message Date
Ankush Menat
da682ae44c
fix: type error in workflow (#25847)
if state is null, we can't get roles for it.
2024-04-08 12:59:23 +05:30
Richard Case
551c8d5ef4
fix: log report errors to aid debugging (#25738) 2024-04-08 12:21:41 +05:30
Ankush Menat
9524413eff
fix: limit select user to desk users by default (#25843) 2024-04-08 12:20:34 +05:30
Ankush Menat
2a363e7aed
Merge pull request #25833 from ankush/drop_ui_test
chore: Drop API tests
2024-04-07 11:32:22 +05:30
Ankush Menat
adcb9ef72a chore: Drop API tests
These are already tested with far more coverage in server side tests.
2024-04-07 11:29:41 +05:30
Ankush Menat
0a06455012
Merge pull request #24209 from barredterra/attribution-page
feat: auto-generated attribution page
2024-04-07 11:04:46 +05:30
barredterra
43a991ecc5 fix: limit attribution page to system users 2024-04-06 20:23:56 +02:00
barredterra
027682fcc9 feat: link to attribution page in about modal 2024-04-06 20:21:14 +02:00
barredterra
595bb20a97 Merge remote-tracking branch 'upstream/develop' into attribution-page 2024-04-06 20:00:16 +02:00
Ankush Menat
41ca767f66
Merge pull request #25592 from ankush/extensible_socketio
feat: Extensible SocketIO
2024-04-06 21:49:54 +05:30
Ankush Menat
266b2797aa refactor: use Fetch API instead of superagent 2024-04-06 21:26:45 +05:30
Ankush Menat
2a56869c99 refactor: better permission checking on sockets
- no more "can subscribe X"
- add a new util function on socket `has_permission`

Basic usage:

```js
socket.has_permission(doctype, [name]).then(() => { // do something });
```
2024-04-06 21:14:48 +05:30
Ankush Menat
4778090024 refactor!: Frappe handlers using same extensible socketio 2024-04-06 18:39:16 +05:30
Ankush Menat
a313fb90cb fix(DX): no need to specify separate hook for socketio 2024-04-06 18:28:49 +05:30
Ankush Menat
e055d2742a
build(deps): bump pillow again (#25827)
GHSA-44wm-f244-xhp3
2024-04-06 12:49:06 +00:00
Ankush Menat
39f7e4e92e fix: avoid crashing on handler import/execution
Can't do much for events, but at least here we can ignore the errors.
2024-04-06 18:17:27 +05:30
Ankush Menat
b7f2073380 feat: Extensible SocketIO
You can now specify custom event handlers for SocketIO.

Usage:

1. In your app's hooks.py add `has_realtime_event_handlers=True` so
Framework can assume your app contains custom handler and import them.
2. Create a file called `/app/realtime/handlers.js` with single module
   export a function that will setup handlers using socket.

Here's sample code:

```js
// This is /app_root/realtime/handler.js`

function chat_app_handlers(socket) {
    socket.on("hello_chat") {
	console.log("hello world!");
    }
}

module.exports = chat_app_handlers;
```

3. Restart SocketIO server and see if it worked by sending event from
   client. In desk based app you can do
   `frappe.realtime.socket.emit("hello_chat")`

Middlewares are not yet possible... will be worked upon __some other day__ [tm]

closes https://github.com/frappe/frappe/issues/21528
2024-04-06 18:17:27 +05:30
Frappe PR Bot
28860abbe6
fix: sync translations from crowdin (#25780)
* fix: Spanish translations

* fix: Turkish translations

* fix: Spanish translations

* fix: German translations

* fix: Spanish translations

* fix: Spanish translations

* fix: German translations

* fix: Turkish translations

* fix: Bosnian translations

* fix: Turkish translations

* fix: Bosnian translations
2024-04-06 18:15:27 +05:30
Akhil Narang
310cedf749
fix(grid): ensure that doc.name is truthy before proceeding (#25800)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-06 18:14:18 +05:30
Nabin Hait
7252d1561f
fix: Don't assign returned values if row is deleted (#25806) 2024-04-06 18:07:17 +05:30
Ankush Menat
4a99f09fcd
Merge pull request #25577 from barredterra/quill-paragraph-spacing
fix: paragraph spacing in quill
2024-04-06 17:57:59 +05:30
Ankush Menat
21a36553f2
Merge pull request #25733 from ankush/bigint
fix: bigint validation
2024-04-06 11:23:04 +05:30
Ankush Menat
eef9c2c8cc refactor!: Better Integer handling
- Remove length: it makes no difference, it's for ZEROFILL only.
- Switch to tinyint for checkboxes in mysql and smallint on postgres.
- Use `int` instead of `bigint` by default.
2024-04-06 11:11:29 +05:30
Ankush Menat
b493bfe7c2 fix(DX): annotate chainable methods with Self return 2024-04-06 11:04:55 +05:30
Ankush Menat
30f00fd5f3 fix: invlaid integer validations for biging
closes https://github.com/frappe/frappe/issues/25566
2024-04-06 11:04:55 +05:30
Ankush Menat
500992615f
Merge pull request #25812 from ankush/up_strict
fix!: Don't let users with write access to UP bypass UP
2024-04-05 19:05:45 +05:30
Ankush Menat
99952880cc fix!: Don't let users with write access to UP bypass UP
IDK why we truly need this, except maybe debugging sometimes. This just
causes confusion and people keep reporting this as security issue.
2024-04-05 18:55:27 +05:30
Akhil Narang
504aab4f38
Merge pull request #25799 from barredterra/exclude-some-options-from-translation
fix: exclude some untranslatable select options
2024-04-04 15:44:09 +05:30
barredterra
1a1cdf21bf fix: exclude some untranslatable select options 2024-04-04 11:50:33 +02:00
Ankush Menat
97798303d5
Merge pull request #25794 from nabinhait/contact_address_fix
fix: Column 'creation' in order clause was ambiguous
2024-04-04 14:09:30 +05:30
Akhil Narang
8404b1844c
Merge pull request #25793 from Nihantra-Patel/fix_dash_trans
fix: translation of dashboard chart and number card label
2024-04-04 13:20:43 +05:30
Nabin Hait
6a6193a26b fix: Column 'creation' in order clause was ambiguous 2024-04-04 13:02:08 +05:30
Nihantra C. Patel
b9ed9a95ae
fix: translation of dashboard chart and number card label prettier 2024-04-04 12:35:14 +05:30
Nihantra C. Patel
51a87ae33b
fix: translation of dashboard chart and number card label 2024-04-04 12:26:50 +05:30
Akhil Narang
0f15ecf1c2
Merge pull request #25787 from akhilnarang/dashboard-chart-fix-KeyError
fix: errors with dashboard chart
2024-04-04 11:41:50 +05:30
Akhil Narang
45934f5dfb
Merge pull request #25778 from akhilnarang/fix-grid-row-removal-crash
fix(grid): don't crash if row doesn't exist
2024-04-03 14:03:29 +05:30
Akhil Narang
c2d8ee2bbb
fix: ensure we don't try to add int and NoneType
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-03 13:58:23 +05:30
Akhil Narang
61dfbe2f9f
fix(dashboard_chart): use dict.get() to avoid a KeyError
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-03 12:44:19 +05:30
barredterra
1dbc1aafa4 style: format with ruff 2024-04-02 22:22:05 +02:00
barredterra
7e12238511 Merge remote-tracking branch 'upstream/develop' into attribution-page 2024-04-02 22:20:42 +02:00
Ankush Menat
d1210f7edc
Merge pull request #25507 from GursheenK/announcement-widget-navbar
feat: navbar announcement widget
2024-04-02 22:38:52 +05:30
Raffael Meyer
b0cc60115a
Merge pull request #25782 from barredterra/dont-translate-product-name 2024-04-02 17:17:31 +02:00
barredterra
f5e4a59ff9 fix: product name should not be translatable 2024-04-02 17:16:14 +02:00
Akhil Narang
49fce67e88
Merge pull request #25752 from maharshivpatel/print-format-validate-in-install
fix: add in_install flag to print_format validate
2024-04-02 17:14:48 +05:30
Akhil Narang
31c6df248d
fix(grid): don't crash if row doesn't exist
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-02 16:59:02 +05:30
Akhil Narang
b9f413f21e
Merge pull request #25763 from akhilnarang/revert-conditional-msgprint
fix: clear last message log when exception has been handled
2024-04-01 21:57:16 +05:30
Akhil Narang
da563ef0e4
fix(event): clear message after handling exception
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-01 21:46:15 +05:30
Akhil Narang
bf931598a2
Revert "Merge pull request #25755 from akhilnarang/optional-skip-msgprint"
This reverts commit f8121b99df, reversing
changes made to 14e2d95947.
2024-04-01 21:42:12 +05:30
Akhil Narang
2bf0ab079a
feat(customize_form): allow setting creation as a default sort field (#25760)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-01 19:08:11 +05:30
Akhil Narang
f8121b99df
Merge pull request #25755 from akhilnarang/optional-skip-msgprint
feat: allow skipping msgprint
2024-04-01 16:57:12 +05:30