Commit graph

22943 commits

Author SHA1 Message Date
thefalconx33
db8c19ee52 fix: load latest custom report instead of latest reference report 2020-01-03 15:08:59 +05:30
mergify[bot]
0548a9c23a
Merge pull request #9111 from nextchamp-saqib/table-currency-pf
fix: display correct currency in child tables
2019-12-25 09:29:37 +00:00
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
mergify[bot]
753e8d5bac
Merge pull request #9129 from netchampfaris/fix-new-data-import-update-for-child-rows
fix: Child Table Update in New Data Import
2019-12-25 09:23:17 +00:00
Suraj Shetty
849a967119
Merge branch 'develop' into table-currency-pf 2019-12-25 14:45:07 +05:30
Faris Ansari
0d0c327ee7 fix: Child Table Update in New Data Import
- Dont check for mandatory in child rows in update
- Create a new doc for child rows being inserted in update
2019-12-25 14:25:46 +05:30
mergify[bot]
ecf78fe5ee
Merge pull request #9127 from netchampfaris/fix-update-in-new-data-import
fix: Update in New Data Import
2019-12-25 08:21:33 +00:00
Faris Ansari
2f9ced19db fix: Update in New Data Import
- Build a doc from the provided columns in template
- Check if ID column is provided
2019-12-25 13:38:40 +05:30
Himanshu
a89c9671ac fix: use distinct for tag filters (#9126) 2019-12-25 07:49:02 +00:00
mergify[bot]
3f5b2bf49d
Merge pull request #9112 from netchampfaris/whitelist-schemaorg-attributes
fix: Whitelist schema.org attributes
2019-12-25 07:00:45 +00:00
Suraj Shetty
9a2e360ea0
Merge branch 'develop' into whitelist-schemaorg-attributes 2019-12-25 12:19:52 +05:30
mergify[bot]
fbb0b6f89f
Merge pull request #9117 from hrwX/tag_total_develop
fix(Tag): distinct tag total
2019-12-25 06:03:57 +00:00
Himanshu Warekar
698764b89b review changes 2019-12-25 09:57:01 +05:30
Himanshu
6c39d3c3d3
Update frappe/desk/reportview.py
Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-12-25 09:48:04 +05:30
Himanshu
ddaae94282
Update frappe/desk/reportview.py
Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-12-25 09:47:10 +05:30
Himanshu
90850a5123
Update frappe/desk/reportview.py
Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-12-25 09:47:04 +05:30
Himanshu
2392720222
Update frappe/desk/reportview.py
Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-12-25 09:46:44 +05:30
Himanshu
638f978f11
Update frappe/desk/reportview.py
Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-12-25 09:46:26 +05:30
Himanshu
15e689c369
Update frappe/desk/reportview.py
Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-12-25 09:45:29 +05:30
Rushabh Mehta
a4ccde3e4a
Merge pull request #9105 from rmehta/safe-exec-allow-iter
feat(safe_exec): allow iterators and comprehension
2019-12-24 22:35:57 +05:30
Rushabh Mehta
5caa88967e fix(minor): remove print from safe_exec 2019-12-24 22:21:21 +05:30
Rushabh Mehta
711e34c059 feat(safe_exec): allow frappe.db.set_value 2019-12-24 22:21:21 +05:30
Rushabh Mehta
c4c35be68d fix(safe_exec): allow sorted 2019-12-24 22:21:21 +05:30
Rushabh Mehta
c9afc965c1 fix(safe_exec): allow frappe.utils.[function] 2019-12-24 22:21:21 +05:30
Rushabh Mehta
2394586d11 feat(safe_exec): allow iterators and comprehension 2019-12-24 22:21:21 +05:30
Himanshu Warekar
71ebd362a9 Merge branch 'tag_total_develop' of https://github.com/hrwx/frappe into tag_total_develop 2019-12-24 19:07:02 +05:30
Himanshu Warekar
51afdaf86a fix: ignore distinct for tag link 2019-12-24 19:06:38 +05:30
mergify[bot]
109d819437
Merge pull request #9121 from netchampfaris/web-form-custom-css
feat: Custom CSS support in Web Form
2019-12-24 13:21:26 +00:00
Faris Ansari
dcdf95a95f
fix(form-nav): Get filters from list_view (#9124)
* fix(form-nav): Get filters from list_view

- Fallback to user_settings
- Fix UI Test

* style: Missing semicolon
2019-12-24 18:31:01 +05:30
Suraj Shetty
6bad84ee8a
Merge branch 'develop' into tag_total_develop 2019-12-24 16:37:41 +05:30
mergify[bot]
be1e41169d
Merge pull request #9114 from prssanna/grid-fix
fix: only scroll to top when going to a new page to add a row
2019-12-24 10:53:17 +00:00
Faris Ansari
3be13b897a feat: Custom CSS support in Web Form 2019-12-24 14:16:26 +05:30
Suraj Shetty
5b1216694c
Merge branch 'develop' into tag_total_develop 2019-12-24 13:25:48 +05:30
Shivam Mishra
c9c4cbd6d1 perf: Speed improvements for moduleview get (#9079)
* feat: api to setup boot cache on login

* feat (perf): use cache data instead of query

* feat: added doc hooks for rebuilding cache

* feat: improved can import query

* fix: ignore cache rebuild for import or install

* fix: fix postgres syntax error

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2019-12-24 13:12:57 +05:30
Suraj Shetty
8ab24a1f29
Merge branch 'develop' into tag_total_develop 2019-12-24 13:10:35 +05:30
mergify[bot]
6275f87d7d
Merge pull request #9120 from prssanna/filter-fix
fix: don't create filter tag if no filter is applied
2019-12-24 07:36:30 +00:00
Suraj Shetty
f3fc348cbd
Merge branch 'develop' into filter-fix 2019-12-24 12:49:07 +05:30
Himanshu Warekar
f6c94cc613 fix: distinct tag total 2019-12-24 11:25:36 +05:30
Suraj Shetty
a3292e76f9
test: Increase defaultCommandTimeout to 10sec (#9115)
* test: Fix failing test in form.js

* test: Increase defaultCommandTimeout to 10sec
2019-12-24 00:26:29 +05:30
rohitwaghchaure
254f912637
Merge pull request #9110 from rohitwaghchaure/incorrect_parameter_passing_develop
fix: incorrect parameter passing
2019-12-23 19:45:48 +05:30
prssanna
8c614a1575 fix: don't create filter tag if no filter is applied 2019-12-23 18:41:29 +05:30
prssanna
c08c5ab6d5 fix: only scroll to top when going to a new page to add a row 2019-12-23 18:34:30 +05:30
Faris Ansari
039113b741 fix: Whitelist schema.org attributes
so that they can be used in HTML Editor in web pages
2019-12-23 17:56:01 +05:30
thefalconx33
8c15ba3dad fix: display correct currency in child tables 2019-12-23 17:04:55 +05:30
Rohit Waghchaure
b9427a6091 fix: incorrect parameter passing 2019-12-23 15:34:46 +05:30
Suraj Shetty
f4c6421b9b
fix: Treat html editor as data field in standard filter (#9108)
fix: Treat html editor as data field in standard filter

Co-authored-by: null <christoph.isik@wpci.de>
2019-12-23 13:49:19 +05:30
ci2014
b64d1e23bd Treat html editor as data field in standard filter
HTML Editor field can be treated as normal data field and be filtered with Data fieldtype and condition 'like'
2019-12-23 13:07:42 +05:30
mergify[bot]
76a48ff6e0
Merge pull request #9096 from Mangesh-Khairnar/fix-format-currency
fix: allow to format currency for guest users
2019-12-23 07:24:31 +00:00
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
Suraj Shetty
55c3147224
fix: list sidebar tags dropdown doesn't get updated (#9098)
fix: list sidebar tags dropdown doesn't get updated

Co-authored-by: Prssanna Desai <prssud@gmail.com>
2019-12-23 11:47:32 +05:30