Skip to content

Commit

Permalink
post() is deprecated since v14: https://github.com/odoo/odoo/blob/14.…
Browse files Browse the repository at this point in the history
…0/addons/account/models/account_move.py#L2681

So we rarely get the state updated on the membership line. Especially on creditnotes
  • Loading branch information
hhgabelgaard committed Oct 17, 2024
1 parent d92845d commit 9af0217
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions membership_extension/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def button_cancel(self):
lines.write({"date_cancel": False})
return res

def post(self):
def action_post(self):
"""Handle validated refunds for cancelling membership lines"""
res = super().post()
res = super().action_post()
self.filtered(lambda m: (m.move_type == "out_invoice")).mapped(
"invoice_line_ids.membership_lines"
).write({"state": "invoiced"})
Expand Down

0 comments on commit 9af0217

Please sign in to comment.