Commit Graph
11 Commits
Author SHA1 Message Date
Lucas Perais (lpe) bd4b50f75a [FIX] account*, sale*, website_event, portal: public user not necessarily in right company
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
2018-09-18 11:02:58 +02:00
Olivier Dony 7836b8811b [FIX] sale*: properly mark method as @classmethod
When inheriting a @classmethod, the override needs to have the
@classmethod decorator as well, otherwise calls will fail with a
TypeError
2018-03-02 18:27:18 +01:00
celm1990 c3e3770f06 [FIX] account: state cancelled not exist on invoice
The domain was using a wrong 'cancelled' state
Bonus: avoid code redundency

Closes #22121
2018-01-12 15:47:39 +01:00
Thibault Delavallée 1a6fd2f957 [FIX] account: add access_token propagation in portal
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.
2017-10-26 12:54:18 +02:00
Thibault Delavallée e6120eb7d6 [IMP] account: improve invoice page view on customer portal
* 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;
2017-09-06 10:49:03 +02:00
Thibault Delavallée 1fad5698fc [IMP] account: support error, warning and success codes in customer portal
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.
2017-09-06 10:49:03 +02:00
Thibault Delavallée 4b746b3b9b [REF] account: factorize portal code to ease future additions
* 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;
2017-09-04 11:15:49 +02:00
Thibault Delavallée 6c7e128b33 [IMP] account: add invoice page view on customer portal
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.
2017-08-25 15:33:18 +02:00
Thibault Delavallée 6f39672eb6 [IMP] account: inherit from portal.mixin and add access_token account.invoice
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.
2017-08-25 15:33:17 +02:00
Thibault Delavallée 0fad594dc1 [IMP] http_routing, account, sale: remove pager from request
Use the pager through import directly.
2017-08-09 17:46:22 +02:00
Thibault Delavallée 3836aac471 [MOV] account_*: move account customer portal to account
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.
2017-08-08 15:36:32 +02:00