Commit a0f8ee92c3 solved the use case where
a quotation was created through the website shop and where the default quote's
template's require payment should be transmitted to the quote.
However, this commit made the field readonly
This present commit solves both problems by assigning a default to the problematic field
rather than computing it
OPW 817510
When having a default template for quotation
Doing a sale order through the website
Before this commit:
The field require_payment on the SO was not matching the one on the template
This leads to confusion at config time when on the backend something is set on the template as default
while not matching what actually happens
After this commit:
The field require_payment on the SO is computed from the template
OPW 807946
Create a quotation in sign confirmation mode.
Send it by email
Follow the link
Go the quote's user's portal
Go to the quotes menu, and enter the right SO
Before this commit, although the confrmation mode of a SO
was rightly computed, it was badly retrieved and displayed.
The button on the email was 'accept and pay'
On the portal, the form view of the SO displayed 'pay now'
After this commit, in both cases it displays 'accept and sign' or the like
OPW 806554
related to #22390
-> Move a button into its wizard and not in the void
-> In the sale order, set the default value for require_payment related to sale_portal_confirmation_options.
- When paying with stripe an error occurs because of a callback generating the invoice for the SO which is called now automatically by the payment system
This is a hotfix/hack for a conflict between website_quote and
website_sale, on the field website_description.
The conflict happens when both modules are installed.
Fixes#20118
Steps to reproduce the bug:
Let's consider a product A with a price of 100
Let's consider a pricelist P with a visible discount of 50% on product A.
Let's consider a quotation template Q with one line with the product A with 50%
of discount.
Let's create a SO with pricelist P and set the quotation template Q on it.
Bug:
The unit price of A on SO is 50 instead of 100 and the visible discount is 50%
instead of 75%.
With the fix:
The unit price is 100 and the discount is 75%
opw:771996
The 'View', 'Accept and Sign', 'Pay Online' buttons are now correctly
computed based on the sales settings or the online quote settings.
Indeed it is now possible to sign and/or pay quotations without having
website_quote module installed.
We also:
- reorder a bit the form view for quote templates
- change the way default templates are selected for sales order
(inactive quote templates are not selected) while keeping
customizability through ir.values
Mail now can handles a generic access_token in /mail/view route. Mail does
not do anything with it. Addons can override the controller and add their
specific management of this token according to some specific business
logic.
Sale order emails now contains the access token to grant access from the
notification email url without logging in. Sale portal now allow customers
to log in using an access token without having to use Online Quote. If
the user doesn't have an account yet and signup is allowed (B2C) an extra
parameter is added to the url to link the correct partner to the user upon
signup. If the user already has an account an extra parameter is added to
auto-fill the user's login if he wants to login from that session.
Account is also updated to prepare accepting access tokens. However the
complete implementation of accounting customer portal will be done in
another task coming soon.
In order to be able to identify what action to return based on the
access_user.
Typically portal users will need to be redirected to the front-end,
while internal users will need to be redirected to the back-end.
PURPOSE
=======
In the payment options there are 3 radio buttons given , but as per the normal behavior of radio, there must be one selected by default.
Access token field is moved directly in sale module. Indeed future commits
will improve customer portal and access tokens will be used in other module
than website_quote. This commit already moves the field.
Moreover some strange code in website_sale already uses access_token even
if it does not exist in that module. Moving the field solves that issue.
Finally so_token defined in stripe is renamed to access_token to have the
same naming through all addons.