Commit Graph
36 Commits
Author SHA1 Message Date
Christophe Matthieu 9cd982bcc8 [FIX] qweb: use cdn for asset files
Refactoring of qweb to call _post_processing_att for each nodes. This
change remove the crappy ovewrite in website module. The website overwrite
only the _post_processing_att to add the cdn parameters.

The static node (without t- attributes) can stay static (remove overwrite
of _is_static_node), the cdn is applied at the compile time for this
nodes instead of at the running time like the dynamic node.
2018-06-15 08:42:15 +02:00
Lucas Perais (lpe) cf5142e059 [FIX] im_livechat: make /history command work for public user
Have the public user (not logged in -- user B) having a live chat with any logged in user (user A)
Having in mind that:
- (A) issues /history in his chatter to see where (B) has gone on the website
- The bus sends a kind of a "pull cookie request" on each clients
- The browser of (B) retrieves the cookie info and calls the relevant route
- That route sends the transient message for (A)

Before this commit:
The command did not work because the user of the route we end up on is the public one
hence, the search for the channel would not yield anything

After this commit:
The command does work as expected

OPW 1818732
closes #23485
2018-03-07 09:12:47 +01:00
Christophe Simonis bd08d4f052 [MERGE] forward port branch saas-16 up to 3ac2a1106c 2017-09-11 14:02:19 +02:00
Christophe Simonis 3ac2a1106c [MERGE] forward port branch saas-15 up to ec15765eec 2017-09-11 13:30:03 +02:00
Christophe Simonis ec15765eec [MERGE] forward port branch saas-14 up to 48f88992da 2017-09-11 12:35:49 +02:00
Nicolas Martinelli 6879409723 [FIX] im_livechat: unsupported locale
- Set the browser to language 'Spanish (Latin America)' ('es-419')
- As a public user, open a livechat session.

The session doesn't open.

The root cause is the creation of a mail channel which contains
translatable fields (e.g. name). This attempts to create translations
in the 'es_419' language. However, this locale doesn't exist in Odoo,
and it triggers the constraint 'lang_fkey_res_lang'.

In this specific case, there is no real reason to translate the channel
name. Therefore, we simply avoid it thanks to a context key.

opw-766489
2017-09-07 15:54:26 +02:00
Rohan Patel cc6fc799a6 [IMP] im_livechat: set the 'rater' partner
If user is logged (example: portal user), set the
partner_id on rating.
2017-07-10 08:49:22 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Sagar Ahirrao bb03449bc8 [IMP] im_livechat: visitor history command
this commit introduces the '/history' command
for an operator during a livechat session.

When the visitor load a page, its url is added in
a cookie (kept only 1 day) in order to track his
visited web pages.
The '/history' command will ask the cookie content
and send it to the operator as a transient message
in the livechat channel.
2017-01-30 13:45:03 +01:00
Rohan Patel 7b7995e301 [IMP] im_livechat: give res_model_id instead of res_model submit rating 2017-01-24 09:02:10 +01:00
Jérome Maes 567ae3137f [IMP] rating,livechat: better use of rating mixin
- use rating.mixin field instead of rating_ids to
display rating on form view
- clean controller method
- ...
2017-01-09 16:19:26 +01:00
Jérome Maes 8cac9d664c [FIX] im_livechat: stop using unsecure controller
Loading history can contains sensitive informations.
You can load the history of a public conversation if
you have its uuid.

This commit stops using unsecure controller when a
secure one for this case exists !
2016-11-16 16:12:52 +01:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
Fabien Pinckaers 9bf9eb863b [FIX] rating: correct list view (list --> tree)
[FIX] livechat_rating: ratings from livechat should be consumed
(otherwise invisible)
[IMP] usability: better views and tooltips
2016-07-15 15:13:17 +02:00
Christophe Matthieu 70a69bf9bc [FIX] website/im_livechat: use new api to get asset
Issue: can't get asset content, self don't have env attribute, wrong attributes send.
2016-07-05 18:44:58 +02:00
Christophe Matthieu f1e3ac88f8 [FIX] ir_qweb/website: must adapt AssetsBundle call to nex new syntax
AssetsBundle receive the files list instead of to load the xml content itself (speed up because the file list is cached).
2016-07-05 11:31:03 +02:00
Denis Ledoux ddd3e08fbc [FIX] im_livecat: HttpRequest.render returns a Response
This revision is related to 100d604cb0

The above revision aimed to add the correct `content-type` headers,
the according route returning Javascript and not simple html.

HttpRequest.render` returns a Response,
and `make_response` doesn't expect a Response as first argument.

In other words, this is not possible to make Reponse from a Response.

`HttpRequest.render` accepts kwargs, including `headers`.

opw-666898
2016-01-15 16:37:30 +01:00
Christophe Simonis 100d604cb0 [FIX] im_livechat: correct loader js code 2016-01-07 18:16:20 +01:00
Aaron Bohy 21e2e85790 [FIX] bus,im_livechat: correctly detect livechat availability 2015-12-28 12:48:46 +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
Jérome Maes a4b17c2621 [FIX] im_livechat : assets controller, mock_attachment includes id now.
I miss commit c3c2281a4d, so the search on attachment url is useless now.

Also check if the return content is not None, avoiding to decode base64 a None object.
2015-10-06 09:43:02 +02:00
Jérome Maes 8e63088dbc [FIX] im_livechat : web.session defined twice
On website page, in debug mode, error 'web.session already defined' appears in the console. This was due to the fact the namespace web.session was redefined a second time to bind the session on the server_url param for the livechat to work. On website page, this is already done by the native web.session (session_instance.js). Define a session in the bundle is required when livechat is intergrated on external page, so fetching the bundle is done through /im_livechat/loader/, and generating a web.session can be conditional.
2015-10-01 12:41:35 +02:00
Jérome Maes a9148a9f2e [FIX] im_livechat : assets controller was broken
The commit 6327cda0a7 introduce mock_attachment object, replacing ir.attachment. This new object doesn't not have id attribute : accessing it crashes. livechat controller needs to search on the mock url to generate the status, headers and content of the response via binary_content() method.
2015-10-01 12:41:08 +02:00
Jérome Maes a58e00bcdb [FIX] im_livechat : anonymous_name should be the user name in case of portal user 2015-09-14 10:16:13 +02:00
Nicolas Lempereur 1c4049463d [WIP] im_livechat: typo in controller arguments 2015-09-08 11:50:03 +02:00
Christophe Matthieu 522fcacb21 [IMP] base: assets now directly use /web/content url 2015-09-03 19:31:00 +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 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
Jérome Maes f8be7105e3 [FIX] im_livechat : starting a conversation can be done by an identified user (ie: a portal user).
The bus channel will still be public (using the uuid), but access to the message history and session information should be with the authenticated user and not the anonymous one. There is no anonymous name, and the request.session is used to identify the user.
2015-04-15 17:04:53 +02:00
Jérome Maes e36ffa8a55 [FIX] im_livechat : fix rule matching according to the country code found with GeoIP 2015-03-23 14:49:06 +01:00
Jérome Maes a82b139496 [IMP] livechat : when rating conversation, click on smiley save the rating value. Only display texterea when clicking on red smiley. 2015-02-04 15:24:48 +01:00
Jérome Maes ade60d54bb [IMP] im_livechat : make the feedback for livechat a standart feature using the rating mixin. Create a dependancy to rating. 2015-01-08 12:28:22 +01:00