Tutorial by Examples

<?xml version="1.0"?> <openerp> <data noupdate="1"> <function model="*model_name*" name="_configure_sales"/> </data> </openerp> This simple xml file is calls _configure_sales function from model_name ...
class *model_name*(models.Model): _name = *model_name* @api.model def _configure_sales(self): # Do the configuration here Every time when module will be installed this function will run. Note: If you remove noupdate from xml, function will run on upgrading as well.

Page 1 of 1