Commit graph

2501 commits

Author SHA1 Message Date
Gavin D'souza
6aa9a0bef5 style: Sorted imports & whitespace consistency 2022-01-07 20:44:51 +05:30
Suraj Shetty
1d11ff0375
Merge branch 'develop' into fix-datetime-filter 2022-01-06 11:06:02 +05:30
Suraj Shetty
5d5ad78789 refactor: Rename week_starts_on to first_day_of_the_week
For consistency
2022-01-05 14:54:46 +05:30
Suraj Shetty
65a28002c2
Merge branch 'develop' into fix-datetime-filter 2022-01-04 15:19:56 +05:30
Ankush Menat
5ac79925ef fix: postgres install that doesn't abort transactions 2022-01-04 13:59:17 +05:30
Suraj Shetty
42e1c15c18 feat: Add setting to configure the day on which week starts 2022-01-04 13:00:31 +05:30
Suraj Shetty
9258941151 fix: Do not allow rebuilding of tree for doctypes without lft & rgt 2022-01-03 14:25:42 +05:30
Suraj Shetty
b5e2f78a88 fix: Start week from Sunday instead of Monday
- Like we do in client-side
2022-01-03 13:36:32 +05:30
mergify[bot]
1b28c3b4ed
Merge pull request #15407 from resilient-tech/server-scripts
feat: `frappe.enqueue` and `frappe.call` for Server Scripts
2021-12-24 14:14:51 +00:00
mergify[bot]
7e34c27690
fix: Incorrect timespan daterange calculation (backport #15369) (#15431)
Co-authored-by: Kartik Sharma <kartiksharma9319@gmail.com>
2021-12-24 00:20:57 +05:30
Sagar Vora
01f4ba2061 feat: frappe.enqueue and frappe.call for server scripts 2021-12-22 13:21:13 +05:30
Gavin D'souza
b56e6fe4db fix: Safe decode base64 data in case of incorrect padding
This could possibly happen in case of corrupted/partial files. But for
the most part, if there's a missing trailing = or three at the end too.

Traceback:
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 68, in application
    response = frappe.api.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 31, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 67, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1208, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 21, in savedocs
    doc.save()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 285, in save
    return self._save(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 307, in _save
    self.insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 239, in insert
    self._validate()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 499, in _validate
    self._extract_images_from_text_editor()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 983, in _extract_images_from_text_editor
    extract_images_from_doc(self, df.fieldname)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py", line 779, in extract_images_from_doc
    content = extract_images_from_html(doc, content)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py", line 822, in extract_images_from_html
    content = re.sub(r']*src\s*=\s*["\'](?=data:)(.*?)["\']', _save_file, content)
  File "/home/frappe/frappe-bench/env/lib/python3.6/re.py", line 191, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py", line 814, in _save_file
    _file.save(ignore_permissions=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 285, in save
    return self._save(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 307, in _save
    self.insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 231, in insert
    self.run_method("before_insert")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 860, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1158, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1141, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 854, in
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py", line 56, in before_insert
    self.save_file(content=self.content, decode=self.decode)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/file/file.py", line 436, in save_file
    self.content = base64.b64decode(self.content)
  File "/home/frappe/frappe-bench/env/lib/python3.6/base64.py", line 87, in b64decode
    return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
2021-12-21 14:57:09 +05:30
mergify[bot]
8c52eb6389
Merge pull request #15339 from phot0n/uninstall-hooks
feat: `before_uninstall` and `after_uninstall` hooks
2021-12-20 12:29:28 +00:00
phot0n
1d879f741b feat: before_uninstall and after_uninstall hooks 2021-12-20 14:05:10 +05:30
mergify[bot]
50c653d620
Merge pull request #15220 from v0l/develop
feat: add number format for BTC
2021-12-16 17:14:28 +00:00
Faris Ansari
133ab39de2
Merge pull request #15334 from netchampfaris/server-script-error-ux
fix: Server Script UX
2021-12-16 20:32:18 +05:30
Faris Ansari
c6f9920795 fix: removing map filter
these can potentially lead to security issues, avoiding for now
2021-12-16 20:31:50 +05:30
Faris Ansari
0bc3ff794b fix: remove attr helpers and type
these can potentially lead to security issues, avoiding for now
2021-12-16 16:21:05 +05:30
Faris Ansari
7c8659388d fix(server-script): add common python builtins 2021-12-16 12:19:08 +05:30
mergify[bot]
59db87cb47
Merge pull request #15280 from phot0n/fix-jpeg-rgba-upload
fix: upload jpeg image with alpha channel
2021-12-16 06:28:53 +00:00
mergify[bot]
7153c6c0e9
Merge pull request #15237 from netchampfaris/document-states
feat: Document States
2021-12-14 12:29:58 +00:00
Faris Ansari
1d67a38059 fix: add doctype_state in sync and install 2021-12-14 16:32:58 +05:30
Suraj Shetty
e5372a147f
Merge branch 'develop' into develop 2021-12-14 10:29:23 +05:30
phot0n
afb3dbc59c fix: upload jpeg image with alpha channel 2021-12-13 13:33:53 +05:30
Rutwik Hiwalkar
1ec54c87c8
feat: patched frappe email to work with frappecloud mail app (#15248)
* feat: patched EmailQueue.send and frappe.utils.get_formatted_email

* chore: renamed hooks and handled an edge case

* fix: if the get_sender_details hook is defined but it returns invalid input
2021-12-12 21:09:31 +05:30
Ankush Menat
00d38d568c
fix: remove slash prefix 2021-12-12 15:20:50 +05:30
Ankush Menat
38cd12a95b fix: remove bench path from traceback
This is mostly useless for debugging and clutters the error message.
2021-12-12 11:53:13 +05:30
Kieran
9421736fb9
feat: add number format for BTC 2021-12-08 12:30:02 +00:00
Kevin Backhouse
2f99306d63
Fix ReDoS bug: GHSL-2021-122 (#15201) 2021-12-08 04:57:07 +00:00
Ankush Menat
ecca7f287e
chore: better message for system updates (#15154)
closes https://github.com/frappe/frappe/issues/10997

[skip ci]
2021-12-02 11:09:33 +05:30
hrwx
db4476fc5f fix: reduce api call 2021-11-29 17:28:40 +00:00
hrwx
fa317538a9 Merge branch 'develop' of github.com:frappe/frappe into disable_update_notification 2021-11-29 17:02:14 +00:00
Aradhya
69108c4c86 Merge branch 'develop' of github.com:Aradhya-Tripathi/frappe into at/aggregations 2021-11-27 17:52:30 +05:30
hrwx
ae31a0d6fb feat: add option to disable notification 2021-11-27 00:24:21 +00:00
mergify[bot]
ea772c4059
Merge pull request #15072 from pateljannat/customizations-onboarding
feat: Customizations onboarding and form tour fixes
2021-11-26 14:08:36 +00:00
Faris Ansari
7e35dc4913 fix: add frappe.as_json for safe_exec scripts 2021-11-26 16:30:34 +05:30
Jannat Patel
971a581359 fix: order of reload for doctypes 2021-11-26 14:01:57 +05:30
Jannat Patel
c13e1838d7 fix: module load issue, tour description and save field overlay 2021-11-25 17:57:07 +05:30
Aradhya
47367fc107 Merge branch 'at/aggregations' of github.com:Aradhya-Tripathi/frappe into at/aggregation 2021-11-24 19:01:29 +05:30
mergify[bot]
a6e3d3ab08
Merge pull request #14555 from ankush/diffview
feat: diffview for client/server scripts
2021-11-24 01:45:53 +00:00
ritwik
5cfe3ad946
feat: add no-git option in make-app command and boilerplate generation (#15028) 2021-11-23 04:11:06 +00:00
mergify[bot]
17aa4b823b
Merge pull request #14577 from Alchez/dev-granular-printing
feat: allow more print page size options (develop)
2021-11-22 10:39:10 +00:00
tahir-zaqout
f3aabb5211
Add Translate To Symbol Field (#14971) 2021-11-22 05:55:19 +00:00
Raffael Meyer
7c0078d8e4
feat: Convenience methods for NestedSet {get_parent, get_children} (#13579)
* feat: new properties `NestedSet.{parent, children}`

* fix: typo

* refactor: remove unused kwargs

* feat: method instead of property

* feat: use generator

* docs: fix docstring to match modified method

* refactor: add type hints

* refactor: type hints as string for compatibility with python <3.7

https://stackoverflow.com/questions/33533148/how-do-i-type-hint-a-method-with-the-type-of-the-enclosing-class

* refactor: import Iterator for type annotation

* refactor: Apply suggestions from code review

Co-authored-by: gavin <gavin18d@gmail.com>

Co-authored-by: gavin <gavin18d@gmail.com>
2021-11-17 04:32:11 +00:00
Faris Ansari
4e39f85e29 fix: lazy import weasyprint 2021-11-16 10:58:45 +05:30
mergify[bot]
318d4faed2
Merge pull request #14874 from pateljannat/github-email-issue
fix: Github API endpoint
2021-11-10 11:19:59 +00:00
Ankush Menat
881143c308 feat: show human readable date and version 2021-11-09 18:40:51 +05:30
Ankush Menat
a8b3effa82 chore: sider, linting issues 2021-11-09 18:40:51 +05:30
Ankush Menat
0cd1b3cc83 feat: diffview for comparing fields in two version 2021-11-09 18:40:51 +05:30
Ankush Menat
6a50442936 refactor(minor): better variable names 2021-11-09 17:11:41 +05:30