Commit Graph
100449 Commits
Author SHA1 Message Date
Aaron Bohy 16a3a4b7fe [FIX] im_livechat,mail: various livechat fixes
- prevent concurrent opening of the chat window
- take into account the placeholder value of the livechat session record
- don't send welcome message if empty
2016-01-25 15:47:25 +01:00
Aaron Bohy fc42880da2 [FIX] mail: restrict mention suggestions to channel members
Problem is that when someone is mentionned in a channel he doesn't belong to
(public, private or DM whatever), the message only appears in its Inbox and
he can't know where it comes from nor reply. This is thus very confusing.

With this rev., in Discuss, one can only mention members of the channels.
In the chatter, anyone can be mentionned like before, as when the message
arrives in the Inbox, there is a link to the associated document.
2016-01-25 15:46:56 +01:00
Aaron Bohy da2cbae8f8 [FIX] mail: synchronize last_message_seen_id between tabs
When using multi tabs or browsers, the 'New messages' separator in threads was
sometimes wrongly displayed (displayed over messages already seen in another
tab or browser).
2016-01-25 15:46:56 +01:00
Aaron Bohy 6cc8d32d60 [FIX] mail: automatically consider messages sent as read
Problem was that since rev. 617968c61, we consider sent messages as read client
side. This has been done to avoid to indicate that a channel has unread
messages e.g. when this channel is a follower of a chatter in which we wrote
a message.

This change has as consequence that we don't perform the 'channel_seen' RPC for
messages sent. At each refresh, the server sends information about pinned
channels, especially the unread counter, which was thus sometimes incorrect.

This rev. simply doesn't take messages we wrote into account when computing
the message_unread_counter field.

Also correctly display the 'New messages' separator in threads, by automatically
skipping messages we wrote (i.e. it is now displayed above the first message m
with m.id > last_message_seen_id and such that we aren't the author of m).
2016-01-25 15:46:55 +01:00
Aaron Bohy f35b48aa90 [FIX] mail: don't erase textarea's content on 'New message' click
Also mute the 'New message' button when the composer is open as the only
primary action should be to send the message.
2016-01-25 15:46:55 +01:00
Aaron Bohy 302885b860 [FIX] mail: various ui fixes
- limit partner search to 10 in new message's chat window to prevent overflow
- prevent negative needaction counters (may occur in multi-tab, with
  needactions received during an inactivity period)
- remove <pre> tag when computing messages' preview for the messaging dropdown
  as they break the layout and add 'overflow: hidden' on o_mail_channel_preview
  just in case
- rename 'New message' button in Inbox into 'Send mail' as it was confusing,
  and adapt .pot file accordingly
- focus on composer when opening a chat window
- break lines in threads to avoid horizontal scrollbar (credit goes to qsm)
- correctly apply rules on <p> in threads

opw-667235
2016-01-25 15:46:55 +01:00
Denis Ledoux cca96db88d [FIX] website_event_sale: Tour test, the expected amount is 5,500
The amount was 3,8560.96 because the Benelux pricelist was
applied by default, due to a regression introduced by
698c0c557d

while it should have been the public pricelist loaded
by default.

Both the benelux and the public pricelists were available,
but it should be the public pricelist chosen by default,
as it's the default website pricelist.

See bf78ad7bf7 for more
explanations.
2016-01-25 14:16:00 +01:00
Martin Geubelle b50e99c1af [FIX] web_kanban: correct title on kanban
In a grouped column one should display the total number
of records and not only the loaded records.
2016-01-25 13:34:59 +01:00
Denis Ledoux bc0cff4bf8 [FIX] website_sale: do not reload the previous cart if not valid
If a user signs in, and as a previous unfinished
order, it loads it only if the pricelist set on this
sale order is amongs the available pricelists.

Otherwise, he could benefit of prices that
are no longer available.
2016-01-25 13:04:58 +01:00
Denis Ledoux bf78ad7bf7 [FIX] website_sale: loaded default pricelist
If a user signed in, the pricelist must be,
in this very specific order:
 - the pricelist of its saved cart
   except if the cart is no longer valid
   (pricelist no longer available or
    order no longer draft),
 - or, the user specific pricelist,
   in other words, the pricelist set by an employee
   for this specific customer, if any,
 - or, the public user pricelist, if it is available
   in the user geolocalization
 - or, the first pricelist available

In addition, if the user firstly browses the shop
without being signed in, and then signs it, the pricelist
loaded after the sign in must be the user specific pricelist,
if any, and not the default website pricelist (the public
user pricelist or the first pricelist available)

opw-666620
2016-01-25 13:04:58 +01:00
Denis Ledoux b8e9017f66 [FIX] website_sale: portal users special pricelists is always available
This revision reverts e5b9f02f7a

The argument `website_pl` must always be the default website
pricelist (the public user pricelist), as stated in this
method documentation:

```
:param int website_pl: The default pricelist used on this website
```

So the difference between the public user pricelist
and a specific user pricelist can be made.

A special pricelist set for a specific customer must
always be amongs the available pricelists.

opw-666620
2016-01-25 13:04:58 +01:00
Raphael Collet 6872aae8ef [FIX] tools: do not crash on wrong translations in view
During the construction a xml/html_translate content, in case of a wrongly
translated part (e.g. not correctly escaped char or bad xml tag), escape the
translation.

The verification is done during the rendering on the view which is not the most
optimal solution but has the advantage of working on system with some broken
translations and does not requires to reload the translations.

In master version, the verification could be done when loading the .po files.
2016-01-25 15:10:16 +05:30
Odoo Translation Bot 6a6827e85b [I18N] Update translation terms from Transifex 2016-01-24 00:33:22 +01:00
qdp-odoo 1db0d4bf9a [FIX] l10n_be: better tags on taxes in order to have an enhanced VAT report + migration script 2016-01-22 16:29:04 +01:00
Cedric Snauwaert 1c1e5b4529 [FIX] account_bank_statement_import: unique_import_id is not unique enough, so add the journal_id in it 2016-01-22 11:52:25 +01:00
fossoult 1d8004dd70 [FIX] hr: context may be immutable
Since v8, context can be an immutable frozendict and should not
generally be updated in-place.

closes #10589
2016-01-22 11:12:57 +01:00
Nicolas Martinelli 1806ea1859 [FIX] account: write-off currency and sign
The write-off currency should be the currency of the first
account.move.line, since it is what is assumed in the interface.

Moreover, the sign of amount_currency should match the constrain
_check_currency_amount.

opw-667137
2016-01-22 09:58:19 +01:00
qdp-odoo a2ff33faac [IMP] account: added some functions to help updating VAT reports in localization modules. [FIX] l10n_ch: better tags on taxes in order to have an enhanced VAT report 2016-01-21 17:35:16 +01:00
Nicolas Martinelli 564fda4d8f [FIX] account, account_asset, purchase: extra field in auto fill
The Purchase module provides a functionality to add pre-filled invoice
lines to an invoice. The issue is that extensions of the accounting
modules might add fields on an invoice line, and one would like to see
these fields populated as well.

This is the case for account_asset, which adds an asset_category_id on
an invoice line. However, the Purchase module is not aware of the fields
added by account_asset, and therefore it cannot populate them.

This fix adds a method, _auto_fill_extra, which is intended to manage
these extra fields.

opw-667162
2016-01-21 15:51:20 +01:00
Nicolas Martinelli be0ff1946d [IMP] purchase: add invoice line
Use method new() instead of caching the current values.
2016-01-21 15:51:20 +01:00
Goffin Simon dc02f773ce [FIX] mail: onchange_template_id
When using context action for a template, the report was not shown in
the compose message as an attachment.

opw:657152
2016-01-21 14:36:20 +01:00
qsm-odoo cda0b10401 [IMP] stock_landed_costs: Broken layout on stock.landed.cost form view
Note for forwardport: This is a minimal fix, but crappy.
Another one cleaner will be merged in master (~saas10)
2016-01-21 12:31:02 +01:00
Odoo Translation Bot 78a0a60b08 [I18N] Update translation terms from Transifex 2016-01-21 06:31:45 +01:00
Nicolas Martinelli 2d4257da1a [FIX] payment_authorize: send billing and shipping data
Authorize.net requires both billing and shipping data.

opw-660771
2016-01-20 15:48:31 +01:00
Martin Trigaux 917f4e73c1 [FIX] calendar: do not try to escape empty date
display_start may be False and crash
2016-01-20 19:42:47 +05:30
Martin Trigaux 889e556403 [FIX] calendar: missing terms in calendar view 2016-01-20 19:40:37 +05:30
Stefano Rigano 5d393ba067 [FIX] web: typo on less mixin declaration 2016-01-20 15:01:01 +01:00
Géry Debongnie 8af3841cb2 [FIX] mail: prevent mail to rejoin a channel that we just left
sometimes, the web client receives unsubscribe notification and an extra
notification on that channel.  This is then followed by an attempt to
rejoin the channel that we just left.  This commit prevents that
situation to occur.

For that, it needs to know the notifications received by the bus in one
batch, not one at a time.
2016-01-20 14:41:34 +01:00
Nicolas Lempereur b395ade078 [IMP] *: unnecessary safe filter for subject template
With 6dde919 email subject field are not autoescaped by default, thus
using safe is not necessary.

closes #10547
2016-01-20 14:14:38 +01:00
Nicolas Lempereur 6dde919bb9 [FIX] mail: don't autoescape mail subject
The mail template rendering system use "autoescape" for subject, body,
email_to, ...

Using autoescape is good for the body, but for the subject it means
variables insertions have to be marked as safe.

This commit add another environment without autoescaping enabled for the
subject field.

From https://tools.ietf.org/html/rfc2822:

  The "Subject:" and "Comments:" fields are unstructured fields as defined
  in section 2.2.1, and therefore may contain text or folding white space.

  2.2.1. Unstructured Header Field Bodies

  Some field bodies in this standard are defined simply as "unstructured"
  (which is specified below as any US-ASCII characters, except for CR and
  LF) with no further restrictions.

closes #10547

opw-659231
opw-666801
opw-665863
2016-01-20 14:13:56 +01:00
Nicolas Lempereur 4bfc2799bd [FIX] web: don't print nothing when something is there
In most backend views using CTRL+P to use browser printing would only
print an header without the content.

stumbled-uppon-when-checking: opw-659430 opw-660763
2016-01-20 13:48:37 +01:00
Christophe Matthieu 3de1b4a4ac [FIX] web_editor: reduce the min-size of the html preview
opw-660810
2016-01-20 13:23:24 +01:00
Christophe Matthieu f93e03c4c7 [FIX] web_editor: can indent table cell (with button and tab)
issue: the user select some line and keypress tab without indent, and the button indent doesn't work in table cell
2016-01-20 13:23:24 +01:00
Christophe Matthieu 6e47472486 [FIX] web_editor: firefox can have undefined value for style and broke inliner feature 2016-01-20 13:23:23 +01:00
Christophe Matthieu 2ef6e249d0 [FIX] web_editor: merge span when paste, only if no content between tags
opw-667263
2016-01-20 13:23:23 +01:00
Christophe Matthieu 86b80689d7 [FIX] web_editor: remove empty table ligne when paste content 2016-01-20 13:23:23 +01:00
Goffin Simon 366980e550 [FIX] account: _prepare_analytic_line
In function _compute_expense_totals, the debit and credit of an account
move is computed in the right currency rate according to the date.
Then in function _prepare_analytic_line, the amount of an analytic line
must also be computed in the right currency according to the date.

opw:666538
2016-01-20 12:58:32 +01:00
Martin Trigaux e381b7e31a [FIX] web: technical translations menu
The action "Technical Translations" was not retrieving the correct translations.
Since 9.0, the translations names no longer contains the name of the model (in
the form "field:<model>,<name>") but are records on ir.model.fields (in the form
"model:ir.model.fields,field_description:<model>_<name>").
The translations of type selection are style a different type (type 'selection').

Create a method that will find the linked fields and retrieve the correct
translations.

Fixes tw:reis_pt/status/687419541199187969
2016-01-20 16:42:18 +05:30
Martin Trigaux 8c8c02598d [FIX] web: untranslated term 2016-01-20 16:41:58 +05:30
Nicolas Lempereur 6b791c20b8 [FIX] web: don't print nothing when something is there
In most backend views using CTRL+P to use browser printing would only
print an header without the content.

stumbled-uppon-when-checking: opw-659430 opw-660763
2016-01-20 11:54:46 +01:00
Christophe Matthieu e5112ee00b [FIX] web_editor: use iframe only for html widget with style-inline mode 2016-01-20 00:15:10 +01:00
Géry Debongnie 44ac7903cc [FIX] mail: prevent crash when interacting with inactive partner
when a user is disaninactivated, it makes sense to disaninactivate his/her
corresponding res_partner.  This had the unfortunate effect of changing
the result of the channel_slot call for the direct messages with this
user.  As a result, the discuss interface was not happy.  This commit
does what it needs to keep the discuss interface happy.  That's what we
want, right?
2016-01-19 16:25:35 +01:00
Aaron Bohy 5b338b665e [FIX] im_livechat: external loader: server_url undefined
Since rev. 100d604, the web.session module is always loaded in external pages,
even if no operator is available. Thus, server_url should always be computed.
2016-01-19 15:20:38 +01:00
Aaron Bohy de9c2135a6 [FIX] im_livechat,mail: external lib: missing dependency
@navbar-height was used in chat_window.less since rev. 8397abd but wasn't
defined in the external_lib bundle (light bundle to embed im_livechat in
external pages).

This rev. also fixes some glitches of the chat window due to missing
font-awesome, and global rule 'box-sizing: border-box' on all elements.
2016-01-19 15:20:37 +01:00
Nicolas Martinelli 205037736f [FIX] web_kanban, *: missing translated term
The progress bar in the web kanban module uses the option 'title' in
order to display the title of the gauge. However, this option is not
taken into account when it comes to translation, because the translation
of such option is not accessible at the JS level.

The fix defines the title of the gauge as the parameter `title` of the
widget. Indeed, such a parameter is in the list of parameters translated
and made accessible in the JS layer (see variable TRANSLATED_ATTRS in
translate.py). With such a modification, the translation is accessible
on the node.

opw-666577
2016-01-19 15:10:23 +01:00
Nicolas Martinelli b01e24b6af [FIX] account: company currency in payment
The company currency should be the company currency of the invoice, not
the company currency of the account journal linked to the payment.

The following use case causes an issue:
- invoice in GBP
- journal of the invoice in AED
- journal of the payment in CHF

In this case, residual_company_signed will be considered to be in CHF
while it was recorded in AED.

opw-666595
2016-01-19 14:57:32 +01:00
qsm-odoo c81e2720b2 [FIX] web,calendar: m2m attendee tag color
The colors for attendee tags were not used and were reset for all tags
each time the color was changed for a single tag.
2016-01-19 14:37:51 +01:00
Martin Geubelle 667909ae4a [FIX] web_kanban: duplicated tags on load more
When clicking on 'load more', the kanban view only needs to add tags
for new records displayed by load more ; the existing records already
have their tags so one duplicates them.
2016-01-19 14:28:09 +01:00
Géry Debongnie e0ea7c04f9 [FIX] mail: fix issue with disappearing filters in some cases
The client action had a weird issue: going back from a breadcrumb to the
client action made the searchview (filters/favorites) buttons disappear.  This
is caused by a weird behavior of the control panel.  This fix is the safest
for now, but working on the control panel behavior would be a better long term
solution.
2016-01-19 14:23:01 +01:00
Christophe Matthieu ab9a0cb679 [FIX] website_links: don't show the label on the pie chart
The label is already display just before the pie and the label are display one over the other preventing visibility.
opw-666405
2016-01-19 14:18:13 +01:00