Commit Graph
26 Commits
Author SHA1 Message Date
Christophe Simonis aa6ebd146a [MERGE] forward port of branch saas-9 up to 549daaa 2016-04-05 19:27:34 +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
Aaron Bohy a1821d470a [REF] im_livechat: remove dummy match_rules() function
introduced in 9 at d2574b7018.
2016-02-12 12:04:01 +01:00
Aaron Bohy d2574b7018 [FIX] im_livechat: match_rules: backward-compatibility
Add a dummy 'match_rules()' function for backward-compatibility of commit
d8605b79, as 'match_rules()' was called from  server-side 'im_livechat.loader'
template.
2016-02-10 09:42:42 +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 54396cfa41 [FIX] im_livechat,mail: don't automatically detach chat channels
This reverts commit a8239cd as the navbar dropdown recently introduced now
offers a quick access to channels without coming back in the Discuss App.

Moreover, this commit emphasizes the notifications navbar icon when there are
unread messages (or at least, it mutes it when there isn't).
2016-01-14 11:22:26 +01:00
Christophe Simonis 100d604cb0 [FIX] im_livechat: correct loader js code 2016-01-07 18:16:20 +01:00
Aaron Bohy 97a61f9e76 [FIX] bus,im_livechat: away status after 30 minutes of inactivity
Also, away users aren't considered as available for the livechat anymore.
2015-12-29 09:41:18 +01:00
Aaron Bohy 1d371e94f6 [FIX] im_livechat: channel info: available key
should be the length of the recordset of connected users, not the recordset
itself, which is always evaluated as True (thus, the im_livechat script was
always embedded in the html pages).
2015-12-29 09:41:18 +01:00
Aaron Bohy d8605b7993 [FIX] im_livechat: matching rule in cache
The problem was that the matching rule was evaluated before sending the html
page, and the script was inserted in the page according to the matching rule
(it wasn't inserted if the rule was 'hide_button'). However, the matching rule
wasn't re-evaluated if the page was already in the cache. The page content thus
might depend on a matching rule computed for someone else in that case.

Rather than inserting the script according to the matching rule, we insert it
only if there is an operator available. We then ask for the matching rule in
the livechat widget, by RPC, and we reject its willStart deferred if the rule
says so. We also re-check for operator availability in the same RPC.
2015-12-24 12:59:46 +01:00
Aaron Bohy c58c8f4bd2 [FIX] im_livechat: use correct url to find rules that apply
The problem was that, when calling 'match_rules()' from the loader template,
we compared the wrong url with the url regexp defined in rules. Indeed, we used
the url of the page we were leaving, not the one we were going to.

We thus need to know if we are coming from the controller, or from the loader
template directly as the way to get the correct url differs.

Courtesy of JEM
2015-12-16 15:48:43 +01:00
Aaron Bohy 1029571c35 [FIX] im_livechat: various fixes
- Don't display livechat button if no operator available
- Livechat windows persistence through website pages
- Auto popup feature re-introduced (inadvertently removed at rev. f23f57cc)
- Operators that are 'away' are available, as 'away' means that the focus isn't
  on the Odoo tab for at least 10 minutes, but the user is still connected.
- Avoid duplicated messages when the visitor is a connected user
- Unfold livechat window on first 'close' click as the event is intercepted to
  ask the user feedback before actually closing the window
2015-12-15 10:01:20 +01:00
Aaron Bohy 5fdfd38b7e [FIX] im_livechat: don't remove empty sessions created recently
The 'cron_remove_empty_session' is performed every day and removes livechat
channels that contain no message.

The problem was that the cron might have been executed between the moment a
public user clicked on the livechat button, creating a new empty channel, and
the moment this user sent the first message through that channel. If that
happenned, the message was sent in an unexisting channel, and obviously never
received by the operator.

This fix makes sure that removed empty channels haven't been created or
modified within the last hour.
2015-12-03 11:21:47 +01:00
Fabien Pinckaers 5b60e05ce4 [IMP] im_livechat: rating on a week
Percentage of happy customers should be computed over the last week.
2015-12-02 11:33:59 +01:00
Aaron Bohy a8239cd2ae [FIX] im_livechat,mail: detach chat on the receiver side
This commit concerns DM and livechat channels. Those channels are now
automatically detached on the receiver side. This allows users to directly
reply to DM's or livechats without coming back to the client action.

Note that they aren't detached if the user previously manually closed the
channel's chat window.
2015-11-20 15:48:03 +01:00
Aaron Bohy 4ce2d6f7c3 [FIX] im_livechat: MailChannel inheritance
Commit 2bb55ec adds argument extra_info to the signature of channel_info() in
mail addon. However, this method is inherited from the im_livechat addon, and
its signature hadn't been adapted, causing tracebacks when im_livechat was
installed and channel_info() was called with an extra_info.
2015-11-17 10:06:18 +01:00
Olivier Dony 6aa27e644f [FIX] im_livechat: match_rule() expects an ID, not a record 2015-10-29 08:58:11 +01:00
Jérome Maes 19452f2109 [FIX] mail : email_send should be False for chat and livechat channel
Chat and livechat channel should not send emails. The field is however editable, so it was added to the form view of mail.channel
2015-10-01 12:41:00 +02:00
Raphael Collet 5a6e136172 [IMP] addons: adapt binary fields to store images in attachments 2015-09-28 15:19:47 +02:00
Jérome Maes 132e96accb [IMP] im_livechat : refactoring + improving performance by removing rpc call 2015-09-01 20:58:11 +02:00
Jérome Maes 95b97d1010 [REF] im_livechat : refactoring, make it compatbile with the nw mail module, change reporting sql view (split them in 2), adapt view, ... 2015-09-01 20:16:09 +02:00
Jérome Maes 1d54858cbd [MOV] im_livechat : restructure the module according to the new mail module 2015-09-01 20:16:09 +02:00
bpa-odoo 36af1abba7 [FIX] im_livechat : use env.context and not env._context. Typo, typo, typo ... 2015-06-11 12:08:10 +02:00
Christophe Simonis fe2b5f35a4 [MERGE] forward port of branch saas-6 up to bf1e999 2015-05-28 14:27:38 +02:00
Jérome Maes a80219e292 [MIG] bus, im_chat, im_livechat, website_livechat : migration to new API.
Migrate the models and controller to new API. Renaming xml id according to convention, renaming openerp tag into odoo tag. Add comment strings and documentations.
2015-04-28 17:04:16 +02:00
Jérome Maes 7096fee53c [MIG] im_chat, im_livechat : re structure the modules files.
Create models/ and controllers/ directories, and split the Python and XML files to fit coding guidelines, and prepare migration.
2015-04-28 17:04:16 +02:00