Commit Graph
249 Commits
Author SHA1 Message Date
Mansi Gandhi be232e69da [REM] mail: subtype dropdown in chatter
The possibility to choose a subtype when logging a note was added with the
activities mechanism in CRM. However as the user should not use the chatter
but a dedicated wizard in order to do this, the dropdown is removed.

The internal subtype mechanism is kept. Only the possibility to log something
else than a note through the chatter UI has been removed.
2016-04-19 15:25:51 +02:00
Jigar Patel 253d4eccf0 [IMP] mail: Add counter in starred 2016-04-08 13:41:01 +02:00
Christophe Simonis 658989868c [MERGE] forward port of branch saas-10 up to aa6ebd1 2016-04-05 20:08:50 +02:00
Christophe Simonis aa6ebd146a [MERGE] forward port of branch saas-9 up to 549daaa 2016-04-05 19:27:34 +02:00
Olivier Dony b5a7491b64 [MERGE] Forward-port of saas-7 up to rev. 83a08c4791
Conflicts:
	openerp/addons/base/res/res_partner.py
2016-04-02 01:09:07 +02:00
Olivier Dony 83a08c4791 [MERGE] Forward-port 9.0 up to rev. 7a483a85d4 2016-04-02 01:03:59 +02:00
Raphael Collet 7a483a85d4 [FIX] *: do not use computed fields for resizing images
Otherwise recomputation may fail with "record does not exist or has been
deleted" when creating records with a value directly set for e.g.
'image_mediun' on a new product.

The issue comes from the storage of the images.  When creating a product, the
creation of an attachment for storing the field `image_medium` triggers the
recomputation of that field before its dependency `image` is set.  As `image`
is initially null, `image_medium` is recomputed as null, and this deletes the
attachment just created before the latter has completed its creation!  As a
consequence, some code at the end of `create` for the attachment crashes
because the record has been deleted.

The following models have been fixed: `fleet.vehicle.model.brand`,
`hr.employee`, `im_livechat.channel`, `mail.channel`, `payment.acquirer`,
`pos.category`, `product.template`, `product.public.category`, `res.partner`.

opw 666330
Closes #11516
2016-04-02 00:47:57 +02:00
Christophe Simonis 79976bd779 [MERGE] forward port of branch saas-10 up to 6e95659 2016-04-01 19:10:34 +02:00
Christophe Simonis 6e95659a08 [MERGE] forward port of branch saas-9 up to f4d1adc 2016-04-01 18:51:55 +02:00
Christophe Simonis 6c8141a1df [MERGE] forward port of branch saas-10 up to 2483327 2016-04-01 16:15:35 +02:00
Denis Ledoux 17f4d22594 [MERGE] forward port of branch saas-7 up to 2d2028a 2016-04-01 11:26:27 +02:00
Denis Ledoux 2d2028a66c [MERGE] forward port of branch 9.0 up to b44cb82 2016-03-31 17:57:22 +02:00
Kinjal Mehta 1409de5d36 [IMP] Convert UserError into ValidationError when only a message to display
When only a message argument is given to the crash manager, the popup display
"Error while validating constarint" and "None" with the warning message
which does not make any sense for the common user.
2016-03-30 09:17:42 +02:00
Thibault Delavallée 3b26d1e2fd [FIX] mail: default reply to with multiple alias
When having multiple aliases matching a record, take the first one coming
in the order instead of the last one. This way the defined order is effectively
taken into account.
2016-03-25 12:40:46 +01:00
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +01:00
Christophe Simonis 59d3f63c58 [MERGE] forward port of branch saas-7 up to 9e4157b 2016-03-24 15:12:00 +01:00
Martin Trigaux b54b888305 [MERGE] Forwardport of branch 9.0 up to revision 87578177 2016-03-22 14:30:21 +01:00
Raphael Collet 4ddc323139 [FIX] base: fix and complete migration of base/ir
- add or fix decorators on methods
- fix most compute methods (wrong dependencies)
- revert changes in `eval_context` of `ir.actions`
- various code simplifications and improvements
- migrate methods that were not
- ir_qweb: modify `QWebContext` to take an environment instead of `cr`, `uid`, `context`
- ir_qweb: convert `AssetsBundle` to use new API `env`
- ir_ui_view: use decorator `multi` on method `read_combined`
- ir_ui_view: ensure that method `render` is never called with an xml_id
- ir_ui_view: factor out part of the `ormcache` key of method `_read_template`
2016-03-21 13:46:44 +01:00
Géry Debongnie fc43546f01 [FIX] mail: duplicating partners does not duplicate mail channels
It could be a real problem when the duplicated user has access to all
private conversation from the original user.
2016-03-18 14:04:31 +01:00
qdp-odoo 7a3d63b377 [MERGE] forward port of branch saas-7 up to revision 71d16a369e 2016-03-16 10:27:19 +01:00
Denis Ledoux 6e09293b7d [MERGE] forward port of branch 9.0 up to 8e69043 2016-03-11 11:42:43 +01:00
Yannick Tivisse f6c0418a80 [IMP] mail: Send plaintext emails on discussion with external user/partner
When there are no available action buttons on the email (as Follow, View Task,
Convert to Opportunity), i.e. when the user/partner is not an employee, and
when the message subtype is 'Discussion', send a plaintext mail instead of
a formatted one.

Use case: Strange to receive a mail like this when you're on a lead and you
receive formatted mails.
2016-03-07 15:55:53 +01:00
Denis Ledoux a37bd77895 [FIX] mail: mark all as read, remove notification as sudo
As it's done few lines below,
in `set_message_done`.

The user could have a notication associated
to a message he has not, or no longer, the
write access, but he should still be able
to mark it as read.

opw-671188
2016-03-07 11:21:42 +01:00
Thibault Delavallée f4481ff74e [IMP] mail: gateway: CIDs
Finally add support of CIDs in incoming emails. Inline images are recognized
and added as attachments. Image links are updated from src=cid: to src=link
using the /web/image controller.

It has been decided to keep the image in atttachments instead of putting them
in base64, like proposed in various PRs. Indeed we prefer to store this data
into the attachments instead of directly putting it in the mail_message table.
Moreover this enable the display of attachments in the chatter and record views.
2016-03-03 15:56:09 +01:00
Thibault Delavallée ba74e9ffec [CLEAN] tools, mail: remove html_email_clean
Remove html_email_clean in tools. Remove shorten in mail.
2016-03-03 15:44:57 +01:00
Nicolas Martinelli 88e7122020 [FIX] mail: mail_server_id
When a specific SMTP server is set on a mail template, it is never used
when the mail is sent. There are two reasons:
- `mail_server_id` is a read-only field set by an onchange. However, a
  read-only field is not sent to the server, so the information is lost.
- The information is stored in the context of the object `Mail`, but it
  is never used. Moreover, when the method `message_post` is called, the
  `Mail` object is not used to post the message, so the information is
  lost again.

The fix includes two parts:
- the `mail_server_id` field is not read-only anymore. Actually, there
  is no reason to make it read-only.
- the information is stored directly in the mail values and used at the
  appropriate moment.

Fixes #6554 (from v9.0)
opw-669958
2016-03-03 13:24:41 +01:00
Thibault Delavallée fd25fd4d44 [FIX] fields: do not strip class by default
Do not strip class by default on html fields, this was an error. Currently
only mail_message body field should not contain classes. Indeed as external
content can be stored through the mail gateway we do not want to keep the
classes.
2016-03-02 16:43:04 +01:00
Ravi Gohil 7eab8e26d3 [MIGR] base: migrate base/res to the new API
- `ir.property`, improve API of method `get_by_record`
- `res.bank`, `res.partner.bank`
- `res.company`
- `res.config`, `res.config.installer`, `res.config.settings`, fix usage of methods `get_default_`
- `res.country`, `res.country.group`, `res.country.state`
- `res.currency`, `res.currency.rate`
- `res.font`
- `res.lang`
- `res.partner`, `res.partner.category`, `res.partner.title`
- `res.request.link`
- `res.groups`, `res.users`, `res.users.log`, change password wizard
2016-02-23 12:06:25 +01:00
Christophe Simonis 60c9cac46b [MERGE] forward port of branch saas-9 up to 87a01c7 2016-02-17 18:07:21 +01:00
Christophe Simonis 87a01c75ef [MERGE] forward port of branch saas-7 up to 5be43b8 2016-02-17 18:01:11 +01:00
Christophe Simonis 5be43b8d9a [MERGE] forward port of branch 9.0 up to 27058c4 2016-02-17 17:48:03 +01:00
Géry Debongnie 12d5667830 [FIX] mail: use the domain to determine message to mark as read
The button 'mark all as read' used to mark all messages as read, which
is not usually what the user wants when there is an active filter in the
search view.  This commit make sure that the domain is send to the
server and used correctly.
2016-02-17 14:26:54 +01:00
Denis Ledoux 493705bb77 [MERGE] forward port of branch 9.0 up to c40070f 2016-02-15 17:00:11 +01:00
Denis Ledoux 26d6e83881 [FIX] mail: specific message subscribe
`write` expects a `dict` for the `values` argument,
`part[record.id]` is a list of commands to add new
followers.

See the returned variable `specific` of the method
`_add_follower_command` in `mail_followers.py`.

Surrounding `part[record.id]` with a `dict` with
`message_follower_ids` has probably been
forgotten by oversight.

`gen` and `part[record.id]` have actualy the same
syntax, and the `write` done with these variables
should therefore be called the same way.

opw-669376
2016-02-12 13:54:05 +01:00
Christophe Simonis 9a805c90ed [MERGE] forward port of branch saas-9 up to d70fde0 2016-02-10 18:40:56 +01:00
Christophe Simonis d70fde0330 [MERGE] forward port of branch saas-7 up to cab5c48 2016-02-10 18:37:01 +01:00
Denis Ledoux eb2346ba46 [MERGE] forward port of branch 9.0 up to 0b7990c 2016-02-08 16:08:32 +01:00
Yannick Tivisse 0b7990cbce [FIX] mail: put only employees into the group_data 'user'
Before, every user was set into this group. It means that a portal
user received elements in his mail context, like the buttons to
open a document or to follow it. Now, only the employees will
receive this kind of information
2016-02-08 15:40:24 +01:00
Yannick Tivisse 243d207ad6 [FIX] mail: Use standard signature to be recognized by services like Google 2016-02-08 15:40:24 +01:00
Thibault Delavallée 82e60a9648 [FIX] mail: automatic subscription of responsible
Do not erase existing subscription with void subtypes.
2016-02-08 12:16:58 +01:00
Aaron Bohy bc2d86e00f [FIX] mail: correctly compute unread messages
Two problems occured:
 - when the user hadn't seen any messages of a channel, the seen_message_id
   was null and doing seen_message_id < msg.id to retrieve all messages
   received after the last one seen didn't return any message (null < x is
   always false)

 - messages sent by visitor on the livechat doesn't have any author_id, so,
   again, doing msg.author_id != partner_id is always false, and as a
   consequence, server-side, the messages sent by visitors were always
   considered as read
2016-02-08 08:29:52 +01:00
Christophe Simonis 04416a5a6f [MERGE] forward port of branch saas-9 up to 469e04e 2016-02-02 14:55:52 +01:00
Christophe Simonis 469e04e97c [MERGE] forward port of branch saas-8 up to 2611a81 2016-02-02 14:52:15 +01:00
Christophe Simonis 2611a8198e [MERGE] forward port of branch saas-7 up to e765569 2016-02-02 14:48:31 +01:00
Christophe Simonis e765569d04 [MERGE] forward port of branch 9.0 up to f0a63e5 2016-02-02 14:44:39 +01:00
Thibault Delavallée 9b43a8c8f6 [ADD] mail: send email based on templates
When performing automatic tracking it is now possible to automatically send
emails based on a template. This template can either be a qweb template
using its xml_id or a MailTemplate using its record.

This is simply implementing directly in the mixing a feature already present
in recruitment and soon to be added in task, issues or helpdek.
2016-02-01 12:13:53 +01:00
Aaron Bohy 4bab99bdaf [FIX] mail: don't notify 'join/left' messages
Messages of type 'notification' and whose model is 'mail.channel' are
considered as 'system notifications'. This is the case of 'join/left' messages.
They aren't taken into account when computing unread messages anymore.

Also use the same heuristic to decide whether or not to display the message's
star, so from now on pure notifications (not system notifications), like status
change on a document, can be starred.
2016-02-01 11:31:09 +01:00
Christophe Simonis 1231585df1 [MERGE] forward port of branch saas-9 up to 78d20b5 2016-01-27 12:27:01 +01:00
Christophe Simonis 78d20b552b [MERGE] forward port of branch saas-8 up to 7e44ddc 2016-01-27 12:24:04 +01:00
Christophe Simonis 7e44ddcda3 [MERGE] forward port of branch saas-7 up to 6f923cb 2016-01-27 12:23:09 +01:00