[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
This commit is contained in:
Raphael Collet 2012-06-22 11:49:40 +02:00
parent fdca6f9078
commit ea65a49a94
9 changed files with 71 additions and 71 deletions

View File

@ -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:

View File

@ -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>

View File

@ -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:

View File

@ -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>

View File

@ -6,7 +6,7 @@
<field name="name">crm settings</field>
<field name="model">sale.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_sale_config_settings"/>
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
<field name="arch" type="xml">
<group name="config_fetchmail" position="after">
<field name="fetchmail_lead"/>
@ -31,7 +31,7 @@
</record>
<menuitem id="base.menu_sale_config" name="Sales" parent="base.menu_config"
sequence="1" action="base.action_sale_config"/>
sequence="1" action="base_setup.action_sale_config"/>
</data>
</openerp>

View File

@ -6,7 +6,7 @@
<field name="name">crm_claim settings</field>
<field name="model">sale.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_sale_config_settings"/>
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
<field name="priority" eval="12"/> <!-- to put fetchmail_lead before fetchmail_claim -->
<field name="arch" type="xml">
<group name="config_fetchmail" position="after">

View File

@ -50,7 +50,7 @@
<field name="name">Sales Application</field>
<field name="model">sale.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_sale_config_settings"/>
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
<field name="arch" type="xml">
<field name="module_plugin_outlook" position="after">
<group colspan="2" attrs="{'invisible': ['|',('module_crm','=',False),('module_plugin_outlook','=',False)]}">

View File

@ -48,13 +48,13 @@
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<!-- Sales Configuration -->
<record id="view_config_thunderbird_installer" model="ir.ui.view">
<field name="name">Sales Application</field>
<field name="model">sale.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_sale_config_settings"/>
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
<field name="arch" type="xml">
<field name="module_plugin_thunderbird" position="after">
<group colspan="2" attrs="{'invisible': ['|',('module_crm','=',False),('module_plugin_thunderbird','=',False)]}">

View File

@ -6,7 +6,7 @@
<field name="name">sale settings</field>
<field name="model">sale.config.settings</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_sale_config_settings"/>
<field name="inherit_id" ref="base_setup.view_sale_config_settings"/>
<field name="arch" type="xml">
<group name="config_sale" position="after">
<separator string="Invoicing Policy" colspan="4"/>
@ -21,7 +21,7 @@
<field name="timesheet" on_change="onchange_timesheet(timesheet)"/>
<field name="time_unit" domain="[('category_id.name','=','Working Time')]"
attrs="{'invisible': [('task_work','=',False), ('module_account_analytic_analysis','=',False)],'required': ['|', ('task_work','=',True), ('module_account_analytic_analysis','=',True)]}"/>
<separator string="Sale Order" colspan="4"/>
<field name="group_uom"/>
<field name="default_picking_policy" attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}"/>
@ -34,7 +34,7 @@
<field name="decimal_precision"/>
<field name="module_sale_journal"/>
<field name="module_warning"/>
<separator string="Contracts" colspan="4"/>
<field name="module_account_analytic_analysis" on_change="onchange_timesheet(module_account_analytic_analysis)"/>
<field name="module_analytic_user_function" attrs="{'invisible':[('module_account_analytic_analysis','=',False)]}"/>
@ -44,7 +44,7 @@
</record>
<menuitem id="base.menu_sale_config" name="Sales" parent="base.menu_config"
sequence="1" action="base.action_sale_config"/>
sequence="1" action="base_setup.action_sale_config"/>
<record id="view_account_config" model="ir.ui.view">
<field name="name">account settings</field>