Commit graph

47182 commits

Author SHA1 Message Date
Akhil Narang
5570aa71be
fix(sessions): logout properly when user requests logout on password change
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-27 17:58:20 +05:30
Akhil Narang
dcd14d07dc
Merge pull request #27515 from Ninad1306/map_docs_fix
fix: Update Child table from the Last Source Doc
2024-08-27 13:29:20 +05:30
David Arnold
33de9ea8c6
Merge pull request #27237 from blaggacao/feat/datatable-tree-depth-on-query-reports
feat: set variable datatable tree depth
2024-08-27 09:36:19 +02:00
Akhil Narang
beadf189bf
Merge pull request #27528 from akhilnarang/escape-html-awesomebar
fix(search_utils): escape HTML before displaying in awesomebar
2024-08-27 11:26:24 +05:30
Rushabh Mehta
dfd7606d03
Merge pull request #27499 from rmehta/espresso-sidebar
feat(design): espresso style sidebar
2024-08-27 09:16:57 +05:30
Rushabh Mehta
2823f1a595 fix(minor): style fixes 2024-08-27 08:59:00 +05:30
Rushabh Mehta
25d1218f20
Merge pull request #27441 from cogk/fix-form-geolocation-field-in-tabbed-layout
fix(form): Fix Geolocation/Signature fields in tabbed layout
2024-08-26 23:44:11 +05:30
Rushabh Mehta
5a5fa9a440 fix(tests): workspace, awesome_bar 2024-08-26 23:06:19 +05:30
Rushabh Mehta
8793ca506f fix(tests): workspace 2024-08-26 22:04:20 +05:30
Rushabh Mehta
77b11dd1ce fix(tests): workspace tests and more style fixes 2024-08-26 18:15:59 +05:30
Akhil Narang
fbdd9e2484
fix(search_utils): escape HTML before displaying in awesomebar
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-26 16:21:57 +05:30
Rushabh Mehta
72eb501de3 fix(minor): breadcrumbs without app icon 2024-08-23 22:15:35 +05:30
Rushabh Mehta
b31cf8ba79 fix(style): sidebar overlay + polishes 2024-08-23 22:15:35 +05:30
Rushabh Mehta
087ee41ea1 feat(design): espresso style sidebar 2024-08-23 22:15:33 +05:30
Akhil Narang
a162e61e26
Merge pull request #27518 from akhilnarang/fixup-27495
fix(grid): `this` is defined here, meant to check if `this.grid_rows_by_docname` was defined
2024-08-23 16:21:29 +05:30
Akhil Narang
7828c51d90
fix(grid): this is defined here, meant to this if this.grid_rows_by_docname was defined
Followup to #27495

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-23 16:07:22 +05:30
Akhil Narang
09c28f1fd1
Merge pull request #27495 from akhilnarang/fix-grid-error
Each individual commit message has details
2024-08-23 14:48:13 +05:30
Ninad1306
827acd2975 fix: update child table value from the last doc 2024-08-23 12:47:08 +05:30
Akhil Narang
9ebda98c2d
Merge pull request #27494 from akhilnarang/fix-ratelimiter
fix(rate_limiter): we can't call str.join([]) with NoneTypes in the list
2024-08-23 10:46:33 +05:30
Raffael Meyer
f7fb0d7b35
fix(Workspace): translatable sidebar sections (#27281) 2024-08-22 14:03:15 +00:00
Akhil Narang
eb509e9ae8
fix(query_report): sentry FRAPPE-2TF
```
TypeError: Cannot read properties of undefined (reading 'map')
  at items.action(../../../../../apps/frappe/frappe/public/js/frappe/views/reports/query_report.js:1688:39)
  at $link(../../../../../apps/frappe/frappe/public/js/frappe/ui/page.js:506:11)
  at jQuery.event.dispatch(../../../../../apps/frappe/node_modules/jquery/dist/jquery.js:5135:27)
  at elemData.handle(../../../../../apps/frappe/node_modules/jquery/dist/jquery.js:4939:28)
  at sentryWrapped(../../../../../apps/frappe/node_modules/src/helpers.ts:98:1)
```

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-22 15:29:44 +05:30
Akhil Narang
678a404181
fix(table_multiselect): sentry FRAPPE-6QQ
```
TypeError: Cannot read properties of undefined (reading 'fields')
  at frappe.ui.form.ControlTableMultiSelectget_link_field(../../../../../apps/frappe/frappe/public/js/frappe/form/controls/table_multiselect.js:151:28)
  at frappe.ui.form.ControlTableMultiSelectset_formatted_input(../../../../../apps/frappe/frappe/public/js/frappe/form/controls/table_multiselect.js:124:27)
  at _a.set_input(../../../../../apps/frappe/frappe/public/js/frappe/form/controls/data.js:247:8)
  at update_input(../../../../../apps/frappe/frappe/public/js/frappe/form/controls/base_input.js:89:8)
  at _a.refresh_input(../../../../../apps/frappe/frappe/public/js/frappe/form/controls/base_input.js:110:5)
  at frappe.ui.form.Controlrefresh(../../../../../apps/frappe/frappe/public/js/frappe/form/controls/base_control.js:140:9)
  at frappe.ui.form.Layoutattach_doc_and_docfields(../../../../../apps/frappe/frappe/public/js/frappe/form/layout.js:490:59)
  at frappe.ui.form.Layoutrefresh(../../../../../apps/frappe/frappe/public/js/frappe/form/layout.js:344:8)
  at frappe.ui.form.Formrefresh_fields(../../../../../apps/frappe/frappe/public/js/frappe/form/form.js:679:15)
  at <anonymous>(../../../../../apps/frappe/frappe/public/js/frappe/form/form.js:618:16)```

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-22 15:27:40 +05:30
Akhil Narang
cfc8d7a010
fix(print_utils): simplify checks
Make it more readable, and prevent error

Sentry FRAPPE-4SQ

```
TypeError: Cannot read properties of undefined (reading 'default_letter_head')
  at frappe.ui.get_print_settings(../../../../../apps/frappe/frappe/public/js/frappe/form/print_utils.js:6:65)
  at items.action(../../../../../apps/frappe/frappe/public/js/frappe/views/reports/query_report.js:1640:29)
  at $link(../../../../../apps/frappe/frappe/public/js/frappe/ui/page.js:506:11)
  at jQuery.event.dispatch(../../../../../apps/frappe/node_modules/jquery/dist/jquery.js:5135:27)
  at elemData.handle(../../../../../apps/frappe/node_modules/jquery/dist/jquery.js:4939:28)
  at sentryWrapped(../../../../../apps/frappe/node_modules/src/helpers.ts:98:1)```

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-22 15:25:42 +05:30
Akhil Narang
7547937521
fix(query_report): sentry FRAPPE-6P0
TypeError: Cannot read properties of undefined (reading 'ref_doctype')
  at <anonymous>(../../../../../apps/frappe/frappe/public/js/frappe/views/reports/query_report.js:417:58)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-22 15:25:16 +05:30
Sagar Vora
3eeeab72a2
Merge pull request #27346 from Ninad1306/before_mapping
fix: Before Mapping the Doc run `before_mapping` hook
2024-08-22 15:11:33 +05:30
Akhil Narang
00cfaa719e
fix(grid): check that this.grid_rows_by_docname isn't undefined
Sentry FRAPPE-60X

```
TypeError: this.grid_rows_by_docname is undefined
  at Grid.set_value(../../../../../apps/frappe/frappe/public/js/frappe/form/grid.js:793:41)
  at fn(../../../../../apps/frappe/frappe/public/js/frappe/form/form.js:317:40)
  at o/<(../../../../../apps/frappe/frappe/public/js/frappe/model/model.js:604:27)
```

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-22 14:51:28 +05:30
Akhil Narang
ad0a9106de
fix(rate_limiter): we can't call str.join([]) with NoneTypes in the list
Default to an empty string for `user_key`

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-22 14:25:03 +05:30
Akhil Narang
43385060e1
Merge pull request #27491 from akhilnarang/revert-27386
revert: Merge pull request #27386 from GursheenK/grid-dependent-fields
2024-08-22 12:54:19 +05:30
Kunhi
2596fb7a2f
fix: Unable to save JSON field type in the customize form. (#27472)
* fix: Unable to save JSON field type in the customize form

* fix: run pre-commit

* precommit, fix

* precommit, linter issue
2024-08-22 12:49:01 +05:30
Akhil Narang
38f4871e23
Revert "Merge pull request #27386 from GursheenK/grid-dependent-fields"
This reverts commit ede8e06c03, reversing
changes made to 35fb0e2687.
2024-08-22 12:38:40 +05:30
Akhil Narang
273545dcae
Merge pull request #27474 from akhilnarang/notify-email-queue-suspended
chore(email_queue): nudge user to resume email queue if suspended and they are manually sending
2024-08-22 12:12:15 +05:30
Akhil Narang
44b091552c
Merge pull request #27477 from ljain112/fix-in-create
fix: correct permissions for user cannot create doctypes
2024-08-22 11:11:51 +05:30
Akhil Narang
7e2a69a95b
Merge pull request #27480 from akhilnarang/fix-notification-error-handling
fix(notification): can't use `message` where it isn't defined
2024-08-22 11:04:27 +05:30
Akhil Narang
88aa0fa34d
Merge pull request #27481 from akhilnarang/fix-rate-limiter-keyerror
fix(rate_limiter): prevent KeyError if the key isn't defined in form_dict
2024-08-22 11:04:12 +05:30
Akhil Narang
0af673a571
fix(rate_limiter): prevent KeyError if the key isn't defined in form_dict
Use dict.get(), it'll just return `None` if the key isn't present
(also will handle a `None` key just fine)

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-22 10:47:32 +05:30
Akhil Narang
b4c53392d7
fix(notification): can't use message where it isn't defined
Sentry FRAPPE-7VT

Partial revert of 8a7707e3fa

```
UnboundLocalError: cannot access local variable 'message' where it is not associated with a value
  File "frappe/app.py", line 114, in application
    response = frappe.api.handle(request)
  File "frappe/api/__init__.py", line 49, in handle
    data = endpoint(**arguments)
  File "frappe/api/v1.py", line 36, in handle_rpc_call
    return frappe.handler.handle()
  File "frappe/handler.py", line 49, in handle
    data = execute_cmd(cmd)
  File "frappe/handler.py", line 85, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "__init__.py", line 1768, in call
    return fn(*args, **newargs)
  File "frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "frappe/desk/form/save.py", line 37, in savedocs
    doc.submit()
  File "frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
  File "frappe/model/document.py", line 1048, in submit
    return self._submit()
  File "frappe/model/document.py", line 1031, in _submit
    return self.save()
  File "frappe/model/document.py", line 337, in save
    return self._save(*args, **kwargs)
  File "frappe/model/document.py", line 390, in _save
    self.run_post_save_methods()
  File "frappe/model/document.py", line 1131, in run_post_save_methods
    self.run_method("on_submit")
  File "frappe/model/document.py", line 964, in run_method
    self.run_notifications(method)
  File "frappe/model/document.py", line 1024, in run_notifications
    _evaluate_alert(alert)
  File "frappe/model/document.py", line 1007, in _evaluate_alert
    evaluate_alert(self, alert.name, alert.event)
  File "frappe/email/doctype/notification/notification.py", line 517, in evaluate_alert
    msg = f"<details><summary>{title}</summary>{message}</details>"
```

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-22 10:43:36 +05:30
Sumit Bhanushali
60fe377a72
Merge pull request #27429 from Vishnu7025/utils-functions
feat: add get_month function to return current or specific month as a…
2024-08-22 01:18:44 +05:30
vishnu
22042ae00b chore: pre-commit 2024-08-21 18:49:48 +00:00
vishnu
5b73b8c20a chore: added calendar module 2024-08-21 18:28:34 +00:00
vishnu
ace2122e92 chore: removed extra functiion 2024-08-21 18:07:03 +00:00
ljain112
33ba43270c fix: correct permissions for user cannot create doctypes 2024-08-21 17:58:52 +05:30
Akhil Narang
1d0f15033a
Merge pull request #27352 from cogk/refactor-move-validations-to-before-insert
refactor(File): Move validations to before_insert
2024-08-21 16:42:30 +05:30
Akhil Narang
7ab02055d6
chore(email_queue): nudge user to resume email queue if suspended and they are manually sending
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-08-21 16:21:52 +05:30
Raffael Meyer
fd09008e07
fix: extract translatable headings and paragraphs from workspaces (#27464) 2024-08-20 21:55:39 +00:00
Frappe PR Bot
11311b5b25
fix: sync translations from crowdin (#27453) 2024-08-20 23:14:51 +02:00
Raffael Meyer
02d8026c1b
fix: mark genders and salutations as translatable (#27462) 2024-08-20 21:11:54 +00:00
Corentin Forler
b7ea5640c7
test(File): Don't check for file deletion in distinct folders 2024-08-20 15:30:44 +02:00
Corentin Forler
96d11ff9f6
test(File): Ensure private file remains private 2024-08-20 15:30:43 +02:00
Corentin Forler
49ec842066
refactor(File): Move validations to before_insert 2024-08-20 15:30:43 +02:00
Akhil Narang
93b1b1f0ea
Merge pull request #27201 from barredterra/refactor-address-query
refactor: address query
2024-08-20 17:33:38 +05:30