Commit graph

23166 commits

Author SHA1 Message Date
Rohan Bansal
9acd30c306 fix: allow multiple webhooks for identical doctype triggers 2020-01-06 16:42:44 +05:30
mergify[bot]
e85c152d1c
Merge pull request #9206 from netchampfaris/web-search-scope
fix: Persist scope search in search page
2020-01-06 09:42:11 +00:00
Faris Ansari
1e0f56bac7 fix: Persist scope search in search page 2020-01-06 13:34:31 +05:30
mergify[bot]
6763ee7712
Merge pull request #9198 from gavindsouza/build-refact
refactor(build): updated variable names, namespaces + style fixes
2020-01-06 05:53:18 +00:00
Suraj Shetty
e9f0e2b4c7 fix: Save error 2020-01-06 10:39:09 +05:30
mergify[bot]
84c04baa4a
Merge pull request #9199 from Thunderbottom/email-server-ref-fix
fix(email): define email_server before condition
2020-01-05 18:58:50 +00:00
Himanshu Warekar
5754ef750b fix: use _user_tags instead of Tag Link 2020-01-05 22:09:20 +05:30
prssanna
04e7b7a96b fix: compare docs by state as key 2020-01-05 15:59:38 +05:30
sahil28297
5ef0c80ee4
Merge pull request #9201 from Thunderbottom/email-account-com-fix
fix(email): check if communication hasattr for attachment
2020-01-05 12:49:54 +05:30
Chinmay D. Pai
fb511b1dfd
fix(email): check if communication hasattr for attachment
fixes issue where previous communication has no attribute _attachments
before it fails, causing the following error:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 99, in execute_job
    method(**kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py", line 724, in pull_from_email_account
    email_account.receive()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py", line 295, in receive
    attachments = [d.file_name for d in communication._attachments]
AttributeError: 'Communication' object has no attribute '_attachments'

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-01-05 00:35:06 +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
18d8e65cca
fix: Make background jobs logging quieter if quite flag is pass… (#9200) 2020-01-04 19:12:59 +05:30
mergify[bot]
7171a2bb27
Merge pull request #9189 from Thunderbottom/email-encode-fix
fix(email): safe_encode to avoid smtp ascii encoding issue
2020-01-04 08:30:19 +00:00
Gavin D'souza
9dc172692d feat: added apps installed on site in console ns
chore: dropped deprecated commands
style: whitespacing and new line fixes
2020-01-04 13:44:37 +05:30
Chinmay D. Pai
ba9d6020e6
chore: check if email_server exists before handling bad emails
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-01-04 12:19:57 +05:30
Chinmay D. Pai
68659c5519
fix(email): define email_server before condition
fixes issue where email_server is unhandled in test

Traceback (most recent call last):
  File "/home/chnmy/workspace/frappe/benches/master-bench/apps/frappe/frappe/email/doctype/email_account/test_email_account.py", line 44, in test_unread_notification
    self.test_incoming()
  File "/home/chnmy/workspace/frappe/benches/master-bench/apps/frappe/frappe/email/doctype/email_account/test_email_account.py", line 35, in test_incoming
    email_account.receive(test_mails=test_mails)
  File "/home/chnmy/workspace/frappe/benches/master-bench/apps/frappe/frappe/email/doctype/email_account/email_account.py", line 291, in receive
    self.handle_bad_emails(email_server, uid, msg, frappe.get_traceback())
UnboundLocalError: local variable 'email_server' referenced before assignment

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-01-04 11:51:49 +05:30
Gavin D'souza
16c4c8f202 fix(install): bench jupyter 2020-01-04 11:09:33 +05:30
Gavin D'souza
3418e84466 refactor: updated variable name + style fixes 2020-01-04 10:53:53 +05:30
mergify[bot]
1549399c55
Merge pull request #9197 from hrwX/smtp-fx
fix(email): define _email_account before assignment
2020-01-04 04:21:53 +00:00
Himanshu Warekar
1b4ecdf792 fix: unreferenced variable 2020-01-04 09:26:23 +05:30
mergify[bot]
ceeea6180f
Merge pull request #9193 from surajshetty3416/disable-testing-by-default
chore: Disable testing for all sites by default
2020-01-03 18:17:59 +00:00
Chinmay D. Pai
250c44bed8
chore: pass email_body test
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-01-03 23:14:08 +05:30
Suraj Shetty
58825e89a8 feat: Disable testing for all sites by default
To avoid accidental test execution on production sites
2020-01-03 22:08:06 +05:30
thefalconx33
db8c19ee52 fix: load latest custom report instead of latest reference report 2020-01-03 15:08:59 +05:30
Chinmay D. Pai
ce2a0854db
fix(email): safe_encode to avoid smtp ascii encoding issue
fixes issue where smtplib fails to encode the mail as ascii

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 60, 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 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 1042, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 801, in reset_password
    user.reset_password(send_email=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 234, in reset_password
    self.password_reset_mail(link)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 253, in password_reset_mail
    "password_reset", {"link": link}, now=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 298, in send_login_mail
    delayed=(not now) if now!=None else self.flags.delay_emails, retry=3)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 476, in sendmail
    inline_images=inline_images, header=header, print_letterhead=print_letterhead)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 162, in send
    print_letterhead=print_letterhead)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 185, in add
    send_one(email_queue.name, now=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 475, in send_one
    raise e
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 415, in send_one
    smtpserver.sess.sendmail(email.sender, recipient.recipient, message)
  File "/usr/lib64/python3.6/smtplib.py", line 855, in sendmail
    msg = _fix_eols(msg).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode characters in position 335-339: ordinal not in range(128)

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-01-03 14:56:15 +05:30
Ben Knowles
ecfc0714bc
fix: global search index breaking on long titles
If you created a doc with a title longer than 140 characters, it's supposed to be truncated to 140.

However, the global search index would break for that doctype due to an error in the query.

The truncate was happening AFTER it was escaped, causing it to lose the closing quote mark which caused a SQL error and broke the index.
2020-01-02 14:33:57 -06:00
Mohammed Safwat Abu Kwaik
4ac83a0cc8 fix: allow setting custom database schema in site_config (#9182)
* Update database.py

* Update frappe/database/postgres/database.py

Co-Authored-By: Chinmay Pai <chinmaydpai@gmail.com>

Co-authored-by: Chinmay Pai <chinmaydpai@gmail.com>
2020-01-02 22:20:04 +05:30
Gavin D'souza
9bf4221d45 fix: new_name variable undefined for document which cant be renamed 2020-01-02 13:02:46 +05:30
mergify[bot]
9a63bdf337
Merge pull request #9184 from gavindsouza/build-symlinks-fix
fix: bench build broken assets symlinks
2020-01-02 05:07:00 +00:00
Suraj Shetty
cbcdc93fd6 refactor: Move "rename document title" code to separate function 2020-01-02 10:28:18 +05:30
Gavin D'souza
5fa802c203 fix(warn): added "Irreversible Change" warnings to merge document via
frappe.model.rename_doc JS API
2020-01-02 10:28:01 +05:30
Gavin D'souza
a4749de6a3 fix(warn): added "Irreversible Change" warnings to merge document via
toolbar rename
2020-01-02 10:27:25 +05:30
Gavin D'souza
04bc216966 fix: python 2 compatibility for symlink creation 2020-01-02 10:10:55 +05:30
Gavin D'souza
658fcac454 fix: avoid race condition to create symlinks 2020-01-02 10:10:53 +05:30
Gavin D'souza
49fc64618a fix: bench build "Cannot link {assets} to {site assets}" 2020-01-02 10:05:47 +05:30
mergify[bot]
dab18b8f90
Merge pull request #9022 from Thunderbottom/chat-fix
fix(chat): refactor code to make chat work
2020-01-01 11:10:41 +00:00
mergify[bot]
9b7c5915c7
Merge pull request #9039 from Thunderbottom/email_ssl
feat(email): send over ssl and append outgoing mails to sent folder
2020-01-01 08:38:48 +00:00
mergify[bot]
1e60a86276
Merge pull request #9172 from Alchez/dev-webhook-tables
fix: allow tables to be sent with dates in webhook (develop)
2020-01-01 07:09:31 +00:00
Suraj Shetty
28d5d39acf
Merge branch 'develop' into dev-webhook-tables 2020-01-01 12:02:53 +05:30
Chinmay D. Pai
4c138390b6
fix: move email status check to fix travis
mail status wasn't being set when the check was run, so the output for
any() would always be false, and none of the mails would have status set
to sent in the backend. moving the check to a point after setting status
for each email should fix this issue

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2020-01-01 11:21:53 +05:30
mergify[bot]
da331254c0
Merge pull request #9164 from gavindsouza/rename-doc-merge-alert
feat: show_alert flag in rename_doc API
2020-01-01 05:40:08 +00:00
mergify[bot]
446cfbb6c3
Merge pull request #9180 from surajshetty3416/fix-energy-point-summary
fix: Use _ for translation since frappe._ is not supported
2020-01-01 05:17:32 +00:00
Suraj Shetty
f343d15995 fix: Remove _ & _dict from frappe because add_module_properties ignores it 2020-01-01 09:34:37 +05:30
Suraj Shetty
d5b08ca36f fix: Use _ for translation since frappe._ is not supported 2020-01-01 09:29:12 +05:30
Faris Ansari
a2075477fc fix: Bug in show/hide global cards (#9163)
Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
2020-01-01 09:11:40 +05:30
mergify[bot]
c74aa7bcfe
Merge pull request #9157 from sagarvora/fix-jinja-dev
fix: (re)allow custom filters/methods to be used with jinja
2019-12-31 16:14:13 +00:00
Suraj Shetty
e2935b5ba6 refactor: Commonify sent mail checks
-and fix formatting
2019-12-31 21:09:40 +05:30
mergify[bot]
f393d0d72b
Merge pull request #9145 from hrwX/qe_cf
feat(Customize Form): Ability to add fields to quick entry
2019-12-31 15:22:19 +00:00
Suraj Shetty
295c5f89f1
Merge branch 'develop' into email_ssl 2019-12-31 20:47:11 +05:30
Suraj Shetty
25c66b384b
Merge branch 'develop' into rename-doc-merge-alert 2019-12-31 20:37:04 +05:30