File: anatomy.rst

package info (click to toggle)
tryton-server 7.0.40-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,748 kB
  • sloc: python: 53,502; xml: 5,194; sh: 803; sql: 217; makefile: 28
file content (23 lines) | stat: -rw-r--r-- 907 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.. _tutorial-module-anatomy:

Anatomy of a module
===================

A Tryton module is a `python module`_ thus it is a directory that contains a
:ref:`__init__.py <topics-modules-init>` file.

A Tryton module must also contain a :ref:`tryton.cfg
<topics-modules-tryton-cfg>` file which is used to define the dependencies
between modules and also lists the :ref:`XML files <topics-modules-xml-files>`
that must be loaded by Tryton.

Usually a module will define views used in the user interface, those views are
described by XML files stored in the :file:`view` directory.

Translations are handled with `po files`_ that sit in the :file:`locale`
directory, one file per language.

Let's continue with :ref:`creating the models <tutorial-module-model>`

.. _`python module`: https://docs.python.org/tutorial/modules.html
.. _`po files`: https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html