Skip to content

Instantly share code, notes, and snippets.

@joac
Created June 5, 2013 17:16
Show Gist options
  • Save joac/5715573 to your computer and use it in GitHub Desktop.
Save joac/5715573 to your computer and use it in GitHub Desktop.
example for my blog
# Imports, for base primitives
from tryton_builder import Module, Model, Field
# We create a new module
module = Module('HelloWorld')
# Two models
hello = Model('Hello', 'hello.hello')
# Add models to module
module.add_model(hello)
# Add Fields
hello.add_field(Field('Char', 'Name'))
hello.add_field(Field('Char', 'Greeting'))
# Build!!
module.build()
# Our module is placed on HelloWorld dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment