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

[ADD] sepa_sale_order_autoconfirm #345

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

victor-champonnois
Copy link
Member

@victor-champonnois victor-champonnois commented Jan 9, 2025

@victor-champonnois victor-champonnois force-pushed the 16.0-sepa_sale_order_autoconfirm branch from f32fadf to 88667a7 Compare January 9, 2025 16:09
@remytms
Copy link
Member

remytms commented Mar 5, 2025

@victor-champonnois Please, rebase here on 16.0 branch to clean tests. :)

"license": "AGPL-3",
"depends": [
"payment_sepa_dd",
],
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
],
"website_sale",
],

Copy link
Member

Choose a reason for hiding this comment

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

i think that this module should be named website_sale_order_sepa_autoconfirm.

Comment on lines +9 to +11
website_sale = self.team_id == self.env.ref(
"sales_team.salesteam_website_sales"
)
Copy link
Member

Choose a reason for hiding this comment

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

is this to detect whether this is done through the e-commerce? this seems a little dirty to me. isn’t there a cleaner way? like checking whether self.website_id is truthy?

class SaleOrder(models.Model):
_inherit = "sale.order"

def action_quotation_sent(self):
Copy link
Member

Choose a reason for hiding this comment

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

this method needs a comment. when is this called and why is it this method that is overridden?

)
if website_sale and sepa_product:
self.action_confirm()
return self
Copy link
Member

Choose a reason for hiding this comment

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

the parent method doesn’t return anything, so this one shouldn’t either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants