Advertisement
Guest User

Untitled

a guest
May 8th, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. cost_price = fields.Float('Cost Price', digits=(16, 4), states={
  2. 'invisible': Or(~Eval('_parent_invoice', {}).get('type').in_(['out_credit_note']), Eval('type') != 'line'),
  3. 'required': And(Eval('_parent_invoice', {}).get('type').in_(['out_credit_note']),
  4. Eval('type') == 'line',
  5. Eval('_parent_invoice', {}).get('state', 'draft') != 'draft')
  6. }, depends=['invoice', 'type'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement