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] website_sale: no automatic invoice when the full amount is discounted #162354
base: master
Are you sure you want to change the base?
Conversation
1dc1c57
to
d609610
Compare
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.
Thanks for your work 💯
About your solution we still need to explore more about auto invoice
flow 😮💨 : before finalizing solution
@@ -1768,6 +1768,7 @@ def shop_payment_validate(self, sale_order_id=None, **post): | |||
order = request.env['sale.order'].sudo().browse(sale_order_id) | |||
assert order.id == request.session.get('sale_last_order_id') | |||
|
|||
|
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.
Unnecessary change
auto_invoice = str2bool( | ||
request.env['ir.config_parameter'].sudo().get_param('sale.automatic_invoice') | ||
) | ||
if auto_invoice: |
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.
I am not sure but this feels wrong 😕
I think what you need to do is change something in actual auto_invoice
flow and take this into account but as you try to do it was creating payment entry and here we don't want to create payment entries 😐
Still need to dive in deeper 🦀
…ounted Prior to this commit: - When the "Automatic Invoice" setting was enabled and the total amount of the cart was zero due to a discount, no invoice was automatically created in the backend. This required manual intervention to create an invoice and confirm the sale order. Post this commit: - When the "Automatic Invoice" setting is activated and the total amount of the cart is zero thanks to a discount, the invoice is automatically created in the backend without the need for manual operation. Task: 3786812
d609610
to
978b0f4
Compare
Prior to this commit:
Post this commit:
Task: 3786812
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr