Commit graph

50376 commits

Author SHA1 Message Date
Ayush Chaudhari
761751f269
feat: App-Defined Workflow Tasks and Server Scripts on Transition (#33255)
* feat: add workflow task doctypes

* chore: add Workflow Task to Script Type of Server Scripts

* chore: add description for Workflow Tasks

* feat: fetch dotted paths and corresponding names from hooks

* fix: use Select field instead of Autocomplete

* feat: execute tasks in the background on state transition

* fix: throw error when task not found

* fix: naming for transition task set by user

* fix: child table views

* feat: support for server scripts

* chore: comments and description

* fix: change the casing of docevent options

* fix: change test casing

* feat: Add Workflow Transition field to webhooks

* fix: temporarily remove filter

* feat: add webhooks as workflow actions

* test: test execution of synchronous app-defined methods and server scripts

* chore: shorten the description and change the fieldname of the field 'execute_asynchronously' to 'asynchronous'

* test: server script executipn

* fix: add field to UI

* test: change customer to domain

* test: change Customer to Domain

* fix: patch for change in webhook fields

* chore: fetch only used fields in get_all

* fix: don't run test logic in application code 🙂

* test: separate tests for workflow tasks

* Revert "fix: patch for change in webhook fields"

This reverts commit 2e9c51c43ca2b3698991fbe75cc4032368ab174c.

* chore: break into smaller functions

* test: webhooks with workflow tasks

isolate mock responses to test_sync_tasks

* Revert "fix: change test casing"

This reverts commit e2bad96ed01dea0a26d002ea44a1e0175525ed31.

* Revert "fix: change the casing of docevent options"

This reverts commit ddfc81bf775fad74225f25815b8e3e7b255dc9eb.

* fix: webhook casing

* fix: type hint for doc
2025-07-29 11:01:44 +05:30
Elton Lobo
6d1008933f
feat: add user invitation doctype & related public methods (#33308)
* feat: add user invitation doctype & related public methods

* style(user-invitation): execute formatters & add semgrep comments

* refactor(user-invitation): use `is` to compare `None` values

* fix(user-invitation): skip fetching `after_accept` for default app

* fix(user-invitation): translate email templates

* fix(user-invitaton): return pending invites from invite by email api

* refactor(user-invitation): improve code quality

* fix(user-invitation): translate all error messages

* refactor(user-invitation): improve security & readability

Improvements:
- move invite expiration check to `daily_maintenance`
- explicitly import all of the used packages
- specify methods for all security-critical endpoints
- improve error messages and give them suitable titles
- remove unnecessary utility functions
- make invitation key management secure
- translate all of the subjects of the sent emails
- use the `app_title` hook to create email titles
- commit the work done after each iteration of the background invitation
  expiry checker
- restructure code to improve readability
- use `user.reset_password` to generate the target link
- use clear long names to name identifiers
- add document states with relevant colors (User Invitation doctype)
- differ `sendmail` emails whenever possible
- send an email to the invitation creator instead of the invitee after
  the invite has expired
- remove `User Invitation Manager` role

* fix(user-invitation): use valid emails to test doctype & related code

* feat(user-invitation): support adding multiple roles

* refactor(user-invitation): mark relevant fields `set only once`

* feat(user-invitation): add `Cancelled` status

* test(user-invitation): correct broken tests

* test(user-invitation): form valid f-strings & run code formatter

* feat(user-invitation): make doctype usable from desk

* fix(user-invitation): remove delete permission from invitation doctype

* feat(user-invitation): pass user inserted info to `after_accept` hook

* refactor(user-invitation): improve custom action methods & errors

Improvements:
- trigger actions only when the invitation is in the `Pending` state
- use lowercase letters to start error messages
- handle cases where `user_invitation_hook` is not defined

* refactor(user-invitation): remove site name from email templates

* docs(user-invitation): add internal documentation

* feat(user-invitation): add 'get pending' & cancel invites apis

* fix(user-invitation): make invitation app specific

* refactor(user-invitation): avoid mixing function programming

* fix(user-invitation): make apis usable for app specific valid users

* fix(user-invitation): allow app specific invites

* feat(user-invitation): make list view & permission checks app specific

* refactor(user-invitation): convert class methods to static when possible

* feat(user-invitation): add `app_only_for` method to the doc

* fix(user-invitation): f-string syntax error in `get_permission_query_conditions`

* docs(user-invitation): add examples & improve the internal doc

* refactor: rename method name

static_ is unnecessary
only_for doesn't make sense in this context when arguments are not roles

* fix: Support POST request too

We dont follow REST semantics 100%, anything that modifies something
should ideally be doable with POST too.

* chore: cap

* fix: Avoid ignore_permissions as user arg

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-07-28 16:25:53 +05:30
Akhil Narang
3c4dc61b7a
Merge pull request #33437 from vehbiu/develop
fix(utils): convert phone numbers passed into validate_phone_number to strings
2025-07-28 15:43:37 +05:30
Soham Kulkarni
64db88228f
refactor: seperate blogs into a seperate app (#32737)
* fix: remove doctypes,workspace blocks, files

* fix: minor python tests and UI tests

* fix: remove blog post from tests

* fix: remove blogger as role for tests

* fix: add check for if doctype exists

* fix: ui test

* fix: more cleanup

* fix: cleanup comments and fix test_query

* fix: resolve conflicts

* fix: add warning and handle comments
2025-07-28 14:35:02 +05:30
Rahul Agrawal
20e4815d81
fix: Default currency symbol in query report total row (#33429) 2025-07-28 11:41:44 +05:30
Raffael Meyer
4983c3fc34
fix: prevent logout due to empty "Password" field (#29158)
* fix: prevent logout due to empty "Password" field

* fix: validate_api_key_secret

- We don't want get decrypted password to raise a ValidationError
- If api_key, api_secret or doc_secret are empty, we want an AuthenticationError
2025-07-28 10:04:10 +05:30
Ejaaz Khan
5ae46feb13
Merge pull request #33438 from frappe/l10n_develop
fix: sync translations from crowdin
2025-07-27 18:01:37 +05:30
MochaMind
213ce53b0d fix: Persian translations 2025-07-27 04:06:20 +05:30
MochaMind
a8cd9f3c89 fix: Indonesian translations 2025-07-26 04:10:13 +05:30
Vehbi Unal
c6a2e6595a fix(utils): convert phone numbers passed into validate_phone_number to strings 2025-07-24 13:02:55 +00:00
MochaMind
f08776b208 fix: Serbian (Cyrillic) translations 2025-07-24 03:23:15 +05:30
MochaMind
6174af9755 fix: Serbian (Latin) translations 2025-07-24 03:23:13 +05:30
Niraj Gautam
aca2801897
Parse html to text in export_query (#32794)
* fix: Parse html to text in export_query

* chore: Use xlsx data for csv content
2025-07-23 18:19:52 +05:30
mahsem
3efc476da9
fix: web_form_context_title_translation (#33173) 2025-07-23 18:14:33 +05:30
Raffael Meyer
93b4700899
fix: make labels in error message translatable (#33166) 2025-07-23 18:11:51 +05:30
Kitti U. @ Ecosoft
74683428cf
feat: Add hook on print pdf (#33387) 2025-07-23 10:45:39 +05:30
MochaMind
e7ad633b15
fix: sync translations from crowdin (#33423) 2025-07-22 21:59:18 +00:00
Raffael Meyer
6cb5f7287a
feat: allow user to change timezone (#33419) 2025-07-22 19:50:12 +02:00
MochaMind
0cdf9b2d05
fix: sync translations from crowdin (#33409) 2025-07-22 00:04:38 +02:00
Shadrak Gurupnor
68246a73fb
fix: add order_by params to Frappeclient get_list (#33324)
* fix: add order_by params to client getlist

* fix(test): Test for groupby and orderby

* chore: pre-commit

* fix(test): Add test for group_by

* fix(test): Use dbapi for testing

* linter fix

* chore(test): linter
2025-07-21 19:23:32 +05:30
Akhil Narang
1cc3c6aff0
Merge pull request #33344 from akhilnarang/fix-orderby-groupby
fix(db_query): improve order_by/group_by sanitization
2025-07-21 19:19:25 +05:30
MochaMind
9836f835c8
chore: update POT file (#33394) 2025-07-21 13:48:23 +02:00
Ejaaz Khan
8cbb944165
Merge pull request #33396 from iamejaaz/42088-link-title-issue
fix: link field title not reliable
2025-07-21 01:20:01 +05:30
Ejaaz Khan
59a6604b70 fix: link title not being translated 2025-07-20 21:25:29 +05:30
Ejaaz Khan
41f0eac98b
Merge pull request #33378 from frappe/l10n_develop
fix: sync translations from crowdin
2025-07-20 19:14:17 +05:30
Ejaaz Khan
ddba77bb1c
Merge pull request #33392 from Venkateshvenki404224/fix-maintenance-mode-session-bug
fix: handle None session.data in maintenance mode (fixes #33258)
2025-07-20 19:11:03 +05:30
Soham Kulkarni
fa7040fcbb
fix: use correct route (#33393) 2025-07-20 13:30:41 +05:30
MochaMind
19534de7c2 fix: Persian translations 2025-07-20 02:53:06 +05:30
Venkatesh M
96e0f49df4 fix: handle None session.data in maintenance mode (fixes #33258)
- Add null check for session.data in safe_exec.py
- Add null check for session.data in base_template_page.py
- Prevents AttributeError when session.data is None during maintenance mode
2025-07-19 16:02:57 +00:00
Ankush Menat
996843f11b
Merge pull request #33391 from ankush/perf/safe_exec
perf: ~10x faster server script execution
2025-07-19 19:45:06 +05:30
Ankush Menat
b94b6ec939 perf!: Compute safe exceptions only once 2025-07-19 19:29:27 +05:30
Ankush Menat
38365beb52 perf: Compute safe utils only once
300us -> 60us for this silly change LOL!
2025-07-19 18:49:24 +05:30
Ankush Menat
17a1244585 perf: Always use cached config for checking safe_exec
It expires in 1min anyway
2025-07-19 18:14:04 +05:30
Ankush Menat
bddc89544d perf: Cache safe_exec compilation 2025-07-19 18:04:29 +05:30
Soham Kulkarni
377e3640af
fix: open sidebar on mobile (#32945)
* fix: open sidebar on mobile

* fix: show logo from app_data

* fix: show correct logo in toolbar
2025-07-18 13:32:07 +05:30
MochaMind
e536c4d41e fix: Serbian (Cyrillic) translations 2025-07-18 01:44:21 +05:30
MochaMind
00a237b6b9 fix: Serbian (Latin) translations 2025-07-18 01:44:12 +05:30
MochaMind
cc82ef51dc fix: Persian translations 2025-07-18 01:44:03 +05:30
MochaMind
c70d3b5c41 fix: Swedish translations 2025-07-18 01:43:55 +05:30
Soham Kulkarni
f6d1af5693
Merge pull request #33368 from sokumon/date-datetime-recursion
fix(datetime): add a should refresh check to avoid recursion in grid
2025-07-17 19:40:25 +05:30
MochaMind
590dc3aae4
fix: sync translations from crowdin (#33332) 2025-07-17 15:12:24 +02:00
sokumon
33f0781bf9 fix(datetime): add a should refresh check to avoid recursion in grid 2025-07-17 18:30:13 +05:30
Ejaaz Khan
acf798c1cd
Merge pull request #33356 from iamejaaz/41091-copy-doctype
fix: copy doctype not working
2025-07-17 16:33:05 +05:30
Ejaaz Khan
5b8f0727ac fix: copy doctype not working 2025-07-16 18:03:34 +05:30
Akhil Narang
6c47ed2fa7
Merge pull request #33351 from akhilnarang/fix-dashboard-chart-permission-query
fix(dashboard_chart): check for `Group By` chart type as well in permission query
2025-07-16 15:26:55 +05:30
Akhil Narang
29d7a5b94d
fix(dashboard_chart): check for Group By chart type as well in permission query
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-07-16 13:16:01 +05:30
Diptanil Saha
725659972e
fix: export query report hidden columns (#33350) 2025-07-16 12:33:50 +05:30
Nihantra C. Patel
03109a7b67
fix: Remove specific links from Integrations workspace and reindex (#33285)
* fix: update the Integrations workspace

* fix: Remove specific links from Integrations workspace and reindex

* fix: again update the Integrations workspace

* fix: remove patch as per comment

* fix: remove custom button Newsletter from email group doctype
2025-07-16 12:14:15 +05:30
Prafful S
bd4fc118e5
feat: Database SSL one way support (#33044)
* feat: Support one-way SSL authentication for database connections

Updated MariaDB database connection to support one-way SSL authentication

* feat(database): Add support for MySQLClient one-way SSL connections

* feat: Format and pre-commit

* fix: Default option for hostname check

* chore: simplify

Signed-off-by: Akhil Narang <me@akhilnarang.dev>

---------

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
Co-authored-by: Akhil Narang <me@akhilnarang.dev>
2025-07-16 06:36:19 +00:00
Diptanil Saha
ba298488c5
feat: include hidden columns in query report export file (#33333) 2025-07-16 11:22:07 +05:30