Hi,
I wonder if it’d be possible to order the function tax_identifier in the party.party tree view.
I’ve tried the code below, following other examples written in the Tryton codebase but it’d seem it’s incorrect so if someone could explain to me whats wrong and/or if it’s even possible to do such ordering I’d appreciate it.
Thanks in advance.
@classmethod
def order_tax_identifier(cls, tables):
pool = Pool()
PartyIdentifier = pool.get('party.identifier')
table, _ = tables[None]
if 'party_identifier' not in tables:
party_identifier = PartyIdentifier.__table__()
tables['party_identifier'] = {
None: (party_identifier, table.id == party_identifier.party),
}
return PartyIdentifier.code.convert_order(
'code', tables['party_identifier'], PartyIdentifier)