Commit graph

1171 commits

Author SHA1 Message Date
Gavin D'souza
aa07305b90 Merge branch 'develop' of github.com:frappe/frappe into rename-doc-fix 2020-01-08 23:15:45 +05:30
Gavin D'souza
ee459d23f0 fix: pop ignore_permissions flag via whitelisted frappe.rename_doc 2020-01-08 23:12:56 +05:30
Suraj Shetty
0e5e3497b1
fix: as_table msgprint (#9174)
* chore: improve readability

* fix: as_table msgprint

- fix as_table msgprint style and functionality
- Make table creation code more readable
- Make a text translatable

* style: Fix few deepsource issues

* style: Fix few deepsource issues

fix indentation

* fix: Incorrect assignment

* fix: Scrub URLs only for html format

* fix(typo): msg -> message

Co-authored-by: Raffael Meyer <meyer.raffael@gmail.com>
2020-01-04 21:05:02 +05:30
Suraj Shetty
7107409531
Merge version-12-hotfix to develop (#9095)
* fix: REST API utf-8 decoding on creates/updates

Creating or updating a document via the REST API would generate an error of:

`TypeError: the JSON object must be str, not 'bytes'`

Because get_data() returns bytes which must be explicitly converted to a string before parsing as JSON.

Defect introduced by efe94886a and a71a92341e

* fix(patch): Handle failures in while making Prepared Report attachments private

* case insensitive search for postgres

* convert operator to lowercase while checking

* fix: Pass prepared_report_name as filter if exists

* fix: Add input to multiselect_list control

* fix(reportview): convert to unicode conditionally

fixes TypeError: decoding str is not supported

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 57, in application
    response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 61, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1038, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 511, in wrapper_fn
    retval = fn(*args, **get_newargs(fn, kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/reportview.py", line 177, in export_query
    frappe.response['result'] = text_type(f.read(), 'utf-8')
TypeError: decoding str is not supported

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* chore: remove useless encode

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* fix: Allow Rename in Website Route Meta

* fix: Add Visit Web Page button in form

* fix: next schedule date should be on or after current date

* test: next schedule date

* fix: Change modified by

* fix: do not allow bulk update for core, single doctypes and doctypes from inactive domains

* fix: switch to safe_decode

* test: Fix list_view test by removing clear-cache code (#8941)

* test: Fix listview test by waiting for clear-cache

* test: Move wait to list_view.js

* test: Try removing clear-cache

* fix(integration): Social Login Key (#8940)

add missing field

* fix: don't set filter for restrict_to_domain in Bulk Update Tool

* fix: query report chart options

* fix: Default and company address fixes

* fix: revert changes made to get_default_address function

* fix: Remove changes in notifications

* fix: list view group by filter ambiguous column name

* fix: changelog modal ui

* test: list view child table filter with created by filter

* fix: not able to download XML file

* fix(security): invalidate reset_password_key on password reset

currently there is no way to invalidate reset_password_key on updating
password through the user settings. so whenever the user sets a new
password we'll invalidate the reset_password_key, so that existing links
to reset user passwords cannot be used.

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* fix: Pin faker version to avoid test failures

* perf: optimise globals search

* fix: add index on child table

* fix: do not pop item from list

* fix: dont add index for global search doctype

* fix: rename function to set

* tests: fix results being return

* fix: codacy fixes

* fix: Code cleanup

- Pass values so that db cursor can handle escaping

* fix: Convert list to tuple

* style: added semi-colon

* fix: add default role on sign up via SSO

* fix(autocomplete): parse options (#8999)

* fix(autocomplete): parse options

* fix: add ignore validation flag

* fix: minor change

* fix(email): try to encode email part to utf-8 (#8964)

fixes issues with class objects other than str

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py", line 281, in receive
    communication = self.insert_communication(msg, args=args)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py", line 338, in insert_communication
    email = Email(raw)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/receive.py", line 372, in __init__
    self.parse()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/receive.py", line 393, in parse
    self.process_part(part)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/receive.py", line 445, in process_part
    self.text_content += self.get_payload(part)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/receive.py", line 489, in get_payload
    charset = self.get_charset(part)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/receive.py", line 484, in get_charset
    charset = chardet.detect(frappe.safe_encode(part))['encoding']
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/chardet/__init__.py", line 34, in detect
    '{0}'.format(type(byte_str)))
TypeError: Expected object of type bytes or bytearray, got: <class 'email.message.Message'>

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* fix: Ambiguous column error when going to next doc (#9005)

fix: Ambiguous column error when going to next doc

Co-authored-by: Prssanna Desai <prssud@gmail.com>

* fix(patch): auto commit on more than 10000 writes

fixes issue where patch fails with:

frappe.exceptions.ValidationError: Too many writes in one request. Please send smaller requests

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* revert: changes in currency formatting  (#9003)

* fix: reverted currency formatting

* ux: added description for currency's number format
* It doesn't have any effect on how the currency is formatted.

* fix: revert json changes in currency master

* fix(filters): set default id to empty string instead of 0 (#9014)

fixes issue where "undefined" value gets set to 0 in postgres, which causes ProgrammingError since the expected value is of type str and not int

* revert: changes in currency formatting  (#9003)

* fix: reverted currency formatting

* ux: added description for currency's number format
* It doesn't have any effect on how the currency is formatted.

* fix: revert json changes in currency master

* feat: add doc for email linking

* fix: missing commits while reverting currency changes

* fix(file): Public-private issue (#9032)

* fix: Pass file's is_private for doc creation

* fix: File is_private and file_url mismatch

* fix: Check if file_url exists

* fix: Validation check

* fix(postgres): Convert is_private to int

* fix: File path for content_hash

* fix: Show default currency as a fallback for currency fieldtype (#8992)

* fix: Show default currency as a fallback for currency fieldtype

* test: Add a test for currency formatting

* fix: Add a patch to fix all user's home settings (#9040)

* fix: Add a patch to fix all user's home settings

* fix: Remove limit

* fix: Allow field of submitted doc to edit if field has allow_on_submit enabled

* test: Add test to check if field is editable

* fix: Typo

* test: Add assert statement for value

* test: Clear cache after creating doctype

* fix: Codacy

* fix checkbox behavior in rtl view when clicking on label to check (#8898)

* fix checkbox behavior in rtl view when clicking on label to check

* fix: Undo changes in desk.css

* fix: Empty row validation

* style: Fix code formatting

* fix: Terminate regex

* fix: don't validate email for standard filters

* fix: before setting user default value, if fieldtype is Link check if doc exists

* Revert "fix: user default value for Link fields"

* before setting user default value, if fieldtype is Link check if doc exists

* fix: Remove Attachment on remove

* fix: minor changes

* style: fix Codacy issue

There should be no space before ','. (comma-spacing)

* fix: rfc5322 compliance for python3 (#9056)

* start of tests

* rfc compliant emails for frappe.

* fix for deepsource

* fix length of strings.

* fix bug that I'm not sure where it came from?

* codacy and deepsource issues trying to keep them happy

* take a punt in the dark

* fix: use SMTPUTF8 instead of SMTP and other minor fixes

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>

* fix: patch home_settings_for_all_users

* style: Fix Codacy

* fix: KeyError: 'hidden_modules'

* fix: TypeError in home_settings patch

Convert set to list

* refactor: override style for changelog modal

* Merge V12-pre-release to version-12-hotfix (#9094)

Merge V12-pre-release to version-12-hotfix

Co-authored-by: null <rohitw1991@gmail.com>
Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>
Co-authored-by: Vishal Dhayagude <vishaldhayagude09@gmail.com>
Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
Co-authored-by: null <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: null <sahilkhan28297@gmail.com>

* Revert queue.py

Co-authored-by: Ben Knowles <benknowles@users.noreply.github.com>
Co-authored-by: Aditya Hase <aditya@adityahase.com>
Co-authored-by: Shridhar Patil <shridharpatil2792@gmail.com>
Co-authored-by: Faris Ansari <netchampfaris@users.noreply.github.com>
Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
Co-authored-by: Revant Nandgaonkar <revant.one@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Shivam Mishra <scmmishra@users.noreply.github.com>
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
Co-authored-by: Himanshu <himanshuwarekar@yahoo.com>
Co-authored-by: Rohan <Alchez@users.noreply.github.com>
Co-authored-by: Mangesh-Khairnar <mkhairnar10@gmail.com>
Co-authored-by: Prssanna Desai <prssud@gmail.com>
Co-authored-by: Saqib <thefalconx33@gmail.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
Co-authored-by: Ammar Hararah <ammarkharara@gmail.com>
Co-authored-by: Vishal Dhayagude <vishdha@users.noreply.github.com>
Co-authored-by: sahil28297 <37302950+sahil28297@users.noreply.github.com>
2019-12-23 12:24:52 +05:30
Faris Ansari
488c68df96
Merge branch 'develop' into refactor-scheduler 2019-12-02 13:16:45 +05:30
Sahil Khan
747fab0003 bumped to version 12.0.20 2019-11-26 15:43:01 +05:50
Nabin Hait
fd39f2ac70 bumped to version 12.0.19 2019-11-25 15:18:22 +05:50
Nabin Hait
3a73cf6e7d
feat: Handle server and client side primary action in msgprint (#8870)
* feat: Handle server and client side primary action in msgprint

- Added provision to pass primary action from server side msgprint
- msgprint on client side handles server side and client side methods as primary actions

* chore: Code cleanup

* fix: Codacy

* fix: patch
2019-11-22 15:13:19 +05:30
Sahil Khan
2693b357aa bumped to version 12.0.18 2019-11-14 17:27:33 +05:30
Rushabh Mehta
e85cd6549c fix(tests): fix queue peeking test 2019-11-07 12:14:09 +05:30
Rushabh Mehta
7cd329fac9 reactor(scheduler): created "Scheduler Job Type" and cleaned up scheduler 2019-11-07 12:14:09 +05:30
Gavin D'souza
40600f4fba chore: update rename_doc calls 2019-11-06 14:57:48 +05:30
Gavin D'souza
599e4782c0 fix(security): dont allow ignore_permissions in whitelisted method:
frappe.rename_doc
2019-11-06 12:01:10 +05:30
Sahil Khan
4e54240bb8 bumped to version 12.0.17 2019-10-24 17:49:12 +05:50
Rushabh Mehta
c57f128000 fix(minor): add comments 2019-10-11 14:34:14 +05:30
Sahil Khan
bd5cc03f4a bumped to version 12.0.16 2019-10-02 16:55:43 +05:50
Sahil Khan
f68534ff4b bumped to version 12.0.15 2019-09-24 18:36:08 +05:50
mergify[bot]
5a3bdff130
Merge pull request #8455 from hrwX/use-getfullargspec
fix: use getfullargspec for type annotations
2019-09-23 07:41:54 +00:00
Raffael Meyer
ab86a89128 fix(docstring): params docname and description (#8475) 2019-09-23 12:32:42 +05:30
Sahil Khan
bcba2e3ee1 bumped to version 12.0.14 2019-09-20 15:34:17 +05:50
Himanshu Warekar
7f904b4a79 fix: use getfullargspec for type annotations 2019-09-19 01:04:55 +05:30
Sahil Khan
ff8eefa355 bumped to version 12.0.13 2019-09-17 17:29:52 +05:50
Sahil Khan
f0103083ce bumped to version 12.0.12 2019-09-10 14:56:48 +05:50
Sahil Khan
ab3e228dda bumped to version 12.0.11 2019-09-05 17:49:09 +05:50
Sahil Khan
92b5dd9361 bumped to version 12.0.10 2019-09-03 23:04:19 +05:50
Sahil Khan
71d406a0b0 bumped to version 12.0.9 2019-09-03 16:51:17 +05:50
Suraj Shetty
84c3eb3d62 fix: Disable caching for respond_as_web_page response (#8276)
* fix: Do not cache workflow approval confirmation page

* fix: Make it readable

* fix: Disable caching for respond_as_web_page

* fix: Remove info about no_cache from docstring
2019-08-27 19:36:44 +05:30
Sahil Khan
c3a9449f92 bumped to version 12.0.8 2019-08-22 13:28:23 +05:50
Sahil Khan
2ab425e266 bumped to version 12.0.7 2019-08-20 16:19:28 +05:50
Sahil Khan
459f7b321e bumped to version 12.0.6 2019-08-13 15:03:14 +05:50
Sahil Khan
99cacb76f7 bumped to version 12.0.5 2019-08-07 16:39:54 +05:50
Sahil Khan
6ab1e72ff7 bumped to version 12.0.4 2019-08-02 14:46:27 +05:50
Sahil Khan
9a6ec1ea5a bumped to version 12.0.3 2019-07-30 13:28:13 +05:50
Sahil Khan
b7ee413412 bumped to version 12.0.2 2019-07-27 13:12:07 +05:50
Sahil Khan
65884a0a3e bumped to version 12.0.1 2019-07-26 13:06:32 +05:50
sahil28297
5fdc33d9bc
Release Version 12 2019-07-22 17:30:15 +05:30
Sattam
f333a9ac1c
fix: typo in a comment
correct a typo in a comment at line 20, Hamless -> Harmless
2019-07-21 19:38:50 +03:00
deepeshgarg007
8fac582082 fix: Use hasattr instead of get 2019-06-18 19:20:34 +05:30
deepeshgarg007
6ded721da4 fix: Assign exception_type only if exception name available 2019-06-18 18:56:50 +05:30
Nabin Hait
b375ee9eef fix: merge conflict 2019-06-18 18:45:21 +05:30
Rushabh Mehta
5273c41089
Revert "Revert "feat: Error handlers"" 2019-06-18 15:52:56 +05:30
Rushabh Mehta
3f9aa734a3
Revert "feat: Error handlers" 2019-06-18 15:52:26 +05:30
Rushabh Mehta
54450ef6ce
Merge pull request #7717 from deepeshgarg007/error_handlers_hotfix
feat: Error handlers
2019-06-18 15:49:47 +05:30
Sahil Khan
1e25e66c37 bumped to version 11.1.36 2019-06-18 15:00:40 +05:50
deepeshgarg007
e2a8cfd6a7 feat: Server side error handlers 2019-06-18 12:28:57 +05:30
deepeshgarg007
da07dfb217 feat: Server side error handlers 2019-06-18 12:22:44 +05:30
Sahil Khan
386f6f030e bumped to version 11.1.35 2019-06-11 17:22:50 +05:50
Nabin Hait
b2dd47ee5b bumped to version 11.1.34 2019-06-10 19:30:33 +05:50
Sahil Khan
d2aec962bd bumped to version 11.1.33 2019-06-05 15:30:59 +05:50
Sahil Khan
4584de59b5 bumped to version 11.1.32 2019-05-30 12:28:16 +05:50