Advertisement
Guest User

Untitled

a guest
Feb 26th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. class Championship:
  2.     __name__ = 'championship'
  3.     classification = fields.One2Man('classification', 'championship', 'Classification',
  4.     context={
  5.        'by_championsihp': True,
  6.     })
  7.  
  8. class Classification:
  9.    ___name__ = 'classification'
  10.  
  11.    def table_query(cls):
  12.         #Compute the classification
  13.         if Transaction().context.get('by_championship'):
  14.              # Group by championship
  15.         else:
  16.              # Championship is None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement