diff options
| author | nch@tinyerp.com <> | 2010-05-05 19:03:42 +0530 |
|---|---|---|
| committer | nch@tinyerp.com <> | 2010-05-05 19:03:42 +0530 |
| commit | e29aba7f5e5c56635bf858bb84e744ea45ba81d6 (patch) | |
| tree | e3bd7ca238ae638a75529b437bb20770ababfd32 /addons/base_setup | |
| parent | a606f0d030b87014b1a113a7311d8584a885f902 (diff) | |
[IMP]:account configurable wizards & gtk contact form
bzr revid: nch@tinyerp.com-20100505133342-93xtgruyggc0jc6f
Diffstat (limited to 'addons/base_setup')
| -rw-r--r-- | addons/base_setup/base_setup_installer.xml | 1 | ||||
| -rw-r--r-- | addons/base_setup/base_setup_todo.xml | 2 | ||||
| -rw-r--r-- | addons/base_setup/gtk_contact_form.py | 25 | ||||
| -rw-r--r-- | addons/base_setup/gtk_contact_form.xml | 4 |
4 files changed, 28 insertions, 4 deletions
diff --git a/addons/base_setup/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml index cc5afdd6f25..03d64eaa16e 100644 --- a/addons/base_setup/base_setup_installer.xml +++ b/addons/base_setup/base_setup_installer.xml @@ -18,7 +18,6 @@ If you don't think you need any of these right now, you can easily install them later on.</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> - <attribute name='rowspan'>15</attribute> <attribute name='string'></attribute> </xpath> <separator string="title" position="attributes"> diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml index 3ccba59fca0..eb108aef229 100644 --- a/addons/base_setup/base_setup_todo.xml +++ b/addons/base_setup/base_setup_todo.xml @@ -17,7 +17,7 @@ <attribute name='string'>Configure Your Company</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> - <attribute name='rowspan'>25</attribute> + <attribute name='rowspan'>23</attribute> <attribute name='string'></attribute> </xpath> <group string="res_config_contents" position="replace"> diff --git a/addons/base_setup/gtk_contact_form.py b/addons/base_setup/gtk_contact_form.py index c05c3866b97..25324050d8e 100644 --- a/addons/base_setup/gtk_contact_form.py +++ b/addons/base_setup/gtk_contact_form.py @@ -23,6 +23,7 @@ from operator import itemgetter from osv import osv, fields import netsvc import tools +from tools import misc class base_gtkcontactform(osv.osv_memory): """ @@ -68,8 +69,30 @@ class base_gtkcontactform(osv.osv_memory): 'other':fields.boolean('Other'), 'ebook':fields.boolean('ebook'), 'updates':fields.boolean('updates'), + 'note':fields.text('Note'), } def execute(self, cr, uid, ids, context=None): - pass + company_id = self.pool.get('base.setup.company').search(cr, uid, []) + company_data = self.pool.get('base.setup.company').read(cr, uid, company_id)[0] + country1 = '' + if company_data.get('country_id', False): + country = self.pool.get('res.country').read(cr, uid, company_data['country_id'],['name'])['name'] + for res in self.read(cr, uid, ids): + email = res.get('email','') + result = "\ncompany: "+ str(company_data.get('name','')) + result += "\nname: " + str(res.get('name','')) + result += "\nphone: " + str(res.get('phone','')) + result += "\ncity: " + str(company_data.get('city','')) + result += "\ncountry: " + str(country) + result += "\nindustry: " + str(res.get('industry', '')) + result += "\ntotal_employees: " + str(res.get('total_employees', '')) + result += "\nplan_use: " + str(res.get('use_openerp', False)) + result += "\nsell_openerp: " + str(res.get('sell_openerp', False)) + result += "\nebook: " + str(res.get('ebook',False)) + result += "\nnote: " + str(res.get('note','')) + result += "\ngtk: " + str(True) + misc.upload_data(email, result, type='SURVEY') + + base_gtkcontactform()
\ No newline at end of file diff --git a/addons/base_setup/gtk_contact_form.xml b/addons/base_setup/gtk_contact_form.xml index b220db020c6..ffae67adcf5 100644 --- a/addons/base_setup/gtk_contact_form.xml +++ b/addons/base_setup/gtk_contact_form.xml @@ -18,7 +18,7 @@ <attribute name='colspan'>4</attribute> </xpath> <xpath expr='//separator[@string="vsep"]' position='attributes'> - <attribute name='rowspan'>22</attribute> + <attribute name='rowspan'>27</attribute> <attribute name='string'></attribute> </xpath> <group string="res_config_contents" position="replace"> @@ -47,6 +47,8 @@ <field name="support" colspan="1"/> <field name="training" colspan="1"/> <field name="other" colspan="1"/> + <separator colspan="4" string="Notes"/> + <field name="note" colspan="4" nolabel="1"/> </group> <group colspan="2"> <separator colspan="4" string="Do You Need Them ?"/> |
