Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

SodexisTeam
Copy link
Contributor

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

@@ -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']:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Why that change ?

Copy link
Contributor

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".

Copy link
Contributor

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'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably legit ;)

@kebeclibre
Copy link
Contributor

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

kebeclibre added a commit to odoo-dev/odoo that referenced this pull request Feb 5, 2018
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
@SodexisTeam
Copy link
Contributor Author

Closing the PR as another PR is available for v11 #22800.

@SodexisTeam SodexisTeam closed this Feb 8, 2018
@SodexisTeam SodexisTeam deleted the 11.0-so-confirmation-mode branch February 8, 2018 05:35
@SodexisTeam SodexisTeam restored the 11.0-so-confirmation-mode branch February 8, 2018 05:37
@SodexisTeam SodexisTeam reopened this Feb 8, 2018
kebeclibre added a commit that referenced this pull request Feb 8, 2018
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
@SodexisTeam
Copy link
Contributor Author

Commit d2f9994 is already available in v11. So, closing this PR.

@SodexisTeam SodexisTeam deleted the 11.0-so-confirmation-mode branch February 16, 2018 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants