summaryrefslogtreecommitdiff
path: root/addons/base_setup
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2012-06-22 11:49:40 +0200
committerRaphael Collet <rco@openerp.com>2012-06-22 11:49:40 +0200
commitea65a49a94e51b9bc92b7541f5b7ab1bf19dd856 (patch)
treed54ef617d7a95cb574ebf83905ded845965b690b /addons/base_setup
parentfdca6f9078a4d68341856106c73749f0bc451983 (diff)
[IMP] base_setup: move all res_config wizards to res_config files, and change xml id of sale.config.settings view
bzr revid: rco@openerp.com-20120622094940-jacovvqfyym0zjov
Diffstat (limited to 'addons/base_setup')
-rw-r--r--addons/base_setup/base_setup.py23
-rw-r--r--addons/base_setup/base_setup_views.xml33
-rw-r--r--addons/base_setup/res_config.py33
-rw-r--r--addons/base_setup/res_config_view.xml33
4 files changed, 61 insertions, 61 deletions
diff --git a/addons/base_setup/base_setup.py b/addons/base_setup/base_setup.py
index dd9bed97327..9c1d7d9fa8e 100644
--- a/addons/base_setup/base_setup.py
+++ b/addons/base_setup/base_setup.py
@@ -97,27 +97,4 @@ class specify_partner_terminology(osv.osv_memory):
self.make_translations(cr, uid, ids, act_ref, 'model', act_id.help, _case_insensitive_replace(act_id.help,'Customer',o.partner), res_id=act_id.id, context=context)
return {}
-# Preferences wizard for Sales & CRM.
-# It is defined here because it is inherited independently in modules sale, crm,
-# plugin_outlook and plugin_thunderbird.
-class sale_config_settings(osv.osv_memory):
- _name = 'sale.config.settings'
- _inherit = 'res.config.settings'
- _columns = {
- 'module_crm': fields.boolean('CRM'),
- 'module_plugin_thunderbird': fields.boolean('Thunderbird Plugin',
- help="""The plugin allows you archive email and its attachments to the selected
- OpenERP objects. You can select a partner, or a lead and
- attach the selected mail as a .eml file in
- the attachment of a selected record. You can create documents for CRM Lead,
- Partner from the selected emails.
- This installs the module plugin_thunderbird."""),
- 'module_plugin_outlook': fields.boolean('Outlook Plugin',
- help="""The Outlook plugin allows you to select an object that you would like to add
- to your email and its attachments from MS Outlook. You can select a partner,
- or a lead object and archive a selected
- email into an OpenERP mail message with attachments.
- This installs the module plugin_outlook."""),
- }
-
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_setup/base_setup_views.xml b/addons/base_setup/base_setup_views.xml
index 631e4a10e07..eb59d918681 100644
--- a/addons/base_setup/base_setup_views.xml
+++ b/addons/base_setup/base_setup_views.xml
@@ -43,38 +43,5 @@
<field name="target">new</field>
</record>
- <!-- Sale config wizard -->
- <record id="base.view_sale_config_settings" model="ir.ui.view">
- <field name="name">sale settings</field>
- <field name="model">sale.config.settings</field>
- <field name="type">form</field>
- <field name="arch" type="xml">
- <form string="Configure Sales" version="7.0">
- <header>
- <button string="Apply" type="object" name="execute" class="oe_highlight"/>
- <button string="Cancel" special="cancel"/>
- </header>
- <sheet>
- <field name="module_crm" invisible="1"/>
- <group name="config_sale"/>
- <group name="config_fetchmail" string="Emails" attrs="{'invisible': [('module_crm','=',False)]}">
- <field name="module_plugin_thunderbird"/>
- <field name="module_plugin_outlook"/>
- </group>
- <group name="config_crm"/>
- </sheet>
- </form>
- </field>
- </record>
-
- <record id="base.action_sale_config" model="ir.actions.act_window">
- <field name="name">Configure Sales</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">sale.config.settings</field>
- <field name="view_id" ref="base.view_sale_config_settings"/>
- <field name="view_mode">form</field>
- <field name="target">inline</field>
- </record>
-
</data>
</openerp>
diff --git a/addons/base_setup/res_config.py b/addons/base_setup/res_config.py
index d18fda4fbcd..00e2a8a9fa4 100644
--- a/addons/base_setup/res_config.py
+++ b/addons/base_setup/res_config.py
@@ -33,14 +33,14 @@ class base_config_settings(osv.osv_memory):
'module_share': fields.boolean('Allow Sharing Resources to External Users',
help="""As an example, you will be able to share a project or some tasks to your customers, or quotes/sales to several persons at your customer company, or your agenda availabilities to your contacts."""),
}
-
+
def open_company(self, cr, uid, ids, context=None):
if context is None:
context = {}
-
- company_obj = self.pool.get('res.company')
+
+ company_obj = self.pool.get('res.company')
company_id = company_obj.browse(cr, uid, uid, context=context).id
-
+
return {
'name': 'Your Company',
'view_type': 'form',
@@ -50,5 +50,28 @@ class base_config_settings(osv.osv_memory):
'view_id': False,
'type': 'ir.actions.act_window',
}
-
+
+# Preferences wizard for Sales & CRM.
+# It is defined here because it is inherited independently in modules sale, crm,
+# plugin_outlook and plugin_thunderbird.
+class sale_config_settings(osv.osv_memory):
+ _name = 'sale.config.settings'
+ _inherit = 'res.config.settings'
+ _columns = {
+ 'module_crm': fields.boolean('CRM'),
+ 'module_plugin_thunderbird': fields.boolean('Thunderbird Plugin',
+ help="""The plugin allows you archive email and its attachments to the selected
+ OpenERP objects. You can select a partner, or a lead and
+ attach the selected mail as a .eml file in
+ the attachment of a selected record. You can create documents for CRM Lead,
+ Partner from the selected emails.
+ This installs the module plugin_thunderbird."""),
+ 'module_plugin_outlook': fields.boolean('Outlook Plugin',
+ help="""The Outlook plugin allows you to select an object that you would like to add
+ to your email and its attachments from MS Outlook. You can select a partner,
+ or a lead object and archive a selected
+ email into an OpenERP mail message with attachments.
+ This installs the module plugin_outlook."""),
+ }
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_setup/res_config_view.xml b/addons/base_setup/res_config_view.xml
index 5707dac82e9..81f83a1dde1 100644
--- a/addons/base_setup/res_config_view.xml
+++ b/addons/base_setup/res_config_view.xml
@@ -43,5 +43,38 @@
<menuitem id="menu_general_configuration" parent="base.menu_config"
sequence="100" action="action_general_configuration"/>
+ <!-- Sale config wizard -->
+ <record id="view_sale_config_settings" model="ir.ui.view">
+ <field name="name">sale settings</field>
+ <field name="model">sale.config.settings</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="Configure Sales" version="7.0">
+ <header>
+ <button string="Apply" type="object" name="execute" class="oe_highlight"/>
+ <button string="Cancel" special="cancel"/>
+ </header>
+ <sheet>
+ <field name="module_crm" invisible="1"/>
+ <group name="config_sale"/>
+ <group name="config_fetchmail" string="Emails" attrs="{'invisible': [('module_crm','=',False)]}">
+ <field name="module_plugin_thunderbird"/>
+ <field name="module_plugin_outlook"/>
+ </group>
+ <group name="config_crm"/>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="action_sale_config" model="ir.actions.act_window">
+ <field name="name">Configure Sales</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">sale.config.settings</field>
+ <field name="view_id" ref="view_sale_config_settings"/>
+ <field name="view_mode">form</field>
+ <field name="target">inline</field>
+ </record>
+
</data>
</openerp>