From dc25e393c833cafe4fa5bacb35e607fb0e8e5171 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sat, 9 Oct 2010 11:36:34 +0200 Subject: [PATCH] [imp] remoed gtk contact form bzr revid: fp@tinyerp.com-20101009093634-isv2b1fe36zpw2lu --- addons/base_setup/__init__.py | 1 - addons/base_setup/gtk_contact_form.py | 114 ------------------------- addons/base_setup/gtk_contact_form.xml | 77 ----------------- 3 files changed, 192 deletions(-) delete mode 100644 addons/base_setup/gtk_contact_form.py delete mode 100644 addons/base_setup/gtk_contact_form.xml diff --git a/addons/base_setup/__init__.py b/addons/base_setup/__init__.py index 59598f6577a..934e1a3bdf8 100644 --- a/addons/base_setup/__init__.py +++ b/addons/base_setup/__init__.py @@ -21,7 +21,6 @@ import installer import todo -import gtk_contact_form import wizard import os import base64 diff --git a/addons/base_setup/gtk_contact_form.py b/addons/base_setup/gtk_contact_form.py deleted file mode 100644 index c62951b13b7..00000000000 --- a/addons/base_setup/gtk_contact_form.py +++ /dev/null @@ -1,114 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from operator import itemgetter - -from osv import osv, fields -import netsvc -import tools -from tools import misc - -class base_gtkcontactform(osv.osv_memory): - """ - """ - _name = 'base.gtkcontactform' - _inherit = 'res.config' - logger = netsvc.Logger() - - def default_get(self, cr, uid, fields_list=None, context=None): - ''' set email and phone number selected in the previous company information - form ''' - defaults = super(base_gtkcontactform, self)\ - .default_get(cr, uid, fields_list=fields_list, context=context) - company_id = self.pool.get('base.setup.company').search(cr, uid, []) - company = self.pool.get('base.setup.company').read(cr, uid, company_id) - company = company and company[0] or False - if company: - defaults.update({'email':company.get('email',''), - 'phone': company.get('phone','')}) - return defaults - - _columns = { - 'name':fields.char('Your Name', size=64), - 'job':fields.char('Job Title', size=64,), - 'email':fields.char('E-mail', size=64), - 'phone':fields.char('Phone', size=64), - 'total_employees':fields.selection([('1-5','1-5'),('5-20','5-20'),('20-100','20-100'),('100-500','100-500'),('500','500+')], 'No Of Employees', size=32), - 'industry':fields.selection([('apparel','Apparel'),('banking','Banking'),('biotechnology','Biotechnology'),('chemicals','Chemicals'),('communications','Communications'), - ('construction','Construction'),('consulting','Consulting'),('education','Education'),('electronics','Electronics'),('energy','Energy'),('engineering','Engineering'), - ('entertainment','Entertainment'),('environmental','Environmental'),('finance','Finance'),('government','Government'),('healthcare','Healthcare'),('hospitality','Hospitality'), - ('insurance','Insurance'),('machinery','Machinery'),('manufacturing','Manufacturing'),('media','Media'),('notforprofit','Not For Profit'), - ('recreation','Recreation'),('retail','Retail'),('shipping','Shipping'),('technology','Technology'),('telecommunications','Telecommunications'), - ('transportation','Transportation'),('utilities','Utilities'),('other','Other'), - ], 'Industry', size=32), - 'use_openerp':fields.boolean('We plan to use OpenERP'), - 'already_using_openerp':fields.boolean('Already using OpenERP'), - 'sell_openerp':fields.boolean('Plan to sell OpenERP'), - 'already_selling__openerp':fields.boolean('Already selling OpenERP'), - - 'features':fields.boolean('The features of OpenERP'), - 'saas':fields.boolean('OpenERP Online Solutions (SaaS)'), - 'partners_program':fields.boolean('OpenERP Partners Program (for integrators)'), - 'support':fields.boolean('Support and Maintenance Solutions'), - 'training':fields.boolean('OpenERP Training Program'), - 'other':fields.boolean('Other'), - 'ebook':fields.boolean('ebook'), - 'updates':fields.boolean('Updates'), - } - def execute(self, cr, uid, ids, context=None): - if context is None: - context = {} - - company_id = self.pool.get('base.setup.company').search(cr, uid, [], context=context) - company_data = self.pool.get('base.setup.company').read(cr, uid, company_id, context=context) - company_data = company_data and company_data[0] or {} - country = '' - - if company_data.get('country_id', False): - country = self.pool.get('res.country').read(cr, uid, company_data['country_id'],['name'], context=context)['name'] - - for res in self.read(cr, uid, ids, context=context): - email = res.get('email','') - result = "\ncompany: "+ tools.ustr(company_data.get('name','')) - result += "\nname: " + tools.ustr(res.get('name','')) - result += "\njob: " + tools.ustr(res.get('job','')) - result += "\nphone: " + str(res.get('phone','')) - result += "\ncity: " + tools.ustr(company_data.get('city','')) - result += "\ncountry: " + str(country) - result += "\nindustry: " + tools.ustr(res.get('industry', '')) - result += "\ntotal_employees: " + str(res.get('total_employees', '')) - result += "\nplan_use: " + str(res.get('use_openerp', False)) - result += "\nalready_using_openerp: " + str(res.get('already_using_openerp', False)) - result += "\nsell_openerp: " + str(res.get('sell_openerp', False)) - result += "\nalready_selling__openerp: " + str(res.get('already_selling__openerp', False)) - result += "\nfeatures: " + str(res.get('features', False)) - result += "\nsaas: " + str(res.get('saas', False)) - result += "\npartners_program: " + str(res.get('partners_program', False)) - result += "\nsupport: " + str(res.get('support', False)) - result += "\ntraining: " + str(res.get('training', False)) - result += "\nupdates: " + str(res.get('updates', False)) - result += "\ncontact_me: " + str(res.get('contact_me', False)) - result += "\nebook: " + str(res.get('ebook',False)) - 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 deleted file mode 100644 index 660187a8ce0..00000000000 --- a/addons/base_setup/gtk_contact_form.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - Contact information - base.gtkcontactform - form - - - -
- Contact Information -
- - To receive more information, please fill in the form about you and your company. Documentation and/or information will be sent to you as soon as possible. - - - Would you like more information or documentation ? - 4 - - - 22 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - Setup contact information - ir.actions.act_window - base.gtkcontactform - - form - form - new - - - - - 5 - never - -
-