Files
odoo_source/addons/event/res_config.py
T
cod-odoo 16b560c441 [IMP][TEST] event: auto confirmation option, allowing to
automatically confirm events. In a simple flow it is usefull to automatically
confirm event and registrations.

[TEST] event: moved draft2done test into a unittest, easier to finely tune
in order to test the auto confirm option. Moreover this gives a basis to
further add python tests in the module. Hooray.
2014-10-02 11:44:07 +02:00

22 lines
960 B
Python

# -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class event_config_settings(osv.TransientModel):
_name='marketing.config.settings'
_inherit='marketing.config.settings'
_columns = {
'module_event_sale': fields.boolean(
'Sale different type of ticket',
help='Install the event_sale module'),
'module_website_event_track': fields.boolean(
'Organize few days event with track,full agenda,own menu in website'),
'auto_confirmation': fields.boolean(
'Automate events and subscription confirmation', help='Unselect this option to manually manage draft event and draft subscription'),
}
def set_default_auto_confirmation(self, cr, uid, ids, context=None):
config_value = self.browse(cr, uid, ids, context=context).auto_confirmation
self.pool.get('ir.values').set_default(cr, uid, 'marketing.config.settings', 'auto_confirmation', config_value)