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

[16.0][IMP] subscription_oca: Various improvements #1058

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

tarteo
Copy link
Member

@tarteo tarteo commented Mar 14, 2024

Fixes improvements mentioned here: #1057

[IMP] subscription_oca: Various improvements
@tarteo
Copy link
Member Author

tarteo commented Mar 14, 2024

Not sure why the codecov/patch check is failing because codecov says there's a positive change (+0.03%)

image

@tarteo tarteo changed the title [IMP] subscription_oca: Various improvements [16.0][IMP] subscription_oca: Various improvements Mar 15, 2024
def action_open_subscription(self):
self.ensure_one()
action = self.env.ref("subscription_oca.sale_subscription_action")
action = action.read()[0]
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

Please use action = self.env["ir.actions.act_window"]._for_xml_id("subscription_oca.sale_subscription_action") instead.

def close_subscription(self, close_reason_id=False):
self.ensure_one()
self.recurring_next_date = False
closed_stage = self.env["sale.subscription.stage"].search(
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

I don't really like selection with a limit=1. Is there a mean to restrict stage selection in a better way ?

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.

None yet

2 participants