Commit Graph
1884 Commits
Author SHA1 Message Date
Rémy Voet (ryv) 28fc83a509 [REM] core: deprecate method refresh()
The method refresh() is a duplicate of method invalidate_cache() and is
deprecated since version 8.0, but without any warning.  Add this warning
to be able to completely remove it in the next major version.

Part-of: odoo/odoo#79563
2021-12-24 14:56:56 +00:00
Martin Trigaux d99cfd9416 [I18N] *: export saas-15.1 source terms
closes odoo/odoo#80964

X-original-commit: 0663892a34896980008eb0de69aeb58019a67e89
Related: odoo/enterprise#22759
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-07 13:48:53 +00:00
Leonardo Pavan Rocha 6739514087 [IMP] portal: adds access_token to pager urls in portal
Within portal, subscriptions/sales orders presented in list view have their URL
containing the access_token as a GET param. However, when clicking on a
subscription and using the pager to navigate between records, the access_token
is not present in the URL. In order to keep consistency between the links and
views, this PR adds the access_token as a GET param in the pager as well.

task-2512070

closes odoo/odoo#76673

Related: odoo/upgrade#2752
Related: odoo/enterprise#20357
Signed-off-by: Arnaud Joset <arj@odoo.com>
2021-12-06 16:02:01 +00:00
Hubert Van de Walle (huvw) 4a1a912c88 [FIX] portal: duplicated project invitations
Steps to follow

  - Share a project task
  -> The invitation message is duplicated

Cause of the issue

  `partners` can be empty
  -> `not partners` is then falsy

Solution

  Check the default parameter with `is None`

opw-2698724

closes odoo/odoo#80476

X-original-commit: 9514e76e21fe346ea3aee0458ad170b24f09d67e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2021-11-26 17:25:47 +00:00
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
William Braeckman 5818629df1 [IMP] portal: support multi record reports
Adds multi record support to `_show_report`.
Limited to records within the same company to stay as close as possible
to the default behaviour.

Closes: odoo/odoo#75269

See: odoo/enterprise#20334

Task ID: 2611006
2021-10-28 15:27:35 +00:00
Fabio Barbero 2d65d022d9 [IMP] website_slides: change confirmation messages for email
Purpose
=======
Clean up messages related to email verification.

Specification
=============
Rephrase messages, add confirmation of email sent and let user change
email.
Do not show "Validation Email sent" if the current user changed their
email address.

PR: https://github.com/odoo/odoo/pull/77617
Task-2647065

closes odoo/odoo#77617

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-12 11:44:40 +00:00
Martin Trigaux e132c36ee6 [I18N] *: export 15.0 source terms
closes odoo/odoo#77898

X-original-commit: ad5afb1d18661784bfcf51bca66e576de1f6c49b
Related: odoo/enterprise#21478
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-10-05 16:54:21 +00:00
Nicolas Bayet 4813f42997 [IMP] mail,*: replace jinja with qweb
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment

By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).

There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).

We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.

To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.

This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
  (for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
  in order to see only one at once
- a floating select input to switch visibility of a particular logical
  branching

Task-27033

X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
2021-09-28 23:42:54 +00:00
Jairo Llopis 3524b3c0db [FIX] portal: preserve newlines from share note
Before this patch, if you wrote newlines or more than a single whitespace character while sharing any document, in the note, those'd get collapsed in the final email.

@Tecnativa TT31901

closes odoo/odoo#76624

X-original-commit: 6914371e95afff565fa6880f3ff9cf410b357750
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Jairo Llopis <jairo.llopis@tecnativa.com>
2021-09-16 07:18:27 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Julien Banken fbaf666f6f [IMP] portal,auth_signup: improve the invitation portal email
This commit will improve the wording and the layout of the invitation
email sent to the users getting access to the portal. The signup link of
the email will now be a button that emphasizes the call-to-action.
We will also provide in the email another link that will allow the user
to access the login page. This commit will also improve the wording of a
placeholder in the portal backend.

task-2573334

closes odoo/odoo#74210

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-07 11:34:56 +00:00
Priyanka KakadiyaandXavier BOL ebf163c6a4 [IMP] hr_timesheet, portal, {sale_}project: few improvements for portal
PURPOSE

Generic UX improvements for the portal

SPECIFICATIONS

For projects list view,

- clicking on the project should open the list view of tasks with groupby stage
- the number of tasks should not be clickable

For tasks list view,

- display the fa-star of the priority field on the left of the name of the task
- add the following fields on the right of the name:
  user_id, time spent, kanban_state
- for the kanban_state,
  only display the colored dot and indicate the name of the state on hover
- for the time spent:
  indicate the nb of hours recorded / nb of planned hours(or days(as per unit))
  (if the nb of planned hours = 0, only display the nb of hours recorded)

For tasks search view,

- add a group by priority and status and reorder accordingly
- add a quick search on status and priority and reorder accordingly
- add a sort by priority, assigned to and status and reorder accordingly

For task form view,

- display the fa-star icon of the priority field on the left of the name of task
- add the kanban state in the top right corner

the kanban_state field should be editable by portal users
increase nb of items displayed in the list view to 80 items per page(generic)

Task-2613330

closes odoo/odoo#74996

Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
2021-09-03 15:45:24 +00:00
Oussama MESSAOUDIandqsm-odoo 7e8ba9bc2f [IMP] website, *: review the header templates + add CTA as an option
*: portal, website_sale, website_sale_wishlist

Part of https://github.com/odoo/odoo/pull/68149
task-2368576

Part-of: odoo/odoo#68149
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-09-03 14:29:51 +00:00
std-odoo cc012a0864 [IMP] mail, various: add email templates management levels
Purpose
=======

Purpose of this commit is to add a new group for the mail template designer.
Goal is to make roles clearer: managers edit templates, users use them. This
commit allow some designers / managers to make email template and to let
others users use those email templates.

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

When this feature is enabled in the Settings page, a new group is required to
modify email templates in a composer like wizard or to make dynamic content.
This allows to separate managers editing / composing templates from standard
users that use them.

If the current does not have this group, the email body will be in readonly
mode if he selected an email template. That way we force him to use the email
template that the manager made.

Technical
=========

New Group
---------

Only users in this group will be able to create / write email template or
to write Jinja code in the mail composer (including other fields like subject
in mailing).

By default, all internal users have this group. Mass mailing users also have
this group as writing mailings is about the same management level as writing
templates.

Mail Composer Mixin
-------------------

In comment mode, the template is rendered and then saved on the body field
so non-"Mail Template Editor" users can load email templates.

But in mass mode, the body of the template is saved and then rendered and
many things change the body (HTML sanitizer, web editor move inline CSS
properties, add / remove spaces...). So in this case, we can not know if
the user changed the body or not. That is why we put the body field in
readonly mode so, it is not modified by the web editor.

Jinja code detection
--------------------

To detect dynamic Jinja content, we compile the template, and we browse the
AST. If we do not have a single "Template Data" node, we assume that the
template is dynamic.

When we detect the template as static, we do not render it. That way we
avoid unnecessary rendering.

Code cleaning
-------------

Move Jinja import into tools so that it is outside of mail framework code.

Task-2187263

closes odoo/odoo#75840

Related: odoo/enterprise#20547
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-09-02 03:42:54 +00: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) a28cc6333a [REV] project: select access rights in project sharing
This reverts commit fc7778f8c512202dc3361d6b87be8c28b299c3c8 because of
a change in the spec.
The access mode are removed and replaced by this access mode for portal
user:
- read: the user goes to the classic portal view
- edit: the user is added as collaborator of the shared project and can
access to project sharing views.

To do this, the portal share is inherited by the project share wizard.
This new wizard can be open to share in readonly and open to share in
edit mode via 2 buttons in the form view of the shared project.
A new stat button is added to form view of project to see the
collaborators of this project. That is, the ones can access to the
project sharing views. The project manager will can remove or also add
new collaborators via the views in this stat button.

task-2379518

closes #73341
2021-08-26 16:57:23 +02: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
Thibault Delavallée cb67c23888 [MOV] mail: reorder controllers and views
As mail grows and will continue to grow, ordering views and having right
files is important to understand module organization and content.

Split main.py controller file into two files, one for mail related controllers
(redirections) and one for discuss.

Rename files according to guidelines for wizards and views.

No functional change comes with this commit. This is only code move.

Task-2631873
PR odoo/odoo#75571
2021-08-25 13:12:11 +00:00
Thibault Delavallée 131239f7c4 [FIX] portal: manually subscribe when inviting
We should avoid autofollow as all recipeints are added as follower. When using
templates this could lead to a lot of unwanted subscription especially in batch
operation like share wizard.

Better subscribe those new people manually.

Task-2612911
PR odoo/odoo#60792

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-27 13:35:21 +00:00
Florent de Labarre a87c89d4ab [FIX] various: respect mail_post_autofollow previous values when adding it
Purpose of this commit is to avoid forcing mail_post_autofollow to True when
it is set to False. It eases inheritance and custom behavior.

Task-2612911
PR odoo/odoo#60792
2021-07-27 13:34:22 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00: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
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Jeremy Kersten 478068c829 [IMP] *: always use Odoo Response
This branch adds request.redirect on all requests.
In case of a front end request, we do an url_for to the location.

We removed redirect_with_hash that was only for retro compatibility

local_redirect has been renamed to redirect_query, and param keep_hash has been
removed and moved.

Default code for redirect is 303 now instead of 302.

Now redirect and redirect_query make local redirect by default, you need to
pass local=False to make external redirect.

All werkeug.utils.redirect has been replaced by request.redirect.

Http.redirect now use an http.Response type, and it become easy to add an
override like 'set_cookies' e.g.

Dispatch of a website.page return an http.response too, so we first need to
check if it is a cached version before to check if it is an Odoo Response.

Migrate your code:

http.redirect -> request.redirect(location, code, local)
http.local_redirect -> request.redirect_query(location, query, code, local)
http.redirect_with_hash -> request.redirect

Courtesy of odony for help and review ;)

closes odoo/odoo#72599

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-08 07:00:06 +00:00
wan 16595e8af2 [FIX] portal: use company_id for portal report generation
The company is needed in the context to get the paper format for
instance because of `get_paperformat`

X-original-commit: a1526eb4e5b1eb7cada603d7fcee7bb77c64bbac
2021-06-22 14:20:54 +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
dht-odoo 57261b100f [IMP] base, mail, portal: improves is_html_empty method
Before this commit there were few cases in which
is_html_empty method was not working as our expectation.
In cases such as "<p class=""><br/></p>", "<p id=""><br/></p>"
and many other cases.

In this commit we improves regex of is_html_empty method.
Mow from this commit all kind of attributes will be consider
in this method.

In this commit we also have added is_html_empty in mail template, portal
values and in report values also for rendering templates.

Task id: 2499504

X-original-commit: fd0a05f2955b9f7e9ae7233afebfd6240c9244dd
2021-06-07 05:21:40 +00:00
Xavier-Do 4c4a740e0a [IMP] web, base: add option to profile dispatch
The profiling tools can be useful to profile a test of some execution
point but this is not convenient to identify a problem on a running
instance.

With this commit, an option available in the debug menu allows to add a
flag on the user sessions to enable profiling of all requests. Each
request will be saved in a different 'ir.profile' entry, but will be
grouped under the same session.

The profiling can be activated on all sessions, even for a public user,
but only if profiling is enabled on the database globally.

This commits also adds a speedscope view to visualize saved results in
the web client.

closes odoo/odoo#66590

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-06-02 11:46:28 +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
Mohammed Shekha ccc56e28a3 [IMP] *: replace fa-spinner with fa-circle-o-notch
Slightly improve the overall UI of Odoo with a more modern feel by updating the
current 'loading' icons that look quite old school.

Use fa-circle-o-notch instead of old style fa-spinner

task-2346142

closes odoo/odoo#59454

Related: odoo/enterprise#13908
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-05-21 11:48:32 +00:00
Martin Trigaux 41d8b8cf68 [I18N] *: export saas-14.3 source terms
closes odoo/odoo#70673

X-original-commit: bcb9ff784e44462384b0a43a0a23eed7a1111bc5
Related: odoo/enterprise#18269
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-11 12:28:28 +00:00
std-odoo ade7b359d8 [FIX] portal: fix ACL issue during the revocation of the portal group
Bug
===
1. Login as Demo user (no admin access right)
2. Grant the portal access to a partner
3. Revoke the access

An access error is raised.

Task 2501250

closes odoo/odoo#70554

X-original-commit: bc7f8733561992e3b240f34c0cbd17a0cb76d3cd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 15:30:50 +00:00
Simon Genin (ges) ecfe85db84 [REF] web: static/src/(img|fonts) => static/(img|fonts) 2021-04-29 07:34:40 +00:00
Xavier Morel c7002c7be7 [FIX] portal: de-t-raw-ify
As part of that, also mark one of the searchbar_inputs label as markup-safe.
2021-04-29 05:34:21 +00:00
Xavier Morel 7d1dcd1ec1 [FIX] portal: de-traw-ify 2021-04-29 05:34:20 +00:00
Xavier Morel 32fca57fcb [FIX] *: page['num'] is just an integer, no idea why it'd use t-raw 2021-04-29 05:34:20 +00:00
Xavier Morel 996cb85c27 [FIX] *: mass replace known t-raws by t-out
* QWeb bodies should be markup-safe so `0` should always be
  markup-safe.
* `head` is qweb-rendered so the same.
* The `json` pseudo-module in qweb templates is `json.scriptsafe`,
  which should be markup-safe.
2021-04-29 05:34:20 +00:00
Thibault Delavallée 8f56f1ead0 [FW][FIX] sale: correctly redirect customers in "Pay Now" template
Mail holds a "Pay Now" notification template holding notably customized
links to portal for records like sale orders or invoices. It allow to
give a more personalized button than a plain simple "View document" link.

Currently frontend / backend links are not always correctly computed in this
template. This commit fixes that behavior.

Task ID-2513724
COM PR #69607
ENT PR odoo/enterprise#17849

closes odoo/odoo#69714

closes odoo/odoo#69744

closes odoo/odoo#69774

X-original-commit: c417ea6243cb968d17f5db0919ec8cd034f4cb5f
Related: odoo/enterprise#17889
Related: odoo/enterprise#17902
Related: odoo/enterprise#17916
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-23 15:24:58 +00:00
Thibault Delavallée effebe148f [FW][FIX] mail, various: fix document access link computation
Purpose of this commit is to fix computation of access link. In some cases
msg_vals modification leads to invalid URL computation, notably for frontend
or backend differentiation for target recipients.

Followup of odoo/odoo#63292 .

Task ID-2513724
COM PR odoo/odoo#69607
ENT PR odoo/enterprise#17849

X-original-commit: e618597876692f2d24f8e9308c747b8d1f2d8905
2021-04-23 15:24:58 +00:00
Nicolas Seinlet 229e6cfb1a [FIX] portal: ensure only one "grant access" action
In a migrated db without this fix, you have twice "Grant portal access"
in partner form view, one will fill the partner in the wizard, the other
will launch the wizard without any pre-selected partner.

closes odoo/odoo#69586

X-original-commit: 6c321814dac1f17fa9a1f3f1b6d59c6d45a8cc0d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-21 08:49:46 +00:00
Nasreddin (bon) e8f6256141 [FIX] portal: display discounts on quotation pdf for portal user
Issue

	- Install "Sale" app
	- Acivate "Discounts" feature in settings
	- Create a quotation to a portal user (ex: Joel Willis)
	- Add a product with a discount then send
	- Logout then login as 'Joel Willis'
	- Go to 'My account' then 'Quotations'
	- Select the quotation just created and print it

	Discount not display in pdf file.

Cause

	The current env.user when rendering pdf is the portal user.
	To display discount, current env.user must have group
	'product.group_discount_per_so_line' who is not the case
	even when using sudo() on report template.

Solution

	Since Odoo 13.0, the sudo() function does not return the
	superuser by default but instead the current user
	with a bypass on access rights.
	Therefore, must add `.with_user(SUPERUSER_ID)` on report.

opw-2501337

closes odoo/odoo#69272

X-original-commit: 5dde19c92ecee8ac0238bb5c8e71263840534c28
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-04-14 16:51:12 +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
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Simon Genin (ges)andJulien Mougenot 216b530002 [REF] website: remove priority for assets frontend in portal
This commit removes a needless priority attribute on a portal template.

This has been done to improve consistency in asset bundles declarations
by reducing them to the simplest possible templates.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:17 +02:00
nie 6a020d7e3c [FIX] portal: translate email to partner's language
Steps:
- Install Projects
- Go to Settings / Translations / Languages
- Install Dutch
- Go to Settings / Users & Companies / Users
- Edit demo:
  - Language: Dutch
- Go to Projects
- Click the three dots on the first project in the dashboard
- Click Share
- Select demo as recipient
- Send
- Go to Settings / Technical / Email / Emails
- Click the email you just sent

Bug:
The email is not translated in the partner's language

Explanation:
The context of the template didn't take the current partner's language
into account since it was out of the partners loop.
The subject of the email wasn't aware of the partner's language as the
context hadn't been changed.

Wrapping the translations with the right `lang` context value fixes the
issue.

Also, the subject used the formatted string as the translation source.
This makes it impossible to find a matching translation since the source
is different every time.

opw:2475398

closes odoo/odoo#68162

X-original-commit: e446233a1b454ab1aa883609fd0b8a588fec9f00
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-03-19 17:40:13 +00:00