Commit graph

36088 commits

Author SHA1 Message Date
hrwx
ac9094ac8a chore: update msg_print messages 2021-12-22 14:18:33 +00:00
Sagar Vora
01f4ba2061 feat: frappe.enqueue and frappe.call for server scripts 2021-12-22 13:21:13 +05:30
mergify[bot]
d1e229de2c
Merge pull request #15343 from sumaiya2908/empty-fetch-from-field
fix: Clear fetched field when link field is cleared
2021-12-22 06:07:31 +00:00
mergify[bot]
97cd221f24
Merge pull request #15404 from adityahase/fix-restore-default-value
fix(restore): Repopulate db_tables cache after database restore
2021-12-22 05:49:04 +00:00
Suraj Shetty
f8cbe9575f
Merge branch 'develop' into empty-fetch-from-field 2021-12-22 11:06:52 +05:30
Aditya Hase
d334379b02
fix(restore): Repopulate db_tables cache after database restore
This takes care of the following scenario.

During restore, before tabDefaultValue is created if a request/command executes frappe.db.get_tables, then the cached value db_tables is populated with partial list of tables.

bootstrap_database then checks if this partial list contains tabDefaultValue (as a sanity test to see if the restore worked). This check fails even though the database is correctly restored.
2021-12-22 10:58:17 +05:30
mergify[bot]
4f38b7d544
Merge pull request #15400 from hrwX/translate_update_pwd_page
fix: use python _ instead of __
2021-12-22 04:46:43 +00:00
hrwx
350fe71662 fix: use python _ instead of __ 2021-12-21 17:15:09 +00:00
mergify[bot]
02fc043745
Merge pull request #15355 from pateljannat/custom-signup
feat: Custom signup form hook
2021-12-21 09:39:26 +00:00
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
Suraj Shetty
52b5265868
fix: Make labels translatable 2021-12-21 14:12:40 +05:30
mergify[bot]
e352c2e343
fix(ui): Rendering forms created by disabled users (backport #15371) (#15391)
Co-authored-by: Gavin D'souza <gavin18d@gmail.com>
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2021-12-21 13:58:54 +05:30
Suraj Shetty
f86ff27329
Merge branch 'develop' into multistep_webforms 2021-12-21 13:32:36 +05:30
mergify[bot]
daa8520e88
Merge pull request #15379 from ankush/feat/nested_transactions
feat: SQL savepoints
2021-12-21 07:55:00 +00:00
Sagar Vora
27e2b0ce0b
Merge pull request #15318 from resilient-tech/import-translation
feat: translations in Data Import
2021-12-21 12:29:50 +05:30
mergify[bot]
6d8ec787a7
Merge pull request #15381 from cpdeethree/patch-1
fix: default to 'en' if no language in settings
2021-12-21 06:58:08 +00:00
mergify[bot]
c4a714e20e
fix: Barcode rendering in server side printing (backport #15383) (#15384)
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
Co-authored-by: gavin <gavin18d@gmail.com>
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2021-12-21 12:06:59 +05:30
Sagar Vora
6dc67835c5 fix: typo in comment
Co-authored-by: Faris Ansari <netchampfaris@users.noreply.github.com>
2021-12-21 12:05:38 +05:30
Sagar Vora
8b8f03f2d1 fix: remove irrelevant comment 2021-12-21 12:05:38 +05:30
Sagar Vora
e6d550b451 fix: remove unnecessary translation 2021-12-21 12:05:38 +05:30
Sagar Vora
a952c8994d fix: remove unnecessary loop 2021-12-21 12:05:38 +05:30
Sagar Vora
5df970013e feat: translations in Data Import 2021-12-21 12:05:38 +05:30
Conor
6217fe0967
fix: default to 'en' if no language in settings
This fixes an issue during installation of tests for erpnext in postgres - global settings
2021-12-20 23:46:23 -06:00
Summayya
edb1e0b372 refactor: remove return statement for empty response 2021-12-21 10:39:51 +05:30
mergify[bot]
5389e7eebd
Merge pull request #15277 from saxenabhishek/aks-fix-setup_wizard_region
fix: misc setup_wizard region slide
2021-12-21 04:52:50 +00:00
Summayya Hashmani
9e8a343e9e
Merge branch 'frappe:develop' into empty-fetch-from-field 2021-12-21 10:20:05 +05:30
mergify[bot]
df0ac2e666
Merge pull request #15368 from shariquerik/custom-rating
feat: Half star rating (4.5 out of 5)
2021-12-21 04:18:36 +00:00
Suraj Shetty
b530beb503 revert: Empty value checks 2021-12-21 09:36:09 +05:30
Suraj Shetty
1dd870ce73 refactor: Use placeholder instead of additional option in select
- Additional options were still selectable which could have got through
- Minor formatting changes
2021-12-21 08:54:31 +05:30
Ankush Menat
3101c45f26 fix: return self when using save on new docs
for consistency.
2021-12-20 23:08:00 +05:30
Ankush Menat
1c0de77634 feat: SQL savepoints 2021-12-20 23:07:53 +05:30
mergify[bot]
29c0e13fb0
Merge pull request #15377 from phot0n/website-generator-import-path-fix
fix: wrong website generator import tag
2021-12-20 15:54:35 +00:00
phot0n
564f463073 fix: wrong website generator import tag 2021-12-20 20:44:47 +05:30
Suraj Shetty
9006f92296
test: Fix flaky test of language selection (#15373) 2021-12-20 19:37:52 +05:30
Shariq Ansari
b54aa00a9f
Merge branch 'develop' into custom-rating 2021-12-20 18:39:17 +05:30
Shariq Ansari
ed60a30e69 test: fixed failing tests 2021-12-20 18:36:52 +05:30
mergify[bot]
16749e387b
Merge pull request #15287 from ankush/treeeview_expand_fix
fix: treeview expanding at random
2021-12-20 13:02:54 +00:00
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
Shariq Ansari
5aafc4def9 fix: sider fix 2021-12-20 17:03:21 +05:30
Shariq Ansari
7912d6072d feat: Half star rating (4.5 out of 5) 2021-12-20 16:16:48 +05:30
gavin
34d343bc06
Merge pull request #15362 from gavindsouza/agg-patch-fix-0
fix: Escape matching pattern for substitution
2021-12-20 14:13:12 +05:30
phot0n
1d879f741b feat: before_uninstall and after_uninstall hooks 2021-12-20 14:05:10 +05:30
Gavin D'souza
7bd46a3e29 fix: Escape matching pattern for substitution
Tested on PY3.9.7 and PY3.9.9
2021-12-20 13:21:07 +05:30
mergify[bot]
0b50f2aeb4
Merge pull request #15352 from hrwX/add_writable
fix: value associated with property may be changed
2021-12-20 05:52:57 +00:00
Jannat Patel
679c61531f fix: renamed hook and moved template 2021-12-20 11:07:29 +05:30
mergify[bot]
ea091d0eb5
Merge pull request #15312 from nextchamp-saqib/fix-more-btn
fix: more button in multi-select dialog
2021-12-20 05:23:10 +00:00
Jannat Patel
fa4bccb284 fix: accept path instead of fn in signup hook 2021-12-20 10:07:04 +05:30
hrwx
28de383e8b chore: ignore for-direction in eslint 2021-12-19 12:33:15 +00:00
hrwx
541740cb18 Merge branch 'multistep_webforms' of github.com:hrwx/frappe into multistep_webforms 2021-12-19 01:34:15 +00:00
hrwx
7fda27e569 fix: value associated with property may be changed 2021-12-19 01:12:15 +00:00