When you customize a canonical transaction using a t method, you cannot change the label of the transaction in a straightforward way.
For example, in this schema, if you have a Foo entity f1, then the label for the transaction method f1.t.custom_update is "Custom Update". However, the label for the transaction returned by that transaction method will just be "Update":
class Foo(E.Entity):
name = f.unicode()
age = f.integer()
def t_custom_update(self):
tx = self.t.update()
tx.f.name.readonly = True
return tx
By implementing a relabel function (available globally in a database schema, and defined in the schevo.label module) we can relabel the transaction before we return it:
class Foo(E.Entity):
name = f.unicode()
age = f.integer()
def t_custom_update(self):
tx = self.t.update()
tx.f.name.readonly = True
relabel(tx, 'Custom Update')
return tx