Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Invoice:
- __metaclass__ = PoolMeta
- __name__ = 'account.invoice'
- groupe = fields.Many2One(
- 'forest_group.group',
- string=u'Groupement',
- help=u'Groupement',
- states=_STATES,
- depends=_DEPENDS
- )
- forest = fields.Many2One(
- 'forest.forest',
- string=u'Forest',
- help=u'Forest',
- states=_STATES,
- depends=_DEPENDS,
- domain=[('owner', '=', Eval('partyid'))],
- on_change_with=['groupe'],
- )
- def on_change_with_forest(self):
- if self.groupe is None:
- return None
- partyid = fields.Integer(
- string=u'idp',
- on_change_with=['groupe'],
- readonly=True,
- )
- def on_change_with_partyid(self):
- if self.groupe is not None:
- return self.groupe.party.id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement