Commit graph

46014 commits

Author SHA1 Message Date
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
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
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
Akhil Narang
ca83ad580c
feat: allow skipping msgprint
If we're handling the exception on our own, we don't need to show the user anything
Example: https://github.com/frappe/frappe/blob/version-15/frappe/desk/doctype/event/event.py#L398

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-04-01 14:21:47 +05:30
Maharshi Patel
9739023c59 fix: add in_install flag to print_format validate
don't validate "Standard Print Format cannot be updated" during installation
2024-04-01 11:59:02 +05:30
Akhil Narang
14e2d95947
Merge pull request #25554 from barredterra/filter-email-recipients
feat: add option to filter email recipients
2024-03-31 14:50:12 +05:30
barredterra
470f128581 fix: frm can be missing 2024-03-31 00:04:25 +01:00
barredterra
e854b7ba5d Merge remote-tracking branch 'upstream/develop' into filter-email-recipients 2024-03-31 00:01:09 +01:00
Ankush Menat
561617d5db
fix: allow disabling logging on CRON jobs (#25742)
Some crons are very very small duration and don't require logging
either. We should let users decide if they want to disable logging.
2024-03-30 06:21:56 +00:00
Maxim Sysoev
f32c3aa3a8
fix(ListView): In ListView make visible link title value for Subject column (#25569)
* fix(ListView): In ListView make visible link tite value for Subject column

Fixes #25567

* Revert "fix(ListView): In ListView make visible link tite value for Subject column"

This reverts commit eea3ea0a148f6f5800f1b008f97f8a86b4e6ebe8.

* fix: show title in subject field

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-03-30 11:23:01 +05:30
Ankush Menat
ea5e1b61ad
fix: cint -> avoid precision loss if already integer (#25735) 2024-03-29 22:31:53 +05:30
Ankush Menat
a6732a0e12
fix: set db name in filter (#25732) 2024-03-29 16:06:02 +00:00
Ankush Menat
bb26d8f678
Merge pull request #25730 from ankush/ulid_naming
feat: UUID naming support
2024-03-29 21:25:07 +05:30
Ankush Menat
8c6e3a56c6 feat: UUID name implementation for postgres 2024-03-29 21:02:54 +05:30
Ankush Menat
8cc6c31f0e fix: Allow switching between UUID and VARCHAR
- VARCHAR -> UUID = Only allowed when table is empty for now
- UUID -> VARCHAR is not lossy, can be done anytime.
2024-03-29 19:02:28 +05:30
Ankush Menat
1ec4d658fc fix: Allow setting UUID to application code 2024-03-29 19:02:28 +05:30
Ankush Menat
6c79a13641 feat: UUID naming support 2024-03-29 19:02:28 +05:30
Akhil Narang
ae34b12ce8
Merge pull request #22548 from blaggacao/feat/uds
feat: support unix domain sockets
2024-03-29 18:11:01 +05:30
Akhil Narang
0d3b2499fc
fix: don't use frappe.flags for mariadb_user_host_login_scope
This gets reset whenever we call `frappe.init()` again

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 16:57:04 +05:30
Gursheen Anand
2c0498cbdd fix: use boot to store announcement 2024-03-29 16:24:41 +05:30
Ankush Menat
de48dc2c04
fix: db explain (#25724)
This broke from some recent changes.

It's just a wrapper, so probably no one uses it.
Anyway, fixed and added test to prevent it.
2024-03-29 10:23:12 +00:00
Corentin Flr
e8fe24d7df
feat(router): Go to default workspace when clicking app logo (#25706) 2024-03-29 15:44:25 +05:30