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
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
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 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Propose a better solution

Copy link
Member Author

Choose a reason for hiding this comment

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

Nevermind, don't bother, this will never be merged anyways...

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 28, 2024
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 1, 2024
@max3903 max3903 added this to the 16.0 milestone Sep 23, 2024
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