Skip to content

Instantly share code, notes, and snippets.

@grasbauer
Created February 5, 2021 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save grasbauer/4036ee51bee1ea25ca1ee023f6a508c9 to your computer and use it in GitHub Desktop.
Save grasbauer/4036ee51bee1ea25ca1ee023f6a508c9 to your computer and use it in GitHub Desktop.
from trytond.model import fields
from trytond.pool import PoolMeta
__all__ = ['Country']
class Country(metaclass=PoolMeta):
__name__ = 'country.country'
active = fields.Boolean('Active')
sequence = fields.Integer('Sequence')
@classmethod
def __setup__(cls):
super(Country, cls).__setup__()
cls._order.insert(0, ('sequence', 'ASC'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment