Commit Graph
105046 Commits
Author SHA1 Message Date
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
stefanorigano 8ef4535327 [IMP] website: unable/enable snippet options for some snippets (parts)
* Remove background position and color options for parallax
* Add background/color options for .jumbotron (button and big message)
* Add background/color options for s_cover and s_banner text container
2016-08-31 16:37:20 +02:00
stefanorigano bcf2c87cd0 [IMP] website: adapt logo size to menu items 2016-08-31 16:37:20 +02:00
stefanorigano 937d299887 [IMP] website: replace images and better use them in snippets
* Reduce images number (remove unused ones)
* Improve images quality (so that they can be used for parallax too)
* Make them all available in the website library
* Snippet demo/default images are in a separate folder and a separate
record to allow theme customization (this was already the case for the
cover snippet but the system has been extended)
* Some snippet style improvements
2016-08-31 16:37:20 +02:00
stefanorigano a5400b7ad7 [IMP] website: add icons to all snippet options 2016-08-31 16:37:20 +02:00
stefanorigano 1634cad46c [REF] web_editor: editor UI style and stability improvements
* Review style of some UI components
* Rename some content
* Define a font-family less variable to be used to avoid that themes
customizations affect the UI. Note: theme should ideally not redefine
the font family of the body but of the #wrapwrap element but this is
done for safety.
* Overwrite other theme's customisations
* Minor style fixes
2016-08-31 16:37:20 +02:00
qsm-odoo 4d68d779dc [IMP] web_editor: force web_editor overlay option buttons to stay on one line
Before this commit, when the snippet was too narrow, the buttons broke
over multiple lines.
2016-08-31 16:37:20 +02:00
qsm-odoo c204d621bb [IMP] website_blog: use valid website snippet as default content for blog post
Adapt the default content of blog post to be a valid website snippet.
Previous content was not entirely possible to remove (there still was
a remaining .container) and was not easily customizable (user had to
remove it if he wants something great).

Note: maybe we should adapt the snippets so that they are callable with
custom content or do something like what has been done for default
content for job positions (see commit 00cfb0889b).
2016-08-31 16:37:20 +02:00
qsm-odoo 1c87f1d3bb [IMP] website(_blog): remove "Style" (blog-style) snippet option
The "bigger text" option was an useless option as redundant with the
summernote editor one.

The "narrow" option always resulted in an ugly layout with bugs in
many contexts.

Note: the styling classes are kept for compatibility for now.

+ Adapt demo data of website_blog which rely on the "narrow" option.
Use up to date snippets with reduced column width to get the same
result.
2016-08-31 16:37:20 +02:00
qsm-odoo d6f30345a3 [IMP] web_editor,website: rename "background image options" option
"Background Image Options" -> "Background Image Sizing"
2016-08-31 16:37:20 +02:00