Commit graph

537 commits

Author SHA1 Message Date
Suraj Shetty
fac4dbdd23
Merge branch 'develop' into force_listview_columns 2020-05-20 21:01:00 +05:30
Suraj Shetty
3bd2eb15df
Merge branch 'develop' into force_listview_columns 2020-05-15 18:05:20 +05:30
Himanshu Warekar
b28cab3512 Merge branch 'develop' of https://github.com/frappe/frappe into multiple_assignments 2020-05-15 15:21:05 +05:30
Aditya Hase
aef567fdde fix(rate-limiter): Remove duplicate headers 2020-05-13 13:45:55 +05:30
Aditya Hase
c532a87370 tests(rate-limiter): Rate Limiter tests 2020-05-13 12:34:07 +05:30
Himanshu Warekar
7c54f60ec3 Merge branch 'develop' of https://github.com/frappe/frappe into force_listview_columns 2020-05-12 11:42:41 +05:30
Suraj Shetty
3ae2c1294d test: Remove unwanted test and fix permission test 2020-05-08 13:55:56 +05:30
Himanshu Warekar
04a59352f7 fix: test cases 2020-05-06 17:40:50 +05:30
Himanshu Warekar
016547378d Merge branch 'develop' of https://github.com/frappe/frappe into force_listview_columns 2020-05-05 10:32:40 +05:30
Suraj Shetty
981da526f9 fix: Contextual translation key generation 2020-05-04 22:27:06 +05:30
Suraj Shetty
ba162425ac test: Add translation extraction test 2020-05-03 18:41:19 +05:30
Shivam Mishra
dabdab5c9f fix: test_set_only_once_child_table_row_value test 2020-04-30 16:24:41 +05:30
Himanshu Warekar
9641dd6f66 Merge branch 'develop' of https://github.com/frappe/frappe into force_listview_columns 2020-04-16 20:21:03 +05:30
Suraj Shetty
41d80b4184
Merge pull request #9949 from scmmishra/customize-datafield-fix
fix: ignore fieldtype check validation if new field type has unspecified maxlength
2020-04-16 13:05:20 +05:30
Rushabh Mehta
7800fdbfee fix(tests): sitemap and condition field for Web View 2020-04-16 09:38:34 +05:30
Shivam Mishra
7696f11e3c feat: update test to check DATA to Text change 2020-04-15 13:24:01 +05:30
Himanshu Warekar
2e2493a18e Merge branch 'develop' of https://github.com/frappe/frappe into force_listview_columns 2020-04-14 11:42:31 +05:30
mergify[bot]
428cfa3b25
Merge pull request #9815 from frappe/dependabot/pip/bleach-3.1.4
chore(deps): bump bleach from 3.1.2 to 3.1.4
2020-04-10 07:58:55 +00:00
Gavin D'souza
2c1ffaae9c fix(test): update test for updated bleach behaviour
bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1623633
2020-04-10 12:13:48 +05:30
Himanshu Warekar
3f824d2686 Merge branch 'develop' of https://github.com/frappe/frappe into force_listview_columns 2020-04-09 10:23:54 +05:30
Chinmay D. Pai
5a4251bce8
chore: add test to check null result
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-04-03 09:54:34 +05:30
Chinmay D. Pai
5cd5d03038
chore: fix errors in global_search test
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-30 11:11:20 +05:30
Chinmay D. Pai
39df9fc8c0
chore: add test assertion for global_search
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-30 10:49:20 +05:30
Chinmay D. Pai
10e939d012
chore: update global_search and add test
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-03-30 10:46:00 +05:30
Suraj Shetty
5194bcd5a4
Merge branch 'develop' into fix-customized-form 2020-03-25 12:57:39 +05:30
Suraj Shetty
699e6f8d4c test: Delete contact phone and and contact email while deleting contact 2020-03-23 13:33:21 +05:30
Suraj Shetty
bf69b98cba test: Set docstatus type as Check 2020-03-21 18:24:15 +05:30
Suraj Shetty
641580a300 test: Add a fallback default 2020-03-21 18:11:42 +05:30
Suraj Shetty
8f8e361766 style: Fix formatting issues 2020-03-21 17:45:39 +05:30
Suraj Shetty
739f061871 test: Add test for frappe.db.updatedb 2020-03-21 12:30:54 +05:30
Aditya Hase
542a3ce222 fix: Remove flaky assertions 2020-03-05 17:20:59 +05:30
Aditya Hase
4e69326fac style: Remove unused imports 2020-03-05 16:27:22 +05:30
Aditya Hase
4740e4f7e6 refactor: Monitor
Do not collect request headers
Collect job wait time and whether it was scheduled
2020-03-05 15:06:15 +05:30
Aditya Hase
af3c4feb64 feat: Monitor
Collect HTTP Request and Background Job logs
2020-03-05 15:06:15 +05:30
prssanna
59a85b4b20 test: add test to check child table field permlevel 2020-03-02 16:40:19 +05:30
Rohan Bansal
90cf15cfc0 test: remove explicit commit 2020-01-22 17:56:55 +05:30
Rohan Bansal
c51a3a8f44 test: add tests for child document updates 2020-01-22 17:56:51 +05:30
Suraj Shetty
5eaaaf03db test: Fix user permission test 2020-01-22 12:51:47 +05:30
Suraj Shetty
02453fa7e0 style: Fix codacy 2020-01-22 12:51:47 +05:30
Suraj Shetty
5cbe2170e8 test: Reset Blog Post doc perms 2020-01-22 12:51:47 +05:30
Suraj Shetty
c9adf965eb test: Fix fieldlevel permission test 2020-01-22 12:51:47 +05:30
Himanshu Warekar
b779767d2d Merge branch 'develop' of https://github.com/frappe/frappe into force_listview_columns 2020-01-14 10:29:07 +05:30
Gavin D'souza
aa07305b90 Merge branch 'develop' of github.com:frappe/frappe into rename-doc-fix 2020-01-08 23:15:45 +05:30
Himanshu Warekar
729cada2fd Merge branch 'develop' of https://github.com/frappe/frappe into force_listview_columns 2020-01-04 10:55:36 +05:30
Prssanna Desai
85628e687f
fix: whitelist function
Co-Authored-By: Shivam Mishra <scmmishra@users.noreply.github.com>
2019-12-26 17:56:19 +05:30
deepeshgarg007
7c69ff4646 Merge branch 'develop' of https://github.com/frappe/frappe into mandatory-depends-on 2019-12-26 13:23:11 +05:30
Andrew McLeod
07cedc581d feat: Optionally remove seconds from datetime (#8531)
* fix: Add updated datepicker; fixed seconds formatting bug.
Seconds between 0 and 9 were not zero-padded.

* feat: Add framework for time format

* feat: datetime server-side formatters.

* tests: Added server-side datetime formatter tests

* feat: Update client-side datetime formatters

* tests: Add Cypress client-side formatting tests.

* fix: JSON errors

* fix: Update to not hard-code admin password

* fix: Change to using bulk_update rather than the REST API

* tests: Use Custom doctype for testing, not Standard

* fix: Codacy style fixes

* fix: Commonify update_datetime_picker in date.js, datetime.js, time.js
Fix order of time_format in System Settings
Restore get_user_fmt in utils/datetime.js

* feat: Drastically reduce scale of Cypress testing (to make tests faster)
Full testing is possible by setting 'fast_mode' to false in the spec file.

* fix: Fix issues with datepicker/timepicker expansion

* fix: typo

* style: Various style fixes as requested by DeppSource: Python

* fix: Timepicker not hiding on 'now' button. Force hiding on click.

* style: Codacy style fixes.

* fix: Use datepicker from node_modules

* test: Refactor Datetime UI tests

- cy.get_field
- cy.set_value
- cy.insert_doc with ignore_duplicate
- Nominal datetime tests to cover most formats
- Formatting with prettier

* test: Datetime UI tests; wait for cur_frm.doc.datetime to update

* tests: Add whitespace to typed input

- Clear input only for Time field

* test: Wait timeout 200

* test: Fix form test

Co-authored-by: Faris Ansari <netchampfaris@users.noreply.github.com>
2019-12-25 14:54:28 +05:30
Suraj Shetty
480a192324
Merge branch 'develop' into mandatory-depends-on 2019-12-23 13:03:49 +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
Gavin D'souza
28b2ee0455 chore: added rename_doc tests 2019-12-23 11:05:39 +05:30