Skip to content

Instantly share code, notes, and snippets.

@danypr92
Created May 3, 2018 14:24
States required
class Contract:
"""
This overwrite of class Contract extend functionality of Contract
vanilla model.
Add the necessary functions to represent a ISP Contract.
"""
__metaclass__ = PoolMeta
__name__ = 'contract'
equipment_received = fields.Boolean('Equipment Received', states={
'required': Eval('state') in ['activation_scheduled', 'introduced']
})
@danypr92
Copy link
Author

danypr92 commented May 3, 2018

Debes utilizar el operador in de PYSON y no el estandard de python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment