Have the main company (A) with the public user
Have an invoice in company B
Make a brand new browser access the invoice with the token
Before this commit: the token link ended up asking the customer to login,
eventhough it wouldn't if the invoice were in company A
After this commit: the whole payment with access token flow works as expected.
OPW 1879999
closes#26744
Otherwise access token is not correctly propagated notably in payment
form. This means customers paying invoices through the customer portal
without being logged are not correctly redirected once payment is done
as the access token used to display invoices is lost.
* keep query on pdf link so that customers have access to the pdf when
using the access token instead of having an access rights error;
* add redirect to record override that allow to take into account
/mail/view links containing an access token for invoices like what
is already supported for sale orders;
* improve action buttons display;
* reduce headers and better display invoice name and customer address;
Purpose is to allow to display error, warning or success messages based
on some user action like payment. This is done using kwargs in the invoice
view route. Codes are added in URL and message display has to be managed
in the template itself. Inheriting modules and/or new features will have
to add their specific message according to the error, warning or success
messages they want to support.
* get invoice access right check in its own method. Purpose is to allow
its use in other methods and avoid writing same code several times;
* factorize invoice customer view values computation. Purpose is to allow
adding values when displaying the page through inheritance. For example
to add available payment means in sale_payment;
This commit adds a page view for invoices on the customer portal. Layout
is based on the invoice report to closely match what is already done in
Odoo. It replaces the old controller that returned only the pdf.
Customers should now be able to receive both.
Future commits will improve invoice page view notably in account_payment
while adding payment options in account customer portal.
Purpose is to allow customers to access their invoice without having an
user account created. Using an access token they will be able to see
their invoice on the customer portal, like what is already done for
quotations for example.
Invoices now inherit from portal.mixin. This means they have a share url
and a method that generates correctly the /mail/view url using the
access token and signup parameters. This url is used in the email template
used to send email in the invoicing flow.
As already done for sale, customer portal for account is moved to account
module directly. Account now depends on portal module and website module
is not necessary anymore to display the account customer portal.