-
-
Notifications
You must be signed in to change notification settings - Fork 523
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
base: 16.0
Are you sure you want to change the base?
Conversation
[IMP] subscription_oca: Various improvements
8473c8f
to
3851561
Compare
def action_open_subscription(self): | ||
self.ensure_one() | ||
action = self.env.ref("subscription_oca.sale_subscription_action") | ||
action = action.read()[0] |
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.
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( |
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 don't really like selection with a limit=1. Is there a mean to restrict stage selection in a better way ?
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.
Propose a better solution
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.
Nevermind, don't bother, this will never be merged anyways...
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. |
Fixes improvements mentioned here: #1057