Commit graph

35904 commits

Author SHA1 Message Date
Suraj Shetty
84f366bbfc
Merge branch 'develop' into aks-test-fixtures 2021-12-24 19:19:45 +05:30
Suraj Shetty
f19c67314d
style: Fixed indentation 2021-12-24 19:19:22 +05:30
mergify[bot]
8b3ccd9ab6
Merge pull request #15437 from gavindsouza/custom-child-table-get_list
fix: Handle custom child tables via check_parent_permission
2021-12-24 13:41:02 +00:00
Ankush Menat
3ff26ae44c
Merge pull request #15426 from gavindsouza/feedback-bs
refactor: Fractional ratings patch
2021-12-24 17:11:41 +05:30
Ankush Menat
0b7f2804d7 refactor: make ratings field nullable while altering 2021-12-24 16:31:09 +05:30
Ankush Menat
600156b1a1 refactor!: allow modified column to be nullable
* updated change_column_type to allow making columns nullable.
* breaking change: in postgres the method was previously nullable by
  default, changed it to be consistent with mariadb.
2021-12-24 16:31:06 +05:30
Rushabh Mehta
193eca4721
Merge pull request #15438 from shariquerik/single-card-for-tabs
refactor(UI): Single card design for form
2021-12-24 16:06:46 +05:30
Shariq Ansari
6eb00fd378
Merge branch 'develop' into single-card-for-tabs 2021-12-24 15:04:39 +05:30
Shariq Ansari
a2a6e112ee refactor(UI): Single card design for form 2021-12-24 14:42:32 +05:30
Gavin D'souza
0f71dd411b style: DatabaseQuery.execute's permission cond block 2021-12-24 14:01:26 +05:30
Gavin D'souza
84ebdabe49 refactor(minor): frappe.has_permission
The throw block was very clearly broken. Referencing frappe.throw inside
__init__.py rip. Added drop in replacement msgprint call
2021-12-24 13:59:57 +05:30
Gavin D'souza
3b7b555148 fix: Pass parent_doctype required for DatabaseQuery perm checks
has_child_table_permission would throw 'Parent DocType Required: Please
specify a valid parent DocType for {TEST DOCTYPE}' after the previous
commit 33b7d7d74f. Passing parent_doctype
solves this
2021-12-24 13:57:07 +05:30
Gavin D'souza
33b7d7d74f fix: Handle custom child tables via check_parent_permission
Check `tabCustom Field` and `tabDocfield` for matching parent existence.
2021-12-24 13:28:40 +05:30
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
mergify[bot]
99ab47b949
Merge pull request #15394 from gavindsouza/safe-base64-decode
fix: Safe decode base64 data in case of incorrect padding
2021-12-23 18:07:15 +00:00
mergify[bot]
6ba68ea5a3
Merge pull request #15413 from hrwX/update_notification_msg
chore: update msg_print messages
2021-12-23 18:07:07 +00:00
mergify[bot]
3af410a05f
Merge pull request #15427 from ankush/route_hist
fix: mutating route history while get_last_doc
2021-12-23 18:00:32 +00:00
saxenabhishek
ed9dad8f30 test: import single doctype 2021-12-23 22:13:51 +05:30
mergify[bot]
059e1cc364
fix: Report boilerplate (js, py) year to current year (#15429)
Co-authored-by: mymi14s <mymi14s@hotmail.com>
2021-12-23 21:49:45 +05:30
Ankush Menat
442e58415b fix: mutating route history while get_last_doc
co-authored-by: @skjbulcher
2021-12-23 21:32:23 +05:30
saxenabhishek
016bda51aa test: import doctype fixtures 2021-12-23 21:29:12 +05:30
Gavin D'souza
141f4922e7 fix: Skip patch if column already converted
Co-authored-by: Ankush Menat <me@ankush.dev>
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2021-12-23 19:55:53 +05:30
Gavin D'souza
fd11b0e8e7 fix: Re-run patch to ensure column conversion
Co-authored-by: Ankush Menat <me@ankush.dev>
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2021-12-23 19:55:45 +05:30
Gavin D'souza
27f8a1ea56 refactor: Fractional ratings patch
* Change column types of rating fields
* Workaround added for truncated/NULL values

Co-authored-by: Ankush Menat <me@ankush.dev>
Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2021-12-23 19:55:36 +05:30
Shariq Ansari
074d0b498b refactor: show dashboard section on particular tabs (set options = Dashboard) 2021-12-23 12:09:51 +05:30
Himanshu
f123ed09b5
chore: update title and messages for frappe.msgprint
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2021-12-22 20:08:15 +00:00
hrwx
ac9094ac8a chore: update msg_print messages 2021-12-22 14:18:33 +00:00
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
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