Commit Graph
201 Commits
Author SHA1 Message Date
Xavier BOL (xbo) aeac9052b8 [FIX] portal: get all options when we reload the chatter
Before this commit, we use the defaultOptions and the options passed in
parameter of the `_setOptions` method, but we could have any unupdated
options in the `this.options`.

This commit creates a new object with the defaultOptions and the options
containing in `this.options` before update this object with `options`
given in parameter to have the new `this.options`.

task-2633229

closes #77156

X-original-commit: 5d1a36bdd530d4037d4f29dc607907d79d18dcc6
2021-11-05 17:14:42 +01:00
David Beguin 29db699e9b [IMP] auth_top, *: revamp Two-factor authentication flow
Purpose
=======

Review the UX of the 2-factor authentication flow in order to make it more clear
and easy to use.

Specifications
==============

This commit applies multiple rewording of instructions, button, etc. Tests have
been adapted accordingly.

It also adds an 'invite to use two-factor authentication' flow that will
send an email to the selected used to redirect them their account security
settings.
- If portal is not installed yet, the user is redirected to his account security
settings in backend.
- If portal is installed, the user is redirected to /my/profile if them are
portal user. Otherwise, the redirection is still done at backend side.

As the backend view of auth_totp wizard is used at frontend side, copyclipboard
widget has to be rebuilt at frontend side (click event, style etc..).

As API key section is now displayed only on debug mode, test urls have been
adapted accordingly.

Task-2487630

Part-of: odoo/odoo#71142
2021-08-30 21:05:12 +00:00
Xavier BOL (xbo) d3ecc4962e [IMP] project: update chatter when create/change task
Before this commit, when the user changes the task, the chatter is not
updated so we keep the messages of the previous task. Same thing when
the portal user wants to create a new task.

This commit updates the chatter to allow to fetch the messages when the
user changes the task and also disables the chatter when the user is
creating a new task.

task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
Xavier BOL (xbo) 0c7b99987a [IMP] project,portal: allow portal user not follow task to use chatter
Before this commit, if the portal user is a follower of the project he
can use the chatter of new tasks in the project sharing feature since
the follower of the project is automatically the follower of new tasks.
But if he is not a follower of the task (for instance, old task in the
project) then we have to check if the
access token is the one of the shared project to give the access to
the chatter.

This commit checks the `access_token` of the project when we are in the
project sharing form view to allow the portal user to use the chatter.

task-2379518

closes #73341

Co-authored: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-26 14:59:33 +02:00
Xavier Morel 129049f730 [IMP] portal: de-traw-ify chatter
Replace t-raw by t-out when outputting the chatter message.

Mark message body as safe during preprocessing: messages from the
portal chatter are automatically escaped when
posted (`/mail/chatter_post` assumes the message body is plaintext,
and escapes it before formatting it based on newlines, maybe one day
it'll accept markdown) while messages from the backend chatter are
"HTML-light" and should be sanitized.
2021-07-20 05:41:36 +00:00
Cedric Prieels (cpr) e8c586b6d4 [FIX] portal: fix portal searchbar
Small fix which removes an error when the user tries to search for an element using the enter key.
task-2508883
Related PR: https://github.com/odoo/odoo/pull/70305

closes odoo/odoo#71753

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-15 09:03:57 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Younn Olivier 77a35e86dd [FIX] portal: fix image display in a text block snippet
The container size of a text block snippet (and every snippet without
rows) was not correct when an image was displayed with right or left
alignment.

The css property clear was added at the end of the containers so that
floating elements from the section do not float over the next section.

task-2469516

closes odoo/odoo#71438

X-original-commit: fb556ed09c7ed00afbed33b6029b1315a113575a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-28 16:31:02 +00:00
Younn Olivier c72bc01b36 [FIX] portal: fix copyright color on the portal
Before this commit, for default colors, the text-muted class color was
set as !important from the portal and could not be overriden by the
website, leading to inconsistent display between the website and the
portal for the copyright.

As a fix for stable, we do not change the text-muted color from the
portal when using default colors.

task-2468472

closes odoo/odoo#71300

X-original-commit: d2e934631d4de02a7933434a1252dab994fed4b7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-05-26 17:54:55 +00:00
Benjamin Vray 3e03bd9a39 [IMP] website_sale, *: redesign the product page for e-commerce
*: portal, portal_rating, product, sale, sale_product_configurator,
website, website_sale_comparison, website_sale_product_configurator,
website_sale_stock, website_sale_wishlist, point_of_sale

Redesign of the product page + various UX improvements.

task-2009483
Part of #66736
2021-04-01 14:56:36 +00:00
nie ad59eff40a [FIX] portal: Due in %d days is not translated
Steps:
- Install Invoicing and load French
- Go to Invoicing
- Click an invoice due in the future
- Click Preview
- Switch the preview to French by modifying the URL like this: example.com/my/invoices/6 -> example.com/fr_FR/my/invoices/6

Bug:
"Due in %d days" is still displayed in English. The rest of the page is in French.

Explanation:
This is due to two things:
1. `mail` and `portal` are both installed and we cannot have more than one `code` translation of a source [1]. Since `mail` is loaded before, alphabetically, `portal` doesn't add the duplicated translations with its own module name. When loading a web page, only the modules returned by `_get_translation_frontend_modules_domain()` are sent to the frontend. `mail` is not one of them and the duplicated translations are not sent. Since sending all the `mail` translations is overkill, this commit is modifying the format string. This won't change the text outcome, but will make the new sources unique and make the backend send these translations to the frontend.
2. Translations in `portal_sidebar.js` are queried before the translation DB [2] is made. This results in an empty array and `_t()` returns the source. `session.is_bound` will wait until the app is fully loaded before querying.

[1] https://github.com/odoo/odoo/blob/ad2d96db8ad3e1fd7af2edda218fc34c0c1d259a/odoo/addons/base/models/ir_translation.py#L290
[2] https://github.com/odoo/odoo/blob/0de069b8ca9fb005ba5b076984f5677de25889ee/addons/web/static/src/js/core/translation.js#L51

opw:2421501

closes odoo/odoo#64263

X-original-commit: 118d79192cf0fc923a121745c78e6dd0da563df0
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-01-08 12:51:34 +00:00
75b4e2dd38 [IMP] portal, website_slides: send message without reloading page
1) in this commit, improved portal chatter for messaging. when the user sends a
message, the new message is updated in history without reloading page.
instead of submitting a form which reloads page to send message we added rpc call
to send message.
2) rating on courses is implemented by extending portal chatter, applied changes in
website_slides to do reviews without reloading page
3) refactoring: cleaned or removed code
eg. removed form and some input fields as data is not submitted as form anymore,
introduced some methods to avoid duplication of code

task-2054662
Closes https://github.com/odoo/odoo/pull/47746

closes odoo/odoo#47746

Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
Co-authored-by: ktr-odoo <ktr@odoo.com>
Co-authored-by: Siddarth Gajjar <sga@odoo.com>
2020-11-30 11:22:13 +00:00
Benoit Socias af017d9557 [FIX] portal: detect attachment selection even when same as previous
Before this commit selecting the same attachment was not detected, which
was a problem when the attachment had been mistakenly removed

After this commit when the same attachment is selected several times in
a row it still triggers the upload and gets attached

https://github.com/odoo/odoo/issues/42364

closes odoo/odoo#62278

X-original-commit: e9b1bca1d48afff8313d106266b02793cf77ab79
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-24 18:47:44 +00:00
Bonis Modi a2b4609224 [FIX] portal: Fix broken repeated icon on portal attachment
Currently, when attachment small icon was displayed on portal it
is broken and repeated on background more than once like: task
attachment icon.

So in this commit do not repeat the icon when icon is small on portal
attachment.

closes odoo/odoo#61907

Taskid: 2337684
X-original-commit: 24304608d2eee0ca136ac024b18e19d0d8d0e12f
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-17 20:56:30 +00:00
Benjamin Vray 8ca7aa5d3c [FIX] website, portal: fix language selector inline
This commit align vertically the copyright text and the inline
language switcher items. This commit also add a padding on
list-inline-item in the language selector. Because before this commit,
there was no space between lines if the list was to be displayed on
multiple lines.

Part of #59581

task-2312878

closes odoo/odoo#60527

X-original-commit: a8c4ca8a942d94557db5b95f42344fee71faf6e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-22 13:06:15 +00:00
Olivier Dony 3f3c7b507a [IMP] base, totp: simplify form layout and improve responsiveness
Some of the TOTP-related forms contained an attempt at making a centered
modal pop-up, using a bootstrap `card` that would also serve to
emphasize that the interaction was sensitive and security-related.
Some of the "footer buttons" were moved inside the form to make it
more obvious that they were part of the interaction flow.

However some of this caused breakages of responsiveness and did not yield
a really satisfactory result anyway.

This commit switches back to using regular non-centered forms. It looks
quite ugly because the content is better suited for a narrow modal, but
it means less surprises in terms of layout and less responsiveness
issues.

closes odoo/odoo#58541

closes odoo/odoo#58544

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-09-26 09:45:17 +00:00
qsm-odoo 9f048625e1 [IMP] website, *: move page scrollbar to #wrapwrap
*: web, web_editor, portal, account, website_blog, website_forum

This is probably not ideal to move the scrolling behavior out of the
html element but this will be needed for the editor to not have a double
scrollbar on the right. This is actually also useful for the scrollbar
to appear under the purple odoo menu instead of its right.

This commit, if to be reverted in the future, however contains many
improvements to make the transition easier that should be kept: jQuery
and Odoo functions to be able to scrollTo a specific element, get the
top scrollable element, check if an element is scrollable, etc. Also,
some magic was done: if some code tries to scroll to a specific scroll
position via jQuery's scrollTop or animate functions on the html/body
element, those will still work as intended (obviously, using the new
utils to do that is however recommended).

This commit also reviews our scroll behaviors to make them more robust
and share the code.

Part of https://github.com/odoo/odoo/pull/57975
task-2344227

X-original-commit: 4e7be69825163c0a0ff41c882a196fc7f3158fb3
2020-09-22 10:09:36 +00:00
qsm-odoo c9cb4a65fc [IMP] portal, website_blog: lint some files before fixing them
Part of https://github.com/odoo/odoo/pull/57975
task-2344227

X-original-commit: 392456d686370937700a1f42f879ab6fe5ef4e68
2020-09-22 10:09:34 +00:00
Xavier Morel 5d25d0e927 [FIX] portal: don't eagerly load security template
There's absolutely no need to load it on every page of the website. It
probably doesn't even need to be cached on the JS side given it's used
in all of 3 actions of the portal user's security page.

Reported by jke.

Also remove leftover console.log call while at it.

closes odoo/odoo#57636

X-original-commit: 00c1c9a7258cf53f1a40938e3a928151b188de64
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-14 11:33:55 +00:00
Cocographiqueandqsm-odoo c8577568a1 [IMP] portal, website, *: review navbar user dropdown
*: website_sale

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: c93bd93014685dd532d2244aece6bfeec9562b7a
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:36 +00:00
stefanorigano (SRI)andqsm-odoo a65407b9c3 [IMP] website, *: add off-canvas and other hamburger menu options
*: web, portal

Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 89bf0d4170f42b40cd46915c7d0160c4818f3b8f
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-28 08:19:35 +00:00
Jeremy Kersten 73b4e9b1b6 [IMP] portal,*: /my counter async
Before this commit, the time to compute all counters was making the rendering
of the portal page slow.

Now the count is done in rpc after the loading of the page.

Now you can decide which part you want to show on the portal, and only compute
for these one.

It is not because you have purchase installed for your internal process, that
it means that your supplier use your portal and it avoid the computation for
all end users.

We parallelize the counters in arbitrary 3 rpcs.

closes odoo/odoo#55999

Related: odoo/enterprise#12456
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-17 15:59:03 +00:00
Xavier Morel ee1b67d607 [IMP] portal: /my/security page
* allows portal users to update their password
* and manage their API keys
* any anything technical / security related we may need to add in the
  future

Also bridge module for the password meter (auth password policy).
2020-08-14 23:06:11 +00:00
704bcc5527 [IMP] portal, *: move language switcher to portal
*: base, http_routing, website

Make the language switcher available on portal without website
installed.

Part of https://github.com/odoo/odoo/pull/55300
task-2203383

Co-authored-by: Jeremy Kersten <jke@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-14 17:40:58 +00:00
Pierre Collinet (pic) 5aa7839d0b [FIX] project: only internal users in "Assigned To" field of task form
Values filled in "Assigned To" m2o were differing:
- if I "CREATE" task with "group by" then m2o is filled with
internal-users + portal-users
- if I "CREATE: task without group by then it filled with internal
users only.

In Project also same case.

To have a more coherent behaviour, we decided to put only internal
users in both cases.

Task ID #2229592
Community PR #54776

closes odoo/odoo#55820

X-original-commit: 8269c1958843002246c589cdd593417dec44f024
Related: odoo/enterprise#12376
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-12 14:19:10 +00:00
Nicolas Lempereur 3922182c97 [FIX] portal: hide public user avatar in chatter
On a chatter portal, when the user is using access token to display
record and is not connected, the message will be posted as the record
partner_id.

But then the preview of avatar in the composer is wrong: you see a
broken image (because you don't have access to "public user" partner
avatar) and when you post it anyway you see the avatar of the record
partner and not public user.

In this commit, if we are seeing the record with token and are logged
out as public user, we will not show the avatar in composer.

(note: before 13.0, the "public user" partner avatar was working)

opw-2276498
closes #54720

closes odoo/odoo#54782

X-original-commit: 97473f6a25336e8994730e7722cffb6fd0dbc6d7
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-07-22 13:51:34 +00:00
qsm-odoo 4b826abcfb [IMP] web_editor, portal: review img/fa display rules mixup
Part of https://github.com/odoo/odoo/pull/53930
task-2157252
2020-07-14 14:43:15 +00:00
Julien Mougenot c4786fccfd [IMP] *: update notifications to optional title
closes odoo/odoo#52826

Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-12 09:01:50 +00:00
Dhruv Patel 3288304f59 [IMP] web,*: make notification title optional
*odoo_referral,portal

Currently, it is not possible to have one line notification,
when you are not passing the title parameter as an option when
generating the notification,then it will display the blank div
with the default button icon only. so it is not possible to have
one-line notifications since the title is mandatory.

So the purpose of the task is to make the title optional, allowing
for more minimalistic notification.

Also removed some unnecessary titles from the notification and
some stying change.

This commit also increase the autoclose delay of non sticky
notifications, from 2.5s to 4s.

task : 2264749

closes odoo/odoo#52229

Related: odoo/enterprise#10981
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Dhruv Patel <dhp@odoo.com>
2020-06-10 08:36:05 +00:00
stefanorigano (SRI) 55ff1ee697 [IMP] portal: review menu's divider design
Set the divider color to match the text color. Decrease the
opacity to half the link one (normally 50%). Adjust horizontal margin,
resize the divider height to match the text.

Part of https://github.com/odoo/odoo/pull/52223
task-2197038

closes odoo/odoo#52223

Related: odoo/design-themes#289
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-02 12:17:23 +00:00
Ravi Singh c96edead36 [IMP] project: improve responsiveness of description.
In this commit- we have improved responsiveness of description when it's too long
in projects and tasks inside the portal.

task-2124829
Closes #48402

Related: odoo/enterprise#9497
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-16 06:21:51 +00:00
Benjamin Vrayandqsm-odoo 3defe35a0e [IMP] website, *: add and review header visibility options
*: portal

Adding a choice of several header behaviors (fixed, fade out with
scroll, etc.). Review the way those animations works in mobile/desktop
and now perform them without duplicating the header DOM element.

Also allow to hide of adapt the size of the logo when the page is
scrolled.

Part of https://github.com/odoo/odoo/pull/38950
task-2087641

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-03-31 18:16:08 +00:00
Jeremy Kersten 764f6f081f [FIX] portal: remove extra margin in layout chatter
Reduce margin from o_portal_chatter_message_title (from 0.5 to 0.2rem)
Remove margin from the last line of the comment.

When you write a comment (not from demo data), each line become a paragraph
(which one have big bottom margin). After the comment you have a button
'comment' that is so far, that you don't know if you comment the previous
message, or the next one.

The css selector is precise, because you can have another p in the reply with
the class 'o_portal_chatter_puslished_date' that we don't want to impact.
(In case of none real comment with p inside, it become the last one)

Only the padding under the last p could be considered (fp & sbu) as bugged,
so we fixes it in css. Other pixel touch, required an update to got it.

task-2206171

closes odoo/odoo#46456

X-original-commit: 92ae84c132f3fb2dcf5364fd0e0e58edb04e894d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-27 13:57:11 +00:00
jerome hanke (jhk) c107e983ca [FIX] portal: rtl is active even without website
Steps to reproduce:
- install sales
- install a language with rtl support
- set the installed language as preffered language for current user
- preview any sale order/quotation on the portal

Previous behavior:
the portal is not showed right to left

Current behavior:
rtl is working a intended

opw-2167151

closes odoo/odoo#43737

X-original-commit: 2855ac7a5b859e76bde39da2f584aed3ff7ec163
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-22 11:47:37 +00:00
David Beguin 860768b79b [IMP] portal, web: move wrapwrap flex style rules from portal to web
This commit moves the flex rules of #wrapwrap div to web so it can be used in
survey.

This is needed to make the survey footer stick to the bottom of the screen
even if main has not enough content to fill the page.

This commit prepares survey redesign.

Task ID: '2150291'
PR #43237
2020-01-17 14:54:58 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Thibault Delavallée 9e0677882d [MOV] website_rating: move to portal_rating
PURPOSE

Clean posting process and improve mail.message definition and comprehension.
Move as much possible content from website_* modules to portal_* modules
to ease their use in customer portal

SPECIFICATIONS

Now that publish feature is replaced by internal directly in mail and portal
rating portal inclusion can be done safely in a portal_ratign module instead
of website_rating. It allows to remove the dependency and give the rating
feature of customer chatter directly in portal applications.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:45 +00:00
Thibault Delavallée 5649fc88e8 [REF] {website_}mail: move and replace published field of mail.message to is_internal
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFICATIONS

Website mail defines a website_published field allowing to publish / unpublish
comments on the frontend of some modules. This field has several drawbacks :

  * it is used only for front-end people (portal, public) and has no real
    effect in chatter / classic discussions;
  * it is used only in some advanced front-end module and is not available
    in portal by default;
  * its naming is not really correct as it is not linked to fields coming
    from the website_published mixin and its behavior is not really
    the same;
  * its use is a bit duplicated with internal flag coming from subtype
    allowing to hide messages related to an internal subtype;
  * there are overrides of standard mail.message methods just to handle
    this flag;

In this commit we change that field by an is_internal flag directly on
mail.message model itself. It tells if share people (customers, share users)
are allowed to read the message. This field can be given through posting
API or set manually using widgets. It is also used in access rights custom
methods and managed like the internal flag of subtypes.

Mailgateway was already using an internal flag for internal note replies. It
is renamed to is_internal and propagated as it is now a standard field. It
also eases code understanding.

Portal is updated to allow managing the flag directly. It means customer portal
now natively allows to moderate customer comments without any need of website
modules.

Rating is updated accordingly. An is_internal field is added, replacing the
related on website published.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
jvm-odoo 382d6d9a78 [FIX] portal: fix address over icon
Reproduce this bug

    - Log in as portal user

    The top right address detail is over the icon.

Cause

    The others fields are using a `span` who have a style who push them
    right.

This commits add the `span` style for the div.

Fine-tuning of 9e302765

OPW-2092345

closes odoo/odoo#40225

X-original-commit: af0fd50b14f32032f0870812dd615ac988183174
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-13 17:16:19 +00:00
sri-odoo 48b4459a5b [REF] portal: change website default bg color
Part of https://github.com/odoo/odoo/pull/35749
task-2024197
2019-10-01 16:39:05 +00:00
Arnaud Joset 5713d891f5 [IMP] Portal : UI
Align Accept & sign button to the right

task-2052537
2019-10-01 15:24:28 +00:00
Sébastien Theys b6288e5446 [IMP] *: remove image_64 and clean views
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...

64px is close enough to 128px that it can be removed without a big impact on
download size.

It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.

The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.

If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.

Views
=====

- remove width and height attributes when existing CSS rules are overriding them
  (eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
  of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
  image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules

task-2060865

closes odoo/odoo#36147

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-19 10:23:39 +00:00
Thibault Delavallée a08845d2a3 [IMP] website_{rating, slides}: allow to manage attachments when updating reviews
PURPOSE

Allow to manage attachments when updating a frontend review.

SPECIFICATIONS

Currently when posting a review in eLearning or eCommerce one can attach
files to its review thanks for portal composer. Rating popup composer allow
to update its comment and rating. However this edit mode has two limitations.
It does not display attachments previously added and does not allow to add
attachments.

This commit fixes that by

  * giving attachment values to the composer, allowing its display by the
    composer display at startup;
  * allowing to give new attachments and properly handle them in slides
    route;

Uploaded and validated attachments cannot be removed by users. Indeed
message with attachments has probably already be sent to people and removing
attachments would lead to information loss.

LINKS

Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)
2019-09-04 11:41:59 +00:00
Thibault Delavallée c076930863 [FIX] portal: allow portal discuss attachment css to be applied on popup composer
PURPOSE

Allow to manage attachments when updating a frontend review.

SPECIFICATIONS

Popup composer used notably in website_rating (eLearning, eCommerce) is not
instantiated inside a frontend chatter. It does not get all available CSS rules
as those are all set inside o_portal_chatter.

In this commit we move some CSS rules to allow using them in composer or chatter
independently of how they are instantiated.

LINKS

Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)
2019-09-04 11:41:47 +00:00
Thibault Delavallée bb197b1f87 [MOV] portal: split portal chatter from composer
PURPOSE

Allow to manage attachments when updating a frontend review.

SPECIFICATIONS

As those widgets grow it is better to have them in separate files in order to
better understand code organization. Future commits will improve composer
behavior, notably in attachments management.

LINKS

Task 2066600 (manage attachments)
Task 2058595 (eLearning v13 testing)
2019-09-04 11:41:47 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Christophe Simonis b792ba7d9a [MERGE] forward port branch saas-12.3 up to 752b2553c6 2019-08-08 11:52:13 +02:00
Christophe Simonis 7d04dc1c7c [MERGE] forward port branch saas-12.2 up to 9e74730a26 2019-08-06 18:48:24 +02:00
Christophe Simonis 0fadd586fa [MERGE] forward port branch 12.0 up to ff9ddfdacc 2019-08-06 15:57:57 +02:00