Commit graph

1186 commits

Author SHA1 Message Date
shadrak gurupnor
1832df06ad fix: replace owner with allocated_to 2022-01-04 13:39:33 +05:30
Gavin D'souza
bb004fc33b fix: Remove redundant owner fields in Email Template, Help Article 2022-01-04 13:32:44 +05:30
kamaljohnson
bf9ef972c8 refactor: remove debug statement 2021-12-16 13:08:47 +05:30
kamaljohnson
7744924797 fix: syntax error in frappe.qb set in email_account.py 2021-12-16 13:01:16 +05:30
Rutwik Hiwalkar
1ec54c87c8
feat: patched frappe email to work with frappecloud mail app (#15248)
* feat: patched EmailQueue.send and frappe.utils.get_formatted_email

* chore: renamed hooks and handled an edge case

* fix: if the get_sender_details hook is defined but it returns invalid input
2021-12-12 21:09:31 +05:30
Faris Ansari
4bb79161be style: missing semicolon 2021-12-07 17:57:18 +05:30
Faris Ansari
d760e25b63 tests: fix newsletter tests 2021-12-07 17:43:57 +05:30
Faris Ansari
606a0d3809 fix: various fixes
- show published newsletters in list view
- show published newsletter as web page
- show status section after newsletter is sent
- add email_sent_at and total_recipients field
2021-12-07 15:52:25 +05:30
Faris Ansari
de7d0337a6 fix: various newsletter form ux fixes
- Cancel Scheduling button
- Show dashboard message if newsletter is scheduled
2021-12-07 15:48:35 +05:30
Faris Ansari
330677bb0a fix: better sending status
- show email sending progress in form dashboard
2021-12-07 15:40:55 +05:30
Faris Ansari
9bdb5f2eb2 fix: Explicit attachments table
The newsletter content may contain images that get "attached" to the
newsletter document. If this is the case, you can't selectively include
attachments in the newsletter as it attaches all the attachments.
An explicit attachments table solves this problem.
2021-12-06 17:04:24 +05:30
Faris Ansari
0d3bac5528 fix(ux): Show broken links as dashboard message 2021-12-06 15:38:59 +05:30
Faris Ansari
da4160e2dd fix: Newsletter enhancements and fixes
- Organize fields into sections
- Buttons for Send now and Scheduled sending
- Buttons to Send test email and to Check broken links
- Remove Test section
2021-12-06 15:38:58 +05:30
Suraj Shetty
e4ad02f7e7
Merge branch 'develop' into newsletter-markdown 2021-12-03 13:29:59 +05:30
Faris Ansari
51c4738a04 fix(newsletter): use md_to_html instead of markdown
because valid html is valid markdown and markdown method
doesn't convert markdown if it encounters some html tags
2021-12-02 18:01:43 +05:30
Manuel
3a34bfc520
Fix: copy_email_data patch #15106 (#15115)
Reload DocType `Email Account` in patch.
Changed `modified` in json files.

Removed linking of `imap_folder` in `Email Flag Queue` this connection
seems not necessary at this point. Also removed all parts that create
this connection.
2021-12-01 12:41:27 +00:00
Manuel
d57fe8f799
Update frappe/email/doctype/email_account/email_account.py
Co-authored-by: Abhishek Saxena <33656173+saxenabhishek@users.noreply.github.com>
2021-11-26 08:08:18 +01:00
Manuel
171e8b06f8
Update frappe/email/doctype/email_account/email_account.py
Co-authored-by: gavin <gavin18d@gmail.com>
2021-11-25 13:30:45 +01:00
Manuel
2eb5fb9230
Merge branch 'frappe:develop' into multiple_imap_folder 2021-11-24 15:36:58 +01:00
mtraeber
9f1f3e345a fix: sider 2021-11-23 17:08:12 +01:00
mtraeber
dbfb959e0c fix: sider 2021-11-23 16:13:23 +01:00
mtraeber
e0712171a6 fix: frappe-linter, all queries in email_account.py and receive.py rewritten
according to these specifications: https://frappeframework.com/docs/user/en/api/query-builder
2021-11-23 15:54:00 +01:00
barredterra
1c410de6f5 fix: "send open in web" only if enabled 2021-11-23 12:45:28 +01:00
mtraeber
c3f78c4770 Merge branch 'develop' into multiple_imap_folder 2021-11-11 09:44:38 +01:00
mergify[bot]
20e3ed9ff9
revert: "feat(minor): Implement __getitem__ in Base Document" (backport #14945) (#14946)
* Revert "feat(minor): Implement __getitem__ in Base Document (#14855)"

This reverts commit 583a7ef23923d362c85beeabe57703c2d5b12a65.

(cherry picked from commit d165fb3d477e65f7a395118f69278f2cb5c7f4e5)

* fix: keyerror in auto email report

(cherry picked from commit aac20f5d159875a5f3c9b4a6d74beec390e617dd)

Co-authored-by: Ankush Menat <ankush@frappe.io>
2021-11-11 12:13:52 +05:30
abdgad
29785af915
refactor: minor code cleanup in auto_email_report.py 2021-11-06 11:41:46 +01:00
mtraeber
151768d1d9 added method param again after merge 2021-11-03 09:36:00 +01:00
mtraeber
8a7889b928 Merge branch 'develop' into multiple_imap_folder 2021-11-03 08:55:29 +01:00
Ankush Menat
af4ce8156d
fix: remove mutable defaults (#14597)
* fix: mutable defaults

* fix: missing defaults
2021-10-28 09:36:31 +00:00
mtraeber
44216958f9 setting use_imap flag 2021-10-28 11:08:10 +02:00
Manuel
d8c8ca0e2f
Merge branch 'develop' into multiple_imap_folder 2021-10-25 12:05:28 +02:00
Suraj Shetty
5c5c176872 fix: Check if parent exist in col before getting doc
This fixes following error while downloading auto email report

```
Traceback (most recent call last):
  File "/Users/sps/benches/develop/apps/frappe/frappe/app.py", line 66, in application
    response = frappe.api.handle()
  File "/Users/sps/benches/develop/apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "/Users/sps/benches/develop/apps/frappe/frappe/handler.py", line 31, in handle
    data = execute_cmd(cmd)
  File "/Users/sps/benches/develop/apps/frappe/frappe/handler.py", line 67, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/Users/sps/benches/develop/apps/frappe/frappe/__init__.py", line 1205, in call
    return fn(*args, **newargs)
  File "/Users/sps/benches/develop/apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py", line 196, in download
    data = auto_email_report.get_report_content()
  File "/Users/sps/benches/develop/apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py", line 98, in get_report_content
    columns, data = make_links(columns, data)
  File "/Users/sps/benches/develop/apps/frappe/frappe/email/doctype/auto_email_report/auto_email_report.py", line 253, in make_links
    doc = frappe.get_doc(col.parent, doc_name) if doc_name else None
  File "/Users/sps/benches/develop/apps/frappe/frappe/__init__.py", line 883, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "/Users/sps/benches/develop/apps/frappe/frappe/model/document.py", line 62, in get_doc
    raise ValueError('First non keyword argument must be a string or dict')
ValueError: First non keyword argument must be a string or dict
```

The issue was introduced via https://github.com/frappe/frappe/pull/13340
2021-10-18 12:20:06 +05:30
mtraeber
f608fbeddd feat: sync mutliple IMAP folders in Email Account
When working with IMAP accounts, frappe should allow the user
to choose multiple folders to look for new mails. This helps
users to separate their frappe-related email from other
conversations. Use cases range from sieve filters in the
mail server that stuff incoming mail in various mail folders
to people manually sorting their e-mail. In both cases, we
can have different import policies for different folders, and
we can avoid importing unrelated email.

Created a new child table `IMAP Folder` with following fields:
 - Folder Name (user-modifiable)
 - Append To (user-modifiable)
 - UIDVALIDITY (hidden)
 - UIDNEXT (hidden)

Doctype `Email Account` and `receive.py` code adjusted so that
emails with the changes are processed correctly and Frappe
only logs in to the imap server once per sync.

Created a patch that copies the data from the old fields into
the new child table with `INBOX` as default `folder_name`. This
keeps existing setups working without manual changes.

The original fields
 - uidvalidity
 - uidnext
 - append_to
are still available for the pop3 setups. In IMAP, these fields
are hidden user and not used.

Added a test case in `Email Account` that validates data to make
sure a IMAP folder is provided if the use_imap is true.

Also added some code formatting changes in email_account.js to get rid
of sider checks failures that block this change
2021-10-13 10:27:18 +02:00
Suraj Shetty
3a004d38db test: Fix flaky test
- Due to improper cleanup one of the test of Energy Point was failing
2021-10-08 09:39:31 +05:30
Suraj Shetty
c89b517136
Merge branch 'develop' into set-property-after-alert-fix 2021-09-27 11:20:00 +05:30
leela
8e8750c6c6 refactor: Show sync option only if mail protocol is imap 2021-09-21 16:54:56 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
65864c027f chore: Update module license header
These modules were imported from the ERPNext codebase into Frappe.
License header was overlooked at that point. These were contributed
initially by Frappe Technologies Pvt Ltd under GPLv3 (ERPNext's license) and now
we, as Frappe Technologies Pvt Ltd converting them to MIT to comply with
Frappe's license.
2021-09-03 11:51:01 +05:30
Shariq Ansari
a27db796f9 test: minor fix 2021-09-01 15:33:23 +05:30
Shariq Ansari
0fc092a98e test: Added test to check change in property value after alert 2021-08-31 18:35:13 +05:30
Shariq Ansari
42956c1d65
Merge branch 'frappe:develop' into set-property-after-alert-fix 2021-08-31 18:34:04 +05:30
Rushabh Mehta
cec53b595a fix(cleanup): cleanup email account, bug fix for web_template.js and more 2021-08-31 15:27:25 +05:30
Suraj Shetty
8948eadaf5
Merge branch 'develop' into auto_email_report_null_values 2021-08-30 11:21:53 +05:30
Suraj Shetty
9ce8e1b657
Merge branch 'develop' into set-property-after-alert-fix 2021-08-30 09:49:34 +05:30
shariquerik
fb13d2f6a1 fix: Reloading doc before Setting Property After Alert 2021-08-26 01:14:39 +05:30
Suraj Shetty
743e361449
Merge branch 'develop' into core-test-coverage-1 2021-08-23 11:02:50 +05:30
Suraj Shetty
5587ab5a91 style: Fix liinter warnings 2021-08-20 23:54:42 +05:30
gavin
d3f3df2ce1
Merge pull request #13984 from gavindsouza/newsletter-unset-autocommit
fix: Revert auto_commit after frappe.sendmail
2021-08-20 16:23:48 +05:30
Suraj Shetty
0262210d1f Merge branch 'develop' of https://github.com/frappe/frappe into core-test-coverage-1 2021-08-19 22:04:50 +05:30
Gavin D'souza
ebc220db39 refactor(tests): frappe.db.delete > frappe.db.sql
Use frappe.db.delete wherever possible. Get rid of all the frappe.db.sql ;)
This commit focuses on the tests written under the doctype specific
tests
2021-08-19 19:50:48 +05:30