Commit 3b230280 authored by Luca Cristaldi's avatar Luca Cristaldi

Use searcher/getter rec_name for the member model

parent 39bb7bb0
......@@ -29,11 +29,6 @@ class Member(Workflow, ModelSQL, ModelView):
__name__ = "association.member"
_rec_name = 'party_name'
party_name = fields.Function(fields.Char("Party Name"),
state = fields.Selection(STATES, 'State', readonly=True)
code = fields.Char('Code', required=True, select=True,
states={'readonly': Eval('code_readonly', True)},
......@@ -103,11 +98,6 @@ class Member(Workflow, ModelSQL, ModelView):
@fields.depends('party', '')
def on_change_with_party_name(self, name=None):
def get_code_readonly(self, name):
return True
......@@ -121,8 +111,11 @@ class Member(Workflow, ModelSQL, ModelView):
if sequence:
return Sequence.get_id(
def get_rec_name(self, name):
def search_party_member(cls, name, clause):
def search_rec_name(cls, name, clause):
return [('party', ) + tuple(clause[1:])]
......@@ -185,7 +178,7 @@ class Member(Workflow, ModelSQL, ModelView):
if not all(x.paid for x in pending_fees):
raise MemberUnpaidFeeError(
member=", ".join([x.party_name for x in members])))
member=", ".join([x.rec_name for x in members])))
for member in members:
if not member.leave_date:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment