Advertisement
Guest User

Untitled

a guest
Nov 29th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. tryton.cfg:
  2.  
  3.     [tryton]
  4.     version=3.9.0
  5.     depends:
  6.         ir
  7.         res
  8.     extras_depend:
  9.         party
  10.  
  11. party.py:
  12.  
  13.     class Party:
  14.         __metaclass__ = PoolMeta
  15.         __name__ = 'party.party'
  16.  
  17.         website = fields.Function(
  18.             fields.Char('Website'), 'get_mechanism', setter='set_mechanism')
  19.  
  20.         @classmethod
  21.         def __setup__(cls):
  22.             super(Party, cls).__setup__()
  23.             setter = 'set_mechanism'
  24.             cls.phone.setter = setter # doesn't work
  25.             del cls.website # works
  26.  
  27.         @classmethod
  28.         def set_mechanism(cls, parties, name, value):
  29.             pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement