Commit Graph

166 Commits

Author SHA1 Message Date
Thibault Delavallée 3f758e2fab [FIX] tools, mail: do not strip name from email_to
When sending a mail.mail with email_to, the processing split the email_to into
a list of addresses. However if the found addresses use the form name <email>
the name if lost in the process. A new email_split_and_format method is introduced
in tools and used to avoid loosing that information.
2015-12-11 11:22:40 +01:00
Christophe Simonis 7d68fa0ee6 [MERGE] forward port of branch saas-3 up to 504a04c 2015-09-25 15:03:12 +02:00
Christophe Simonis 504a04c823 [MERGE] forward port of branch 7.0 up to 117b636 2015-09-25 14:56:58 +02:00
Christophe Simonis 117b636d3f [FIX] mail: catch database errors when sending mails 2015-09-25 14:43:00 +02:00
Denis Ledoux 8d9473553a [MERGE] forward port of branch saas-3 up to 36bf774 2014-12-17 14:08:23 +01:00
Denis Ledoux ecd8f63d75 [MERGE] forward port of branch 7.0 up to 60a361c 2014-12-15 17:34:21 +01:00
Christophe Combelles e38974c5b6 [FIX] mail: access link generaTION
Catch only the error related to the access of the linked record.
Previous was hidding error to access the ir.config_parameter and eventual other
errors from the orm.
Uses SUPERUSER_ID to access instance URL (e.g. portal has no access to it).
Fixes #4234 #4234
2014-12-15 14:08:14 +01:00
Denis Ledoux c98e5b2d2c [FIX] mail: _fields['type'].selection is a callable
This revert partially the rev. f2e4a10e1a

  File "/home/odoo/src/odoo/8.0/addons/mail/mail_mail.py", line 76, in default_get
      if context and context.get('default_type') and context.get('default_type') not in self._fields['type'].selection:
      TypeError: argument of type 'function' is not iterable
2014-11-07 12:36:10 +01:00
Denis Ledoux fab2e29d50 [MERGE] forward port of branch saas-3 up to f7a76cb 2014-11-04 18:05:58 +01:00
Denis Ledoux f7a76cbb17 [MERGE] forward port of branch 7.0 up to be7c894 2014-11-04 17:54:48 +01:00
Manuel Vázquez Acosta 2fb2d9f956 [FIX] mail: partners with missing/invalid emails must not halt notifications to others 2014-11-04 17:32:32 +01:00
Raphael Collet f2e4a10e1a [IMP] use model._fields instead of model._all_columns to cover all fields
The old-api model._all_columns contains information about model._columns and
inherited columns.  This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...

This commit contains the following changes:

 - adapt several methods of BaseModel to use fields instead of columns and
   _all_columns

 - copy all semantic-free attributes of related fields from their source

 - add attribute 'group_operator' on integer and float fields

 - base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
   payment_acquirer, share, website, website_crm, website_mail: simply use
   _fields instead of _all_columns

 - base, decimal_precision, website: adapt qweb rendering methods to use fields
   instead of columns
2014-11-04 13:47:57 +01:00
Martin Trigaux 506e397e4a [IMP] mail: avoid sending an email twice
In some specific conditions (e.g. admin logging during cron run, concurrent update), writing on the mail object may fail, triggering a rollback of the transaction.
As the write was done after the SMTP sendmail action, an email could be sent twice (state not correctly put, would be retried at next process of the email queue).
This patch provoke the error before the sendmail action and thus avoids sending the email.
Fixes #552
2014-09-22 18:16:48 +02:00
Thibault Delavallée fd4f6efe1b [IMP] mail: various cleaning and fixes in the notification email links (wording, missing document name management) 2014-08-29 13:22:51 +02:00
Thibault Delavallée a574f83b0b [FIX] mail, mass_mailing: do not add a link to access the document
when the email is not a notification, or not an email usign the automatic
threading. This means that when doing mass mailing with a fixed reply_to
there won't be any link to access the original document, which is what
we want. Otherwise when mailing partners, they have a link to access
their own partner profile, which does not make sense.
2014-08-14 11:29:00 +02:00
Olivier Dony e11eddf753 [MERGE] Forward-port of saas-5 up to 20cc18d 2014-08-13 20:46:47 +02:00
Denis Ledoux fe83c11301 [MERGE] forward port of branch saas-4 up to b49755b
The forward port of the fix 3609ba10f2 will be done separately, as the mrp scheduler has been completely refactored from saas-5.

Conflicts:
	addons/l10n_be_coda/wizard/account_coda_import.py
	addons/point_of_sale/static/src/xml/pos.xml
	addons/procurement/schedulers.py
2014-08-13 10:45:36 +02:00
Denis Ledoux fc74431c1a [MERGE] forward port of branch saas-4 up to 7ecaab9 2014-08-12 16:27:57 +02:00
Denis Ledoux 2c9a116c74 [MERGE] forward port of branch 7.0 up to 245bb4e 2014-08-12 14:16:35 +02:00
Denis Ledoux 245bb4ebdf [FIX] mail: to/from/reply-to addresses formated according to RFC2822
Use formataddr method from email.utils lib, which do the job correctly
2014-08-12 13:40:45 +02:00
Olivier Dony 34cc064400 [IMP] mail.mail: simplify: no default for `headers` field
This avoids storing useless "{}" values
in the database when there are no headers,
and avoids having to update all existing
entries when this column is added.
Just requires simple tests before evaluating
the headers contents.
2014-08-11 16:32:36 +02:00
Olivier Dony f985c0bc11 [IMP] mail.mail: unused `import re` 2014-08-11 16:07:51 +02:00
Olivier Dony 2bbff57691 [IMP] hr,mail,product,project,base: use @auto_join=True on _inherits FK field
This can give a performance boost on large databases
and should not be a concern in terms of access control
as the inheritance already grants access to the parent
records.
2014-08-07 18:03:08 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Thibault Delavallée 2c45b7162c [IMP] [BACKPORT] Mailing lists usability improvements: headers related to mailing lists, use of email queue for notification emails (> 50 followers), archive website template imp and fix. Backport of commit 839815f of saas-5 (PR 502). 2014-06-30 11:04:24 +02:00
Thibault Delavallée 719a4f02c9 [REF] mail, crm, hr_recruitment, project, project_issue: simplified reply-to of notification emails (now displaying 'YourCompany -docname- <email>' instead of 'Followers of ...'; added same_thread directly on the mail.message model to ease the reply_to and message-id computation; factorized a bit the reply-to generation for a batch of records; udpated tests accordingly. 2014-06-23 10:47:47 +02:00
Thibault Delavallée f62f58174b [IMP] mail: added headers field on mail.mail, allowing to store headers data when sending notification emails. 2014-06-23 09:11:01 +02:00
Thibault Delavallée 15f5abcbbe [IMP] mail, website_mail_group: discussion group improvements
- added possibility in mail to have a model adding custom headers in emails sent for notifications for new messages
- mail.group now add list-id and precedence: list in the headers to inform mailing systems that those mails are to be considered as mailing lists
- website_mail_group adds some further data in the headers (subscribe, unsubscribe, archives)
- groups page now display the number of message in the last month
- notification emails are now queued after 50 recipients
2014-06-12 13:45:21 +02:00
Christophe Simonis a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Martin Trigaux 4c822b1a3b [FIX] website_forum: when sending emails about forum post, use the public url instead of the private 2014-05-20 13:10:44 +02:00
Jitendra Prajapati 1f86156991 [MERGE] [IMP] mail, report_webkit: view improvements + better name_get for mail and aliases.
bzr revid: tde@openerp.com-20140509102355-wor8j7cy3egna3qx
2014-05-09 12:23:55 +02:00
Christophe Simonis b8089a1521 [MERGE] forward port of branch saas-4 up to revid 9410 chs@openerp.com-20140507164207-kmme4tsrd4w1m7l1
bzr revid: chs@openerp.com-20140507170112-bjeltv2b0coy60am
2014-05-07 19:01:12 +02:00
Christophe Simonis 9a271eef16 [FIX] mail: correct code indentation introduced during previous forward-port
bzr revid: chs@openerp.com-20140507164207-kmme4tsrd4w1m7l1
2014-05-07 18:42:07 +02:00
Christophe Simonis 1091b24a0c [MERGE] forward port of branch saas-3 up to revid 9450 chs@openerp.com-20140507153348-g2qw61dkxvps13br
bzr revid: chs@openerp.com-20140507160023-8wwqlbf3bv7yqe67
2014-05-07 18:00:23 +02:00
Jitendra Prajapati (OpenERP) e8d8762c77 [IMP]override name_search method and set _rec_name on subject in mail_mail
bzr revid: jpr@tinyerp.com-20140506104621-7gryl1gpv1hrmfvr
2014-05-06 16:16:21 +05:30
Denis Ledoux 4f1dbde8d5 [FIX] mail: attachments present for first recipient, but not for the others
attachments should be an array and not a generator [x for x in y] instead of (x for x in y)

bzr revid: dle@openerp.com-20140505123852-kjc6z0npiot9c54l
2014-05-05 14:38:52 +02:00
Jitendra Prajapati (OpenERP) 59a9d91558 [MERGE]sync main branch
bzr revid: jpr@tinyerp.com-20140505095247-gv9je300z9j98sk0
2014-05-05 15:22:47 +05:30
Olivier Dony 61d2122987 [FIX] mail.mail: avoid prefetching attachment data in memory while processing mail queue, could fail due to memory limit
Specifically when there are many emails in the queue, prefetching
all their attachments at once when processing the first one
could fail, so not even one mail would be sent.

Added explicit logging when an email triggers a MemoryError,
as well as logging when each email is successfully sent.

bzr revid: odo@openerp.com-20140502144431-r3brgagl4gel4wmt
2014-05-02 16:44:31 +02:00
Antony Lesuisse 7e25b9ae55 [MERGE] saas-4 report_webkit missing dependency on report
bzr revid: al@openerp.com-20140501152604-4cobh5ui47dt4pem
bzr revid: al@openerp.com-20140501155633-gefnc3zqcsr2rhaz
bzr revid: al@openerp.com-20140501161156-4wbsvhh8gz4r22h3
2014-05-01 18:11:56 +02:00
Olivier Dony c3e812f34a [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 10025 rev-id odo@openerp.com-20140430102552-qkwv20b20nve64th
bzr revid: odo@openerp.com-20140430110048-6971xplq8k073tto
2014-04-30 13:00:48 +02:00
Olivier Dony c43fdfe32b [FIX] mail: avoid catching (transient) MemoryErrors when sending outgoing mail
This would permanently mark the mail as failed while
there is a good chance it will be sent properly next
time it is retried (provided the memory situation
improves or the server/worker has restarted).

bzr revid: odo@openerp.com-20140430102552-qkwv20b20nve64th
2014-04-30 12:25:52 +02:00
Thibault Delavallée 88f7865043 [FIX] mail: unlink only sent emails, not failed emails.
bzr revid: tde@openerp.com-20140425122726-k5upt8tq5xp4m228
2014-04-25 14:27:26 +02:00
Jitendra Prajapati (OpenERP) 9c051c5bd9 [MERGE]with main branch
bzr revid: jpr@tinyerp.com-20140424050125-c58ek4dlw5805k29
2014-04-24 10:31:25 +05:30
Thibault Delavallée d3ee65eed6 [MERGE] [IMP] mail: slightly improved doc links in notification emails (shorter, clearer)
bzr revid: tde@openerp.com-20140423125319-kegutder49zzqmri
2014-04-23 14:53:19 +02:00
Jitendra Prajapati (OpenERP) 76d284ab8e [IMP]set python string is translated
bzr revid: jpr@tinyerp.com-20140410083655-6m993y17nckk7mfz
2014-04-10 14:06:55 +05:30
Thibault Delavallée 8178669795 [FIX] mail, mass_mailing
- mail: now trigger postprocess_sent_message in every case, being sent or not, as the state
is propagated in the method; udpated all addons accordingly;
- email_template: fixed URL to edit it in website + form view;
- mass_mailing: barchart now send jsonified value;
- mass_mailing: tweaking the form view with all options

bzr revid: tde@openerp.com-20140408124053-o9tb14k6v47s5mjd
2014-04-08 14:40:53 +02:00
Thibault Delavallée 2e02338a2b [IMP] mail_mail: small code and docstrings cleaning + moved some code into
its own method (find email_to) + set email_to as 'Followers of X' only when having
a notification-style mail_mail.

bzr revid: tde@openerp.com-20140321171455-gz0q3eo0fbato50k
2014-03-21 18:14:55 +01:00
Thibault Delavallée adca4573c6 [DOC] mail: updated docstring of a method taht was not up to date
bzr revid: tde@openerp.com-20140321123029-kbfy73ecxidshnnb
2014-03-21 13:30:29 +01:00
Jitendra Prajapati (OpenERP) f81c4ec36e [MERGE]with main branch
bzr revid: jpr@tinyerp.com-20140319051202-hvo8wvd8aunce5bc
2014-03-19 10:42:02 +05:30
Thibault Delavallée a581d864a2 [IMP] mass_mailing: improved test send / send to all
- now workign on various models, taking the correct recipient (email, partner_id for partner or lead)
- improved test send: use email_to, now a many2many on contact model to ease the use of templates
- added action to create a mailing list from leads
- moved a res.partner dedicated action to its own file
- added an actoin to create a mailing list from contacts
- fixed mail_mail post_process: use mail_sent variable as mail.state is not available

bzr revid: tde@openerp.com-20140318164117-f2aou25u633j8m57
2014-03-18 17:41:17 +01:00