-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] SO confirmation mode in portal #22390
Conversation
@@ -190,15 +190,15 @@ def get_access_action(self, access_uid=None): | |||
|
|||
def get_mail_url(self): | |||
self.ensure_one() | |||
if self.state not in ['sale', 'done']: | |||
if self.template_id and self.state not in ['sale', 'done']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Why that change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the link: https://youtu.be/7b9ZfbyKf_M
PS: The view quotation button URL is changed always when we have "website_quote" module installed. But the functionality needs to be dependent on the availability of template_id field in SO. If template_id is not present, then use the global configuration to display "Accept Signature / Pay option".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can skip this option, as the functionality has been changed in latest odoo v11 with b7a064a.
auth_param = url_encode(self.partner_id.signup_get_auth_param()[self.partner_id.id]) | ||
return '/quote/%s/%s?' % (self.id, self.access_token) + auth_param | ||
return super(SaleOrder, self).get_mail_url() | ||
|
||
def get_portal_confirmation_action(self): | ||
""" Template override default behavior of pay / sign chosen in sales settings """ | ||
if self.template_id: | ||
return 'sign' if self.require_payment == 1 else 'pay' | ||
return 'pay' if self.require_payment == 1 else 'sign' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably legit ;)
Hello, I put some comments in the code (mainly I was wondering why the first diff) Also, the first issue you describe in the video is not a real one. Accept and Pay is there to emphasize that the payment is acceptance and will trigger a delivery |
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 odoo#22390
d77a370
to
9aab97d
Compare
Closing the PR as another PR is available for v11 #22800. |
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
Commit d2f9994 is already available in v11. So, closing this PR. |
Description of the issue/feature this PR addresses:
https://youtu.be/LvvxLBJ7ieA
Current behavior before PR:
The issue with link and text of the button (button to view Sales Order) in the Sales Order Email template.
Desired behavior after PR is merged:
Link and the text have to set correctly.
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr