Skip to content

Commit

Permalink
Merge PR #129 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by huguesdk
  • Loading branch information
OCA-git-bot committed May 6, 2024
2 parents d2c1a9f + cd9bc3a commit 8a08bde
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cooperator/models/subscription_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: AGPL-3.0-or-later

import warnings
from datetime import date

from odoo import _, api, fields, models
Expand Down Expand Up @@ -476,6 +477,15 @@ def _compute_subscription_amount(self):

_order = "id desc"

# todo: remove this at the next major version update.
def get_person_info(self, partner):
warnings.warn(
"subscription.request.get_person_info() is deprecated. "
"please use .set_person_info() instead.",
DeprecationWarning,
)
return self.set_person_info(partner)

def set_person_info(self, partner):
self.firstname = partner.firstname
self.name = partner.name
Expand Down

0 comments on commit 8a08bde

Please sign in to comment.