Thibault Delavallée e7b40e783a [FIX] sale: clean unnecessary portal/access code
Override of ``get_access_action`` in sale_management is useless. Indeed
it redirects to the portal when

  * there is an order template;
  * user is share OR force_website is in context;

This override calls ``get_portal_url``. This method basically crafts link like
``access_url?access_token=TOKEN`` as no other argument is given to portal
url computation method.

Using the standard ``get_access_action`` gives the same result. When having
read rights on the record (which is implied for current code), portal override
already calls ``_get_share_url``. Moreover portal version effectively checks
requested access_uid has read access while current override uses current user
which may lead to strange results depending on call chain.

Removing this kind of override simplifies management of notification emails
and buttons, especially that "Pay Now" template is about to be cleaned.

This notably partially reverts odoo/odoo@b49da62365 and some other commits. Those
are anyway linked to mails sent when sale did not have its portal available
directly from sale as portal was a side module. Website quote was adding its
own portal-related logic (accept and pay). All this is now standard in sale
and it makes sense to use standard ``get_access_action`` code when possible.

Task-2712450 (Mail/Sale: Improve 'Pay Now' notification template)

Part-of: odoo/odoo#82627
2022-01-14 16:37:46 +00:00
…
2015-09-08 17:58:38 +02:00
2021-11-04 10:21:58 +00:00
2021-10-07 17:59:53 +00:00
2022-01-14 15:44:52 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%