Commit Graph
118727 Commits
Author SHA1 Message Date
Deep Patel 5ef8300cdd [ADD] web_unsplash: Find free high-resolution images from Unsplash
This commit:
1. Adds settings to install the new `web_unsplash` enterprise module.
   See counterpart commit on enterprise for details.
2. Export `ImageWidget` and `update_control_panel` to be able to override them.
3. Add the unsplash access key rights to website designer. (see related OE
   commit)

task-35060
Closes #25825, closes #25637
2018-07-20 10:16:59 +02:00
Thibault Delavallée 624d75ca94 [IMP] mail: store activity creator on activity record
Currently due to technical reasons all activities are created using the
superuser. It means we have no idea who created an activity. This
commit fixes that by adding a field used to store the activity creator.
It is also displayed in the vignette displayed in chatter giving details
on the activity.

This commit is related to task ID 1865557. Closes PR #25842.
2018-07-19 17:22:18 +02:00
Thibault Delavallée 513fac6230 [MERGE] mail, various: do not display 'Pay Now' in payment emails
Several addons (account, sale, purchase) use specific 'send by email'
templates to send the invoice / SO / PO to the customer as well as
holding a view / payment button.

Purpose is to separate the template content (payment information) from the
payment button (Pay and sign online) when sending those documents by
email. Composer and chatter should not hold the button. It should be added
only in notifications emails.

Technical solution is to move the button into the notification template.
Model template holds the content (document and text) and notification
template holds the payment button.

This merge is related to task ID 1860049 and closes PR #25824.
2018-07-19 17:16:28 +02:00
Thibault Delavallée a2403b0695 [REF] purchase: clean send by email templates
Purpose

 * use the new notification template allowing to display the payment button
   only in emails;
 * reorder the fields definition to ease the reading;
 * slightly clean the email body using a maximum of div and br tags as it
   seems better integrated with Odoo edition capabilities;

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:14:33 +02:00
Thibault Delavallée 14a3fd6018 [REF] account: clean send by email template
Purpose

 * use the new notification template allowing to display the payment button
   only in emails;
 * reorder the fields definition to ease the reading;
 * slightly clean the email body using a maximum of div and br tags as it
   seems better integrated with Odoo edition capabilities;

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:14:33 +02:00
Thibault Delavallée bc79f92481 [REF] sale: clean send by email template
Purpose

 * use the new notification template allowing to display the payment button
   only in emails;
 * reorder the fields definition to ease the reading;
 * slightly clean the email body using a maximum of div and br tags as it
   seems better integrated with Odoo edition capabilities;

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:14:33 +02:00
Pierre Masereel 28eb461242 [IMP] purchase_requisition: validate demo data purchase tender
In the demo data, some requests for quotations are linked to the demo
purchase tender, but this one is in draft state. It is inconsistent with
what can be done in odoo, because draft purchase tender never generate
requests for quotation.

TASK-ID 1864372
2018-07-19 17:12:29 +02:00
Thibault Delavallée 3da7340bf5 [IMP] mail: add a new payment-specific notification template
This commit introduces a new notification template. Its target is to be used
when sending payment-based templates like 'Send by email' for sale orders,
invoices or purchase orders.

Purpose is to separate the template content (payment information) from the
payment button (Pay and sign online) when sending those documents by
email. Composer and chatter should not hold the button. It should be added
only in notifications emails.

Technical solution is to have a somewhat-generic template available in mail
to be used in some specific actions. Another solution is to hide the
button but it breaks if people edit or remove the hidden content when
editing the mail in the composer without knowing it. As the button is
mandatory in those actions we choose to have it added by the notification
email.

Future commits will gradually use this template in some addons.

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:05:20 +02:00
Thibault Delavallée dd72fef73f [IMP] base: do not format email for partners not having email
Currently if a partner has a void email, its email_formatted field holds
a value like "Raoul Grosbedon <False>" which is quite rarely considered
as a valid email address.

Minimal fix for this field is to return a void value if there is no email.
Having a void return is easier to manipulate for callers in order to
handle it.

This commit is linked to task ID 1860049 and PR #25824.
2018-07-19 17:05:20 +02:00
Christophe Simonis 49f634e472 [MERGE] forward port branch saas-11.4 up to 1f7a39964b 2018-07-19 16:36:03 +02:00
Rémi Rahir 4cb9194275 [ADD] snailmail: new iap module to send letters by post 2018-07-19 15:54:00 +02:00
Rémi Rahir 01efffc472 [FIX] iap: fix url generation
Added missing part of the default url in get_credits_url
introduced in af2f12b136
2018-07-19 15:54:00 +02:00
Christophe Simonis 1f7a39964b [MERGE] forward port branch saas-11.3 up to 0c42dcfc22 2018-07-19 15:36:54 +02:00
Rishabh Jadia b942a5c131 [IMP] product, stock: hide qty_on_hand and forcasted on views
Hide value of the column when the product is consumable or service in
tree views.

TASK-ID: 1864329
2018-07-19 15:15:23 +02:00
Arnold Moyaux 202b0515c8 [FIX] purchase_stock: post init hook for warehouses rules 2018-07-19 14:43:08 +02:00
Darshil Trivedi 827958a890 [REF] stock: rename procurement.rule to stock.rule
This commit is related to task ID 1852969.
2018-07-19 14:43:08 +02:00
Arnold Moyaux c93ae01986 [MOV] stock, mrp, purchase_stock: rename procurement in stock_rule
Procurement rule do not reflect reality anymore since it is common for
push and pull rules. We decide to rename it stock rule instead.
2018-07-19 14:43:08 +02:00
Darshil Trivedi a35df8d371 [IMP] stock: merge push and pull rules
Usability improvement:
- Common view for push and pull rules
- Add an help text in order to describe the rule
- Rules menu
- Warehouse checked by default on route created by a warehouse
- Lower the MTO route sequence in order to take it first.
- Tooltip cleaning

Technical improvement:
The purpose of this task was also to merge stock.location.path(push rule) and
procrement.rule. Those two model were design to execute the same task
but in a different direction. Thus it contains duplicate code.

Task ID 1852969.
2018-07-19 14:43:08 +02:00
Christophe Simonis 0c42dcfc22 [FIX] board: adapt test. 2018-07-19 14:32:26 +02:00
Laurent Smet 02ccb58401 [IMP] l10n_nl: improve tax report/tags
Improvement in tax report
Make the distinction between services and products

Was task: 35554
Was PR #23439
2018-07-19 14:30:55 +02:00
Alexandre Kühn 766df6de29 [MERGE] mail, *: several improvements and bug fixes (JS)
*: im_livechat, im_support, website_livechat

Improvement on top of this commit: https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

=============
Improvements:
=============

1. New thread models "abstract threads" and "website livechat"

    new modeling:

                        0..1   0..1
    AbstractThreadWindow <-----+
                               |--->  Abstract Thread
         AbstractMessage <-----+       /      \
                         *     *      /        \
                                     /          \
                                  Thread     Website Livechat
                                   /  \
                                  /    \
                                 /      \
                  Thread With Cache     Document Thread
                   /      |       \
                  /       |        \
            Mailbox    Channel    Support Channel
                          |
                          |
                          DM

  - Thread is used in the backend, while Website Livechat is used in the frontend.
  - The main distinction is that Thread relies on mail_manager, while Website Livechat doesn't.

2. Thread widget has its file renamed (from thread.js to thread_widget.js)
3. Most templates in thread.xml now handles Abstract thread

==========
Bug fixes:
==========

1. [FIX] Mail failures from channels were not grouped together.
2. [FIX] Channel names in the discuss sidebar were displaying their escaped representation.
3. [FIX] Thread was rendered several times when receiving a new message.

=======
Others:
=======

1. Removed unused code.
2. Fixed some classnames and corresponding style.
2018-07-19 14:02:53 +02:00
Alexandre Kühn d7741c7c55 [FIX] im_support, mail: correct style and classname
The style for preview info in the systray were incorrect.
Also, mailbox had the old classname ('o_channel_name'), instead of the new one ('o_thread_name')
2018-07-19 14:01:58 +02:00
Alexandre Kühn a5be128bb1 [REMOVE] mail: fix from forward-port
`documentModel` is already declared and assigned the same value, so this
part is not necessary inside this conditional branch.
2018-07-19 14:01:58 +02:00
Alexandre Kühn 4bcfcb9aa4 [FIX] mail: unescape channel name in discuss sidebar
When the user creates a channel by providing a name, the name is escaped
in order to avoid XSS attacks. As a result, the logic make use of escaped
string, which may be different from the provided string by the user.

As a result, if we do not unescape the string when necessary, the user may
see the escaped version. For instance, if we creates a channel named 'R&D',
it may display 'R&amp;D' to the user.

This commit plays safe by still keeping the handling of channel names in
their escaped form, but unescape it just before displaying it on the sidebar
of the Discuss app to the user.
2018-07-19 14:01:58 +02:00
Alexandre Kühn 04c98eeb48 [FIX] mail: replace _lt to _t for mailboxes' name
Since mailboxes are added after the rpc 'mail/init_message', the translations
are loaded. Therefore it is not necessary to lazily load the translations.
2018-07-19 14:01:58 +02:00
Alexandre Kühn 0f65c4ab3b [FIX] mail: group mail failures of channels
Before this commit, mail failures were correctly grouped in the
systray messaging menu, except for mail failures coming from channels.

This commit fixes grouping for mail failures from channel.
2018-07-19 14:01:58 +02:00
Alexandre Kühn 68c30ef4b3 [FIX] mail: detach chat threads on receiving a new message only if thread is detached
When a new message is received and discuss is not open, any chat thread
containing this message is detached. However, if the thread is already
detached, it should not be detached again.
2018-07-19 14:01:58 +02:00
Alexandre Kühn a203b4a2d1 [REMOVE] mail: remove unused style for 'o_chat_help_message'
This classname is not used anymore, so the corresponding style
should also be removed.
2018-07-19 14:01:58 +02:00
Alexandre Kühn f1ae9369ae [FIX] mail: re-render thread once on newly added message
When we add a new message, it should re-render the thread only once.

The `addMessage` function must handles new messages and updated messages.
Some code for updated messages should not be executed for new messages,
which is what this commit does.
2018-07-19 14:01:58 +02:00
Alexandre Kühn c040994357 [FIX] mail: remove unused LOC
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

The `content_subtype` field has been recently removed, but the commit above mistakenly
added it back on this line.
2018-07-19 14:01:58 +02:00
Alexandre Kühn 55fc06c867 [FIX] mail: clean docstring
- updated docstring
- move function to abstract thread (generalization behaviour for all threads)
- simplify code
2018-07-19 13:58:34 +02:00
Alexandre Kühn 99756a62d7 [FIX] mail: fix small error discuss docstring
The type parameter is optional.
2018-07-19 13:58:34 +02:00
Alexandre Kühn e5039ad7d1 [FIX] im_livechat,mail: clean thread models and windows
- Cleaning website livechat window so that some behaviour are in website livechat instead.
- More shared code in abstract thread / abstract thread windows, thanks to the
introduction of website_livechat model.
2018-07-19 13:58:34 +02:00
Alexandre Kühn 0b6243104e [IMP] im_livechat, website_livechat: rename channel to livechat, use livechat model
In im_livechat, it now handles a {mail.model.WebsiteLivechat}.

Note that this website livechat model is dumb with messages: it stores messages
just before rendering, because this is im_livechat that handles messages.
This should be improved in the future.
2018-07-19 13:58:34 +02:00
Alexandre Kühn 68c5ebbbea [IMP] im_livechat, mail: website livechat model
Make use of a website livechat model, so that im_livechat can make use of this model.
This provides an almost similar model for threads in the backend and in the frontend.

As a consequence, im_livechat and website livechat windows have been adapted to handle
a website livechat model.
2018-07-19 13:58:34 +02:00
Alexandre Kühn 915da49d17 [IMP] mail, *: template rendering with abstract thread, adapt thread instantiation, thread getMessages/fetchMessages, and create mode document thread.
* = im_livechat, im_support

- thread widget now uses abstract thread in `render` method
- thread models have their `init` parameters changed, so that the parent may be optional
- reworked 'creating a new record...' in chatter in create mode:
    > new model CreateModeDocumentThread, which basically is a fake document thread
      with a fake message for its rendering in create mode of the chatter
    > special rendering method of thread_widget for such case: `renderChatterCreateMode`
- renamed thread methods previously named `getMessages` to `fetchMessages`:
    > in order to not conflict with `getMessages`, used for rendering
    > now, `getMessages` always get messages that are locally,
      while `fetchMessages` may fetch messages.

TODO:
    - special thread model for im_livechat (rendering is broken ATM)
2018-07-19 13:58:34 +02:00
Alexandre Kühn ec8c505bc1 [IMP] mail: abstract thread in thread template
With this commit, the template for thread uses a {mail.model.AbstractThread}
object, instead of a list of {mail.model.AbstractMessage[]}.
2018-07-19 13:58:34 +02:00
Alexandre Kühn ac14bcb730 [ADD] mail: abstract thread model
Thread model that group all kinds of threads, including frontend threads
(e.g. website livechat).
2018-07-19 13:58:34 +02:00
Alexandre Kühn 448cceffaa [RENAME] im_livechat,mail: rename widget 'thread.js' file to 'thread_widget.js'
It is a bit annoying to have two files named 'thread.js', one being the widget
and the other the mail model.
2018-07-19 13:58:34 +02:00
Alexandre Kühn cb7add2ebd [MOV] mail: move thread models in specific folder for thread models
The `model` folder contains several files, so this groups files related
to threads directly.
2018-07-19 13:58:34 +02:00
Alexandre Kühn 12f4f9a51d [REMOVE] mail: remove unused 'mail model' class
The intent of this class was to have all mail model be RPC/service calls out of
the box. This is a bit overkill for just 2 lines per new mail models, which is
why this is not used at all.
2018-07-19 13:58:34 +02:00
Alexandre Kühn 067ae915b7 [REF] im_livechat,mail: renamed "livechat" to "website livechat"
Renamed "livechat" model into "website livechat", in order to avoid confusion
with backend livechat.

- `im_livechat.model.LivechatMessage` becomes `im_livechat.model.WebsiteLivechatMessage`
- `im_livechat.LivechatWindow` becomes `im_livechat.WebsiteLivechatWindow`
2018-07-19 13:58:34 +02:00
Alexandre Kühn a6f6bbb46f [IMP] mail: update documentation of params in thread.xml templates
Some parameters in the templates were not documented, which is now
the case with this commit.
2018-07-19 13:58:33 +02:00
Alexandre Kühn 4925d53562 [FIX] mail: improve names of option parameter, classname, and template name
- `displayEmptyChannel` thread rendering options becomes `displayEmptyThread`
- classname `o_chat_content` becomes `o_thread-window_content`, as it is used
  only for thread windows.
- template `mail.EmptyChannel` has been renamed to `mail.widget.Thread.Empty`
2018-07-19 13:58:33 +02:00
Christophe Simonis 37f40d516a [FIX] account: adapt new tests to new reconciliation widget API 2018-07-19 12:14:01 +02:00
Rémi Rahir af2f12b136 [IMP] iap: generic method to recharge an account manually
Up until now, services developed (sms) relied on the get() and
InsufficientCreditError mecanism to create iap_accounts on the fly and
recharge it.

This particular workflow does not work well with automated processes which
is why we modify the function get_credit_url such that it will allow the
client to generate the 'recharge' link manually for better integration
of iap services.
2018-07-19 11:53:13 +02:00
Thibault Delavallée 8eec939a78 [MERGE][ADD] digest, various: add recurrent digest emails
This commit adds a new digest module allowing to send recurrent digests by
email. Those contain a summary of the activity and display various KPIs
allowing to see the activity at a glance. It is also a great tool to improve
user engagement.

First commit adds the digest module holding the base mechanics of digest
implementation as well as first KPIs / tips. Other commits add KPIs and
tips based on the specific extended application.

This merge is related to task ID 30655. Closes PR #18318.
2018-07-19 11:31:50 +02:00
Mitali Patel 9231d42c41 [REM] project: remove onboarding mail
Removed current onboarding mail which was send when module was installed.
It is considered as not necessary now that we have a digest module sending
KPIs and tips by email.

This commit is related to task ID 30655 and PR #18318.
2018-07-19 11:26:49 +02:00
Mitali Patel 5a0696050e [REM] website_mail: remove onboarding mail
Removed current onboarding mail which was send when module was installed.
It is considered as not necessary now that we have a digest module sending
KPIs and tips by email.

This commit is related to task ID 30655 and PR #18318.
2018-07-19 11:26:48 +02:00
Mitali Patel d00382d569 [REM] crm: remove onboarding mail
Removed current onboarding mail which was send when module was installed.
It is considered as not necessary now that we have a digest module sending
KPIs and tips by email.

This commit is related to task ID 30655 and PR #18318.
2018-07-19 11:26:48 +02:00