Download Open Object Developer Book
Transcript
Open Object Developer Book, Release 1.0
Events on the widgets module are processed with a callback mechanism. A callback mechanism is a process whereby
an element defines the type of events he can handle and which methods should be called when this event is triggered.
Once the event is triggered, the system knows that the event is bound to a specific method, and calls that method back.
Hence callback.
6.2 Module Integrations
The are many different modules available for Open ERP and suited for different business models. Nearly all of these
are optional (except ModulesAdminBase), making it easy to customize Open ERP to serve specific business needs.
All the modules are in a directory named addons/ on the server. You simply need to copy or delete a module directory
in order to either install or delete the module on the Open ERP platform.
Some modules depend on other modules. See the file addons/module/__terp__.py for more information on the dependencies.
Here is an example of __terp__.py:
{
"name" : "Open TERP Accounting",
"version" : "1.0",
"author" : "Bob Gates - Not So Tiny",
"website" : "http://www.openerp.com/",
"category" : "Generic Modules/Others",
"depends" : ["base"],
"description" : """A
Multiline
Description
""",
"init_xml" : ["account_workflow.xml", "account_data.xml", "account_demo.xml"],
"demo_xml" : ["account_demo.xml"],
"update_xml" : ["account_view.xml", "account_report.xml", "account_wizard.xml"],
"active": False,
"installable": True
}
When initializing a module, the files in the init_xml list are evaluated in turn and then the files in the update_xml list
are evaluated. When updating a module, only the files from the update_xml list are evaluated.
6.3 Inheritance
6.3.1 Traditional Inheritance
Introduction
Objects may be inherited in some custom or specific modules. It is better to inherit an object to add/modify some
fields.
It is done with:
_inherit=’object.name’
38
Chapter 6. Moulder Development Approach