Commit Graph
105055 Commits
Author SHA1 Message Date
Thibault Delavallée cfc91c06d6 [IMP] mail: avoid adding alias-partner as followers
Having followers having an email address being an alias is rarely a good idea.
2016-09-01 13:27:20 +02:00
Thibault Delavallée 4f9105a4ef [IMP] mail: handle forwarded emails in mailgateway
If the 'To' of an incoming email is an alias on another model we now consider
this emails as a forward to a new alias. A use case for this is an email on
a task that should be considered as an issue and forwarded to another alias.
2016-09-01 13:25:26 +02:00
Thibault Delavallée 0bedc14c12 [IMP] mail, various: send email to assigned people
When a user is assigned to a model on a user_id field an email is sent to him
containing a link to the document. This way the user is warned he is now
responsible of the task / issue / lead / ...
2016-09-01 13:24:27 +02:00
Thibault Delavallée 38e181ee2c [IMP] mail: send email notifications after transaction commit
Using after commit event notifications emails are now send once the current
transaction is finished. This allows having issues with emails being sent
while the transaction failed sometimes after email sending, but still in the
same transaction.

A small hook is done to allow invitation emails to be sent directly as some
data related to mail.message is unlinked directly in the wizard.
2016-09-01 13:22:59 +02:00
Thibault Delavallée 029d1baf35 [REF] mail: remove required alias on users
This commit remove required alias on res.users model. It also removes the
inheritance of mail.alias.mixin. The field alias_id is kept and allow people
to use aliases on users if they want. However there is no default void alias
created for each user anymore.

Default from of mail.message does not use user alias anymore. Indeed this
creates issues with aliases not being correctly configured and can be
confusing compared to private channels. Using user aliases is therefore
now done manually instead of being a default behavior.
2016-09-01 13:19:24 +02:00
Thibault Delavallée 9c1af690d5 [IMP] mail: bounce management
Handle bounces using bounce alias directly in mailgateway. Previously bounces
were used only in mass mailing to update campaign statistics. Now the
mailgateway tries to find data from standard delivery status emails. This
data is used to update state of emails sent to customers, to display it in
the Chatter. It is also used to increment the message_bounce counter on the
bounced partner and bounced record, if any and if the field exists.

Previous more generic code that detect bounces is kept. This code is more specific
to standard delivery failure notifications by parsing its content.
2016-09-01 13:11:49 +02:00
Thibault Delavallée 72dfcae2a4 [IMP] mail: improve notification management for customers
Currently it is impossible in Discuss to know whether an email has been sent
to a customer and whether it failed or bounced. A notified partner has an
entry in the needaction m2m table. In this commit we decorate this table to
add fields about the email notification: is an email sent, did it failed, did
it bounce.

This information is kept only for customers. Internal users does not use this
information. Moreover their notification is deleted once the message is read
in the Chatter. This avoids having a notification table that grows quickly.

Chatter now holds a new icon for email details. It allows to know on a thread
status of emails sent to customers.
2016-09-01 12:57:56 +02:00
Thibault Delavallée 2194993763 [REM] mail: remove support of [ID] matching in subject in mail gateway
This is an old compatibility code. It is time to remove it as it is not used
sinces ages.
2016-09-01 12:57:32 +02:00
Thibault Delavallée 0843df213c [FIX][IMP] mail, mass_mailing: improve making of Return-Path alias
Previously Return-Path were composed using bounce_alias-<mail_id>-<model>-
<thread_id> . However this may lead to return adresses not supported by
the incoming mail server. We now form the bounce alias using bounce_alis+
<mail_id>-<model>-<thread_id>. Using a + indicates that the right part of
the address is for information and used to manage the bounce. Only the
left part is used for the email routing, allowing the return email to
effectively land in the alias mailbox.
2016-09-01 12:57:05 +02:00
Thibault Delavallée 6aebdc2ab6 [FIX][IMP] mail: check for rcptto when finding destination aliases
When a new answer comes in a thread the mailgateway finds if the recipients
are linked to existing aliases. This allows notably to check if the author
can effectively contact this alias. Previously only the To was checked.
However we cannot ensure the recipient is contained in To as it could be
in Delivered-To for example. We now check for all possible recipients.
2016-09-01 12:50:14 +02:00
Thibault Delavallée 0028c42136 [CLEAN] mail: clean mail gateway code
The purpose of this commit is to clean a bit the code related to email
routing in the mailgateway: message_route and message_route_verify.

message_route is now clearly separeted into two categories. First one
handles emails considered as answers to existing threads. Second one
handles emails that have to create new threads, either through alias or
default behavior of the mailgateway.

message_route_verify has been a bit facotrized to simplify the various
overrides that appeared lately in the codebase.

This commit only contains code cleaning. No functional change should occur
due to this commit.
2016-09-01 12:23:14 +02:00
Thibault Delavallée b259eb69d2 [CLEAN] mail, tools: factorize decode email tools
mail.mail and mail.thread have methods to decode headers. This commit
move them in mail tools. It is indeed simplier to have all email tools
in the same file. Moreover they have been renamed to avoid confusion
with standard library methods: decode and decode_header already exist.

 * decode in mail_message is now decode_smtp_header
 * decode_header in mail_thread is now decode_message_header

A method to data from references is also moved into tools. A regex was
already defined in tools. Now the method using it is already put in tools.
Mailgateway will now simply call this method.
2016-09-01 10:41:04 +02:00
Thibault Delavallée ea4c4a22c4 [IMP] mail: clean test about forwarded emails and parent_id
Previous version of the test was actually not correct. Mailgateway was not
considering references as in-reply-to when trying to find answers that have
to be considered as a new thread instead of an answer to an existing thread.

Purpose of the test is actually to be sure that answers considered as a new
thread have no parent_id set. Otherwise you may have threads linked to
messages belonging to other records, leading to access right issues. Moreover
if this email begins a new discussion thread it makes no sense to have a
parent message set.

A new test is written to better simulate the test case. It sets a message_id
containing reply_to which is the way odoo uses to indicated that answers
to a message have to be considered as new threads. This is used notably in
mass mailing for example.
2016-09-01 10:20:32 +02:00
Thibault Delavallée d7b4c8b92b [IMP] base: partner: add notion of customer or shared-user partner
We already know that a user is a shared user. This means a partner created
for a customer for the purpose of sharing data. However sometimes it is
interesting to know that a given partner is a customer or a partner linked
to a shared user. This will be used notably in the Discuss app.
2016-09-01 10:19:00 +02:00
Thibault Delavallée eb440baab2 [FIX] sale: send email quotations to contact, not invoice address 2016-08-31 17:49:45 +02:00
Raphael Collet d6af11da6a [MERGE] Apicalypse: remove the old API
This drops the backward compatibility with the old API:
 - remove method wrappers;
 - convert all the remaining old-API calls to the new API;
 - remove the processing of _columns, _defaults, _inherit_fields, _all_columns;
 - remove all old-API fields;
 - implement sparse fields;
 - modify the registry to become a mapping model_name -> model_class;
 - adapt XML-RPC and JSON-RPC gateways.
2016-08-31 17:23:04 +02:00
Raphael Collet 70dec2d896 [REF] registry: now mapping model name to model class 2016-08-31 17:21:59 +02:00
Raphael Collet 75dc39e042 [REF] openerp.http: make request.context consistent with request.env.context 2016-08-31 17:21:58 +02:00
Raphael Collet 4033ccc129 [REM] openerp.http: discard deprecated methods and properties 2016-08-31 17:21:57 +02:00
Raphael Collet 92f31b10e4 [FIX] website: pass ids as a positional argument
For the sake of simplicity, the method adapter `call_kw_multi` does not look up
for `ids` in keyword arguments, instead it expects it in positional arguments.
2016-08-31 17:21:57 +02:00
Raphael Collet b58beee468 [FIX] res_config: reset environment after module installation/deinstallation 2016-08-31 17:21:56 +02:00
Raphael Collet 72afd28230 [FIX] remove or convert old-API calls 2016-08-31 17:21:55 +02:00
Raphael Collet 16696b2a05 [FIX] openerp, web: make execute and call_kw invoke methods in the new API
Also refactor the test to prevent private methods to be remotely called.
2016-08-31 17:21:55 +02:00
Raphael Collet 604a1c5fcd [REM] api: remove method wrappers
Methods can no longer be called in both APIs.
2016-08-31 17:21:53 +02:00
Raphael Collet 8ea5f49391 [REM] models: remove _columns 2016-08-31 17:21:53 +02:00
Raphael Collet 32c762803a [REF] fields: add prefetch on new-API fields 2016-08-31 17:21:52 +02:00
Raphael Collet ddaa187f69 [IMP] fields: add translate on all fields, and normalize its value 2016-08-31 17:21:51 +02:00
Raphael Collet f8c845bbdb [REF] models: delegate o2m and m2m schema update to the field 2016-08-31 17:21:51 +02:00
Raphael Collet 31f829c394 [REF] models: replace old-API column get/set by field read/write 2016-08-31 17:21:50 +02:00
Raphael Collet 73bdc181ff [REF] fields: replace old-API _symbol_get/_symbol_set by field converters 2016-08-31 17:21:49 +02:00
Raphael Collet f49f80380e [REF] models: use _fields instead of _columns 2016-08-31 17:21:49 +02:00
Raphael Collet b33b455706 [REF] models: replace get_pg_type(column) by field.column_type
In method `_auto_init`, use new-API fields instead of columns.
Also remove the deprecated attribute `size` from reference fields.
2016-08-31 17:21:48 +02:00
Raphael Collet 2b587d34ff [REM] openerp.osv.fields: remove old-style function fields 2016-08-31 17:21:48 +02:00
Raphael Collet 0fc697a3f7 [REF] fields: implement sparse fields as computed fields 2016-08-31 17:21:47 +02:00
Raphael Collet b258f4b842 [REF] fields: implement company-dependent fields as computed fields 2016-08-31 17:21:47 +02:00
Raphael Collet 6956696eb2 [REM] models: remove _defaults 2016-08-31 17:21:46 +02:00
Raphael Collet 86599bcc5a [REM] models: remove _inherit_fields 2016-08-31 17:21:45 +02:00
Raphael Collet ff5e44d2de [REM] models: remove _all_columns 2016-08-31 17:21:45 +02:00
Denis Vermylen (dve) 6eca5d038f [FIX] website_sale: handle no partner address case
when purchasing products from website, if partner did not have a country set
the "pay now" button was broken. Now you get redirected to the billing form
to fill in your address.
2016-08-31 17:17:38 +02:00
Denis Vermylen (dve) c255342e8f [IMP] payment_*: change payment icon
take the payment icon from the acquirer image field, instead of a static
unchangeable icon. Change the acquirer image on all acquirers data.
2016-08-31 17:17:38 +02:00
Denis Vermylen (dve) 782c4b5665 [IMP] payment: hide fields on acquirer form view
Fields are hidden when needed, some moved to debug mode.
2016-08-31 17:17:38 +02:00
Denis Vermylen (dve) 23f3bde20d [FIX] payment: change custom acquirer to work
- custom acquirer auto_confirm field changed to none.
- changed default_acquirer_button to actually display a button
  used wire transfer's template (transfer_acquirer_button)
- set dependance to module_payment_transfer as it doesn't work without
  and use transfer as provider.

Note: This is a quick fix to make it work, it's quite ugly.
      Before the fix it didn't work an people duplicated the transfer
      payment acquirer and edited it.
      One downside for usability is that the payment icon will be the one
      from transfer.
2016-08-31 17:17:38 +02:00
Denis Vermylen (dve) 1a4af28067 [IMP] sale: remove website_portal from settings 2016-08-31 17:17:37 +02:00
Denis Vermylen (dve) 4ee51c9cfd [IMP] website_sale: move Pricelist menuitem
moved from catalag submenu to settings > eCommerce.
2016-08-31 17:17:37 +02:00
Denis Vermylen (dve) f90290d1c2 [IMP] website,w_sale: Website Admin settings view
- Add optional products and pricelists to ecommerce section
- add mail template sent when confirming a sale order
- rename and clarify using radio widgets
2016-08-31 17:17:37 +02:00
Denis Vermylen (dve) fbe3608c7e [FIX] web: avoid autoresize duplicates
In web_planner, changing pages would take more and more time after
a few clicks if autoresize was called on textareas. Every time we
would change page, autoresize was called on all textareas and added
an additional textarea for each one, doubling the amount on each page
change.
The autoresize function in dom_utils was checking too shallowly for
duplicates and created a new textarea where autoresize would again be
called upon on a later stage.
This commit fixes both problems.
2016-08-31 17:17:37 +02:00
Thibault Delavallée 275ee5825d [FIX] tools: sanitizer: decode pipe character
Mako uses pipe character in several occasions like |safe to tell an email is
safe. However the sanitizer will encode it, leading to template not correctly
rendered. Like other special characters used in mako, it is now decoded
after sanitize.
2016-08-31 16:27:55 +02:00
stefanorigano 262fe732ba [IMP] website: replace snippet thumbnails with better ones 2016-08-31 16:37:20 +02:00
stefanorigano 0cdfbc0fbe [REF] website: snippets layout/style improvements
* s_banner
    - Remove text-container hardcoded style (user will be able to use the
        new transparent color palette instead)
    - Improve indicators visibility on both dark or light bg
    - Cursor: pointer for navigation buttons
* s_cover
* s_quote: remove the whole snippet
* s_three_columns
* s_reference
    - Remove Quotes
    - Add new logo demo images
* s_button: rename from "Button" to "Call to Action" + some design
* s_feature_grid
2016-08-31 16:37:20 +02:00
stefanorigano 8c035a7a41 [IMP] web_editor: add transparent grayscale color palette
These colors were usually hardcoded in some snippets (.s_banner for
example) to increase text legibility over background images.

This commit will let the user personalize them.
2016-08-31 16:37:20 +02:00