Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Im trying to get a grip on development for tryton 2.8
- ## here is a basic helloworld module displaying a menu item in the tryton client
- ## you may have to restart the tryton server after changing some code
- helloworld/__init__.py ##
- ##########################
- from trytond.pool import Pool
- from .helloworld import *
- def register():
- Pool.register(
- Hello,
- module='helloworld', type_='model')
- helloworld/tryton.cfg ##
- ########################
- [tryton]
- version=2.8.0
- depends:
- ir
- res
- xml:
- helloworld.xml
- helloworld/helloworld.py ##
- ###########################
- from trytond.model import ModelView, ModelSQL, fields
- __all__ = ['Hello']
- class Hello(ModelSQL, ModelView):
- "Hello World"
- __name__ = "hello.hello"
- helloworld/helloworld.xml ##
- ############################
- <?xml version="1.0"?>
- <!-- This file is part of Tryton. The COPYRIGHT file at the top level of
- this repository contains the full copyright notices and license terms. -->
- <tryton>
- <data>
- <menuitem name="Hello World" id="menu_hello_world" sequence="10"/>
- </data>
- </tryton>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement