Commit graph

456 commits

Author SHA1 Message Date
Rohan Bansal
9acd30c306 fix: allow multiple webhooks for identical doctype triggers 2020-01-06 16:42:44 +05:30
Rohan
9ab56d65ab fix: serialize datetime objects in child table documents 2019-12-31 13:28:41 +05:30
Rohan
7f7760db33 fix: serialize child table document objects 2019-12-31 13:28:39 +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
Revant Nandgaonkar
de6ec7985a fix(integration): Social Login Key
add missing field
2019-12-03 12:41:35 +05:30
Shivam Mishra
c789bfa69f
Merge pull request #8808 from scmmishra/razorpay-orders
feat: New order API for client side checkout handling
2019-11-25 12:10:15 +05:30
Shivam Mishra
7608c03eb3
Update frappe/integrations/doctype/razorpay_settings/razorpay_settings.py
Co-Authored-By: Faris Ansari <netchampfaris@users.noreply.github.com>
2019-11-19 12:54:47 +05:30
Shivam Mishra
29060d8db6
Update frappe/integrations/doctype/razorpay_settings/razorpay_settings.py
Co-Authored-By: Faris Ansari <netchampfaris@users.noreply.github.com>
2019-11-19 12:05:13 +05:30
Shivam Mishra
f1005d9dae style: whitespace fixes 2019-11-14 16:54:21 +05:30
Shivam Mishra
949d2f483e style: whitespace fixes 2019-11-14 16:07:15 +05:30
Shivam Mishra
1b47593588 style: liting fixes 2019-11-14 15:57:04 +05:30
Shivam Mishra
ce2dc68308 refactor: auto fetch API key 2019-11-14 11:59:14 +05:30
Shivam Mishra
719119803f style: use tabs 2019-11-14 11:46:57 +05:30
Shivam Mishra
baa8f8be50 style: added comments and cleaned up API 2019-11-14 11:44:04 +05:30
Shivam Mishra
b8a4821a83 feat: updated client API 2019-11-13 19:31:11 +05:30
Shivam Mishra
46ef941116 fix: fixed post request 2019-11-13 17:37:02 +05:30
Shivam Mishra
08bf0d8379 feat: added orders API 2019-11-13 15:42:33 +05:30
Shivam Mishra
6d85f1215f fix: formatting for chart tooltip 2019-11-12 17:36:59 +05:30
Revant Nandgaonkar
314aed831b fix: add missing code for social login key
add missing code for using custom social login key
2019-10-30 17:26:45 +05:30
Revant Nandgaonkar
953d9b8488 fix(tests): OAuth 2.0 tests 2019-10-21 14:30:52 +05:30
Himanshu Warekar
5e6ce7d2eb fix: TypeError: 'NoneType' object is not iterable 2019-10-11 15:07:26 +05:30
Rucha Mahabal
0d0581cb3f fix: include table fields in webhook data 2019-10-03 19:04:53 +05:30
Rucha Mahabal
6a56349173 fix: webhook label changes 2019-10-02 17:59:38 +05:30
Rucha Mahabal
0f2f907922 fix: webhook data 2019-09-30 13:21:26 +05:30
Himanshu Warekar
f6102e6c4e fix: duplicate contacts being pushed on creation 2019-09-26 11:34:41 +05:30
Himanshu Warekar
5cda6d2d5a Merge branch 'develop' of https://github.com/frappe/frappe into con-fix 2019-09-19 15:39:45 +05:30
Himanshu
4dcd4d3a21 chore: remove code related to gcalendar (#8425) 2019-09-16 21:51:42 +05:30
Himanshu Warekar
d017610677 test: test cases for contacts 2019-09-15 20:08:28 +05:30
Himanshu
8dd559b9e5
Update frappe/integrations/doctype/google_contacts/google_contacts.py
Co-Authored-By: Faris Ansari <netchampfaris@users.noreply.github.com>
2019-09-13 16:07:31 +05:30
Himanshu Warekar
9366334fbd fix: auto fetch google contact 2019-09-13 15:53:41 +05:30
Himanshu Warekar
737fb3f9b1 fix: set google contact account while fetching 2019-09-12 23:26:52 +05:30
Himanshu Warekar
e3d044473d chore: fix reference link for api in docstring 2019-09-06 17:14:12 +05:30
Himanshu Warekar
db331620f2 fix: remove unused hooks 2019-09-06 16:41:42 +05:30
Himanshu Warekar
124b1918b0 fix: pass etag parameter for updation 2019-09-06 14:12:31 +05:30
Himanshu Warekar
6de3e9a1bf feat: push contacts to google contacts 2019-09-06 13:56:00 +05:30
Himanshu Warekar
0c86588bf4 fix: variable names 2019-09-06 10:57:07 +05:30
Himanshu Warekar
ab8b338b92 feat: migrate to google python api 2019-09-06 10:44:51 +05:30
Suraj Shetty
2242146c82 fix: Rename Reference DocType -> Reference Document Type 2019-09-05 15:47:40 +05:30
mergify[bot]
99c73bfae1
Merge pull request #8243 from hrwX/contacts-ref
feat(Contacts): Multiple emails and phones in a contact
2019-08-31 18:08:58 +00:00
Rushabh Mehta
64b409134a
Merge pull request #8264 from Alchez/dev-webhook-json
feat: allow forming JSON requests in webhook  (develop)
2019-08-30 09:31:03 +05:30
mergify[bot]
d4c801ef3d
Merge pull request #8288 from hrwX/gs-fix
fix: js translation for google settings
2019-08-29 13:07:34 +00:00
Himanshu Warekar
52d9b3b749 fix: translations 2019-08-29 18:12:57 +05:30
mergify[bot]
e039167dc1
Merge pull request #8122 from danielmorlock/develop
feat: properly support multiple email values in ldap entries.
2019-08-29 05:31:11 +00:00
Himanshu Warekar
4b750f7c02 fix: js translation for google settings 2019-08-29 02:08:45 +05:30
Rohan Bansal
85614fa8be test: fix header assertion 2019-08-28 16:55:15 +05:30
Rohan Bansal
d768763da4 test: fix tests 2019-08-28 16:55:10 +05:30
Rohan Bansal
ef31f44a0b test: add tests for webhook additions 2019-08-27 16:27:22 +05:30
Rohan Bansal
2e86ed58ec feat: allow forming JSON requests in webhook 2019-08-26 15:09:17 +05:30
Himanshu Warekar
5ca8bbdd36 Merge branch 'develop' of https://github.com/frappe/frappe into contacts-ref 2019-08-26 12:51:26 +05:30
Himanshu
eb9b034c2b
Update frappe/integrations/doctype/google_settings/google_settings.js
Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-08-23 15:34:01 +05:30