summaryrefslogtreecommitdiff
path: root/addons/base_setup
diff options
context:
space:
mode:
authorVir (Open ERP) <vir@tinyerp.com>2010-10-11 10:15:08 +0530
committerVir (Open ERP) <vir@tinyerp.com>2010-10-11 10:15:08 +0530
commit4194e2bdd4bdb8eda3517f4becd5b22f6ee7a3dd (patch)
tree4da6770d144befcbf70ec0456b5f5cafc3a367ce /addons/base_setup
parent4c1a9e61399655f34652dea50ee46a5bd5b5e6e1 (diff)
parentaf5b3ef4e62f1ebef04003e5c25c48b7fa1ee2b1 (diff)
[Merge]
bzr revid: vir@tinyerp.com-20101011044508-feu4u973c126efsd
Diffstat (limited to 'addons/base_setup')
-rw-r--r--addons/base_setup/__init__.py1
-rw-r--r--addons/base_setup/base_setup_installer.xml29
-rw-r--r--addons/base_setup/base_setup_todo.xml4
-rw-r--r--addons/base_setup/gtk_contact_form.py114
-rw-r--r--addons/base_setup/gtk_contact_form.xml77
-rw-r--r--addons/base_setup/installer.py27
-rw-r--r--addons/base_setup/todo.py4
7 files changed, 29 insertions, 227 deletions
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/base_setup_installer.xml b/addons/base_setup/base_setup_installer.xml
index 041feb6d05c..13906abe6ba 100644
--- a/addons/base_setup/base_setup_installer.xml
+++ b/addons/base_setup/base_setup_installer.xml
@@ -25,17 +25,24 @@
</separator>
<group colspan="8">
- <field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
- <field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
- <field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
- <field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
- <field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
- <field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/> <field name="profile_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
- <field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
- <separator string="Install Specific Industry Sector Applications" colspan="4"/>
- <field name="association" attrs="{'readonly':['|',('auction','=',True),('product_expiry','=',True)]}" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
- <field name="auction" attrs="{'readonly':['|',('association','=',True),('product_expiry','=',True)]}" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
- <field name="product_expiry" attrs="{'readonly':['|',('association','=',True),('auction','=',True)]}" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="account_voucher" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="account_accountant" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="profile_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="marketing" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="point_of_sale" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <separator string="Install Specific Industry Applications" colspan="4"/>
+ <field name="association" attrs="{'readonly':['|',('auction','=',True),('product_expiry','=',True)]}" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="auction" attrs="{'readonly':['|',('association','=',True),('product_expiry','=',True)]}" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
+ <field name="product_expiry" attrs="{'readonly':['|',('association','=',True),('auction','=',True)]}" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account_accountant,purchase,hr,point_of_sale,marketing,profile_tools,report_designer,association,auction,product_expiry)"/>
</group>
</data>
</field>
diff --git a/addons/base_setup/base_setup_todo.xml b/addons/base_setup/base_setup_todo.xml
index 56c205b16c9..7cd0563aafe 100644
--- a/addons/base_setup/base_setup_todo.xml
+++ b/addons/base_setup/base_setup_todo.xml
@@ -66,8 +66,8 @@
<record id="base_setup_company_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_setup_company"/>
- <field name="sequence">3</field>
- <field name="restart">always</field>
+ <field name="sequence">1</field>
+ <field name="restart">onskip</field>
</record>
</data>
</openerp>
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 (<http://tiny.be>).
-#
-# 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 <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-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 @@
-<openerp>
- <data>
- <record id="view_base_setup_contact" model="ir.ui.view">
- <field name="name">Contact information</field>
- <field name="model">base.gtkcontactform</field>
- <field name="type">form</field>
- <field name="inherit_id" ref="base.res_config_view_base"/>
- <field name="arch" type="xml">
- <data>
- <form position="attributes">
- <attribute name="string">Contact Information</attribute>
- </form>
- <xpath expr="//label[@string='description']" position="attributes">
- <attribute name="string">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.</attribute>
- </xpath>
- <xpath expr='//separator[@string="title"]' position='attributes'>
- <attribute name='string'>Would you like more information or documentation ?</attribute>
- <attribute name='colspan'>4</attribute>
- </xpath>
- <xpath expr='//separator[@string="vsep"]' position='attributes'>
- <attribute name='rowspan'>22</attribute>
- <attribute name='string'></attribute>
- </xpath>
- <group string="res_config_contents" position="replace">
- <group colspan="4" height="450" width="600">
- <group colspan="4">
- <field name="ebook" nolabel="1"/>
- <label align="0.0" string="I want to receive the OpenERP ebook (PDF) by email." colspan="3"/>
- <field name="updates" nolabel="1"/>
- <label align="0.0" string="Yes, I would like to receive information updates from OpenERP." colspan="3"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('ebook','=',False),('updates','=',False)]}">
- <separator colspan="4" string="About You"/>
- <field name="name" colspan="2" attrs="{'required':[('ebook','=',True),('updates','=',True)]}"/>
- <field name="job" colspan="2"/>
- <field name="email" colspan="2" attrs="{'required':[('ebook','=',True),('updates','=',True)]}"/>
- <field name="phone" colspan="2" attrs="{'required':[('ebook','=',True),('updates','=',True)]}"/>
- <field name="total_employees" colspan="2"/>
- <field name="industry" colspan="2"/>
- </group>
- <group colspan="4" attrs="{'invisible':[('ebook','=',False),('updates','=',False)]}">
- <separator string="Your projects with OpenERP" colspan="4"/>
- <field name="use_openerp" align="0.0" colspan="1"/>
- <field name="already_using_openerp" align="0.0" colspan="1"/>
- <field name="sell_openerp" align="0.0" colspan="1"/>
- <field name="already_selling__openerp" align="0.0" colspan="1"/>
- <separator colspan="4" string="You would like to know more about"/>
- <field name="features" align="0.0" colspan="1"/>
- <field name="training" align="0.0" colspan="1"/>
- <field name="saas" align="0.0" colspan="1"/>
- <field name="support" align="0.0" colspan="1"/>
- <field name="partners_program" align="0.0" colspan="1"/>
- <field name="other" align="0.0" colspan="1"/>
- </group>
- </group>
- </group>
- </data>
- </field>
- </record>
-
- <record id="action_base_contact" model="ir.actions.act_window">
- <field name="name">Setup contact information</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">base.gtkcontactform</field>
- <field name="view_id" ref="view_base_setup_contact"/>
- <field name="view_type">form</field>
- <field name="view_mode">form</field>
- <field name="target">new</field>
- </record>
-
- <record id="base_setup_contact_todo" model="ir.actions.todo">
- <field name="action_id" ref="action_base_contact"/>
- <field name="sequence">5</field>
- <field name="restart">never</field>
- </record>
- </data>
-</openerp>
diff --git a/addons/base_setup/installer.py b/addons/base_setup/installer.py
index f415447e5fb..e23f1171752 100644
--- a/addons/base_setup/installer.py
+++ b/addons/base_setup/installer.py
@@ -27,8 +27,7 @@ class base_setup_installer(osv.osv_memory):
_install_if = {
('sale','crm'): ['sale_crm'],
('sale','project'): ['project_mrp'],
- ('sale',):['account_accountant']
- }
+ }
_columns = {
# Generic modules
'crm':fields.boolean('Customer Relationship Management',
@@ -46,14 +45,14 @@ class base_setup_installer(osv.osv_memory):
help="Lets you install addons geared towards sharing knowledge "
"with and between your employees."),
'stock':fields.boolean('Warehouse Management',
- help="Helps you manage your stocks and stocks locations, as well "
- "as the flow of stock between warehouses."),
+ help="Helps you manage your inventory and main stock operations: delivery orders, receptions, etc."),
'mrp':fields.boolean('Manufacturing',
help="Helps you manage your manufacturing processes and generate "
"reports on those processes."),
- 'account':fields.boolean('Financial & Accounting',
- help="Helps you handle your accounting needs, as well as create "
- "and track your budgets."),
+ 'account_voucher':fields.boolean('Invoicing',
+ help="Allows you to create your invoices and track the payments. It is an easier version of the accounting module for managers who are not accountants."),
+ 'account_accountant':fields.boolean('Accounting & Finance',
+ help="Helps you handle your accounting needs, if you are not an accountant, we suggest you to install only the Invoicing "),
'purchase':fields.boolean('Purchase Management',
help="Helps you manage your purchase-related processes such as "
"requests for quotations, supplier invoices, etc..."),
@@ -84,9 +83,6 @@ class base_setup_installer(osv.osv_memory):
"applications selected to help you manage your auctions "
"as well as the business processes around them."),
}
- _defaults = {
- 'crm': True,
- }
def _if_knowledge(self, cr, uid, ids, context=None):
if self.pool.get('res.users').browse(cr, uid, uid, context=context)\
@@ -95,16 +91,7 @@ class base_setup_installer(osv.osv_memory):
return None
def _if_misc_tools(self, cr, uid, ids, context=None):
- interface = self.pool.get('res.users').browse(cr, uid, uid, context=context).view
- if interface == 'simple' or interface =='extended' :
- return ['profile_tools']
- return None
-
- def _if_account(self, cr, uid, ids, context=None):
- if self.pool.get('res.users').browse(cr, uid, uid, context=context)\
- .view == 'simple':
- return ['account_voucher']
- return None
+ return ['profile_tools']
def onchange_moduleselection(self, cr, uid, ids, *args, **kargs):
value = {}
diff --git a/addons/base_setup/todo.py b/addons/base_setup/todo.py
index 7be56f9eabe..ae16f260876 100644
--- a/addons/base_setup/todo.py
+++ b/addons/base_setup/todo.py
@@ -104,8 +104,8 @@ Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07''')
We suggest you to put bank information here:
IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701'''),
'logo':fields.binary('Logo'),
- 'account_no':fields.char('Account No', size=64),
- 'website': fields.char('Company Website', size=64, help="Exemple: http://openerp.com"),
+ 'account_no':fields.char('Bank Account No', size=64),
+ 'website': fields.char('Company Website', size=64, help="Example: http://openerp.com"),
}
def execute(self, cr, uid, ids, context=None):