[MERGE]: Merged lp:~openerp-dev/openobject-addons/trunk-configuration_wizard_improvement-atp-configuration_wizard_sales-nco

bzr revid: atp@tinyerp.com-20120609143000-n73f2kh0qutvau3z
This commit is contained in:
Atul Patel (OpenERP) 2012-06-09 20:00:00 +05:30
commit f535c29fbd
11 changed files with 98 additions and 82 deletions

View File

@ -107,15 +107,15 @@ class sale_config_settings(osv.osv_memory):
'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, a task, a project, an analytical
account, or any other object and attach the selected mail as a .eml file in
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,
HR Applicant and Project Issue from the selected emails.
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, a task,
a project, an analytical account, or any other object and archive a selected
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."""),
}

View File

@ -51,7 +51,7 @@
<button string="Cancel" special="cancel"/>
</header>
<sheet layout="auto">
<group>
<group colspan="4" col="4">
<group name="config_sale" colspan="4"/>
<!-- this part is necessary to allow the plugins to extend the view -->
@ -59,11 +59,11 @@
<group name="config_fetchmail" colspan="4" attrs="{'invisible': [('module_crm','=',False)]}">
<separator string="Emails"/>
</group>
<field name="module_plugin_thunderbird" attrs="{'invisible': [('module_crm','=',False)]}"/>
<newline/>
<field name="module_plugin_outlook" attrs="{'invisible': [('module_crm','=',False)]}"/>
<group name="config_crm" colspan="4"/>
<newline/>
<field name="module_plugin_thunderbird" attrs="{'invisible': [('module_crm','=',False)]}"/>
<newline/>
<field name="module_plugin_outlook" attrs="{'invisible': [('module_crm','=',False)]}"/>
<group name="config_crm"/>
</group>
</sheet>
</form>

View File

@ -26,7 +26,7 @@ class crm_configuration(osv.osv_memory):
_inherit = ['sale.config.settings', 'fetchmail.config.settings']
_columns = {
'fetchmail_lead': fields.boolean("Create Leads from Incoming Mails", readonly=True,
'fetchmail_lead': fields.boolean("Create Leads from Incoming Mails",
fetchmail_model='crm.lead', fetchmail_name='Incoming Leads',
help="""Allows you to configure your incoming mail server, and create leads from incoming emails."""),
'module_crm_caldav': fields.boolean("Caldav Synchronization",

View File

@ -10,7 +10,9 @@
<field name="arch" type="xml">
<group name="config_fetchmail" position="after">
<field name="fetchmail_lead"/>
<button colspan="2" type="object" name="configure_fetchmail_lead" string="Configure" icon="gtk-execute"/>
<group attrs="{'invisible': [('fetchmail_lead','=',False)]}">
<button colspan="2" type="object" name="configure_fetchmail_lead" string="Configure" icon="gtk-execute"/>
</group>
</group>
<group name="config_crm" position="after">

View File

@ -26,7 +26,7 @@ class crm_claim_settings(osv.osv_memory):
_inherit = ['sale.config.settings', 'fetchmail.config.settings']
_columns = {
'fetchmail_claim': fields.boolean("Create Claims from Incoming Mails", readonly=True,
'fetchmail_claim': fields.boolean("Create Claims from Incoming Mails",
fetchmail_model='crm.claim', fetchmail_name='Incoming Claims',
help="""Allows you to configure your incoming mail server, and create claims from incoming emails."""),
}

View File

@ -10,8 +10,11 @@
<field name="priority" eval="12"/> <!-- to put fetchmail_lead before fetchmail_claim -->
<field name="arch" type="xml">
<group name="config_fetchmail" position="after">
<newline/>
<field name="fetchmail_claim"/>
<button colspan="2" type="object" name="configure_fetchmail_claim" string="Configure" icon="gtk-execute"/>
<group attrs="{'invisible': [('fetchmail_claim','=',False)]}">
<button colspan="2" type="object" name="configure_fetchmail_claim" string="Configure" icon="gtk-execute"/>
</group>
</group>
</field>
</record>

View File

@ -22,29 +22,30 @@
from osv import fields
from osv import osv
import addons
import base64
class outlook_installer(osv.osv_memory):
_name = 'outlook.installer'
_inherit = 'res.config.installer'
_columns = {
'name':fields.char('Outlook Plug-in 32bits', size=64, readonly=True, help="outlook plug-in file. Save as this file and install this plug-in in outlook."),
'name2':fields.char('Outlook Plug-in 64bits', size=64, readonly=True, help="outlook plug-in file. Save as this file and install this plug-in in outlook."),
'description':fields.text('Description', readonly=True)
}
_defaults = {
'name' : '/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi',
'name2' : '/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi',
'description' : """
Click on icon next to the link above to download the installer either for 32 or 64 bits and execute it.
System requirements:
1. MS Outlook 2005 or above.
2. MS .Net Framework 3.5 or above.
"""
}
def default_get(self, cr, uid, fields, context=None):
res = {}
plugin_32bit_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url') + '/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup32.msi'
plugin_64bit_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url') + '/plugin_outlook/static/openerp-outlook-plugin/OpenERPOutlookPluginSetup64.msi'
description = """
Click on icon next to the link above to download the installer either for 32 or 64 bits and execute it.
System requirements:
1. MS Outlook 2005 or above.
2. MS .Net Framework 3.5 or above.
"""
res['name'] = plugin_32bit_url
res['name2'] = plugin_64bit_url
res['description'] = description
return res
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -34,21 +34,24 @@ class plugin_thunderbird_installer(osv.osv_memory):
'pdf_file':fields.char('Installation Manual', size=264, help="The documentation file :- how to install Thunderbird Plug-in.", readonly=True),
'description':fields.text('Description', readonly=True)
}
def default_get(self, cr, uid, fields, context=None):
res = {}
plugin_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url') + '/plugin_thunderbird/static/openerp_plugin.xpi'
description = """
Thunderbird plugin installation:
1. Save the Thunderbird plug-in.
2. From the Thunderbird menubar: Tools ­> Add-ons -> Screwdriver/Wrench Icon -> Install add-on from file...
4. Select the plug-in (the file named openerp_plugin.xpi).
5. Click "Install Now".
6. Restart Thunderbird.
7. From the Thunderbird menubar: OpenERP -> Configuration.
8. Configure your openerp server.
"""
res['thunderbird'] = True,
res['name'] = 'openerp_plugin.xpi'
res['plugin_file'] = plugin_url
res['pdf_file'] = 'http://doc.openerp.com/book/2/2_6_Comms/2_6_Comms_thunderbird.html',
res['description'] = description
return res
_defaults = {
'thunderbird' : True,
'name' : 'openerp_plugin.xpi',
'pdf_file' : 'http://doc.openerp.com/book/2/2_6_Comms/2_6_Comms_thunderbird.html',
'plugin_file' : '/plugin_thunderbird/static/openerp_plugin.xpi',
'description' : """
Thunderbird plugin installation:
1. Save the Thunderbird plug-in.
2. From the Thunderbird menubar: Tools ­> Add-ons -> Screwdriver/Wrench Icon -> Install add-on from file...
4. Select the plug-in (the file named openerp_plugin.xpi).
5. Click "Install Now".
6. Restart Thunderbird.
7. From the Thunderbird menubar: OpenERP -> Configuration.
8. Configure your openerp server.
"""
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -63,7 +63,7 @@
<field name="inherit_id" ref="base.view_sale_config_settings"/>
<field name="arch" type="xml">
<field name="module_plugin_thunderbird" position="after">
<group colspan="2" attrs="{'invisible': [('module_crm','=',False)]}">
<group colspan="2" attrs="{'invisible': ['|',('module_crm','=',False),('module_plugin_thunderbird','=',False)]}">
<button name="%(action_thunderbird_installer)d" type="action"
string="Configure Thunderbird Plugin" icon="gtk-execute"/>
</group>

View File

@ -27,7 +27,7 @@ class sale_configuration(osv.osv_memory):
_inherit = 'sale.config.settings'
_columns = {
'group_invoice_so_lines': fields.boolean('Based on Sales Orders',
'group_invoice_so_lines': fields.boolean('Based on Sale Orders',
implied_group='sale.group_invoice_so_lines',
help="To allow your salesman to make invoices for sale order lines using the menu 'Lines to Invoice'."),
'group_invoice_deli_orders': fields.boolean('Based on Delivery Orders',
@ -103,7 +103,16 @@ class sale_configuration(osv.osv_memory):
'module_project': fields.boolean("Project"),
'decimal_precision': fields.integer('Decimal Precision on Price',help="As an example, a decimal precision of 2 will allow prices like: 9.99 EUR, whereas a decimal precision of 4 will allow prices like: 0.0231 EUR per unit."),
}
def _check_decimal(self, cr, uid, ids, context=None):
for decimal in self.browse(cr, uid, ids, context=context):
if decimal.decimal_precision > 20:
return False
return True
_constraints = [
(_check_decimal, 'Digits must be between 0 to 20 ', ['decimal_precision']),
]
def default_get(self, cr, uid, fields, context=None):
ir_model_data = self.pool.get('ir.model.data')
res = super(sale_configuration, self).default_get(cr, uid, fields, context)

View File

@ -9,38 +9,36 @@
<field name="inherit_id" ref="base.view_sale_config_settings"/>
<field name="arch" type="xml">
<group name="config_sale" position="after">
<separator string="Invoicing Policy" colspan="4"/>
<field name="module_project_timesheet" invisible="1"/>
<field name="module_project_mrp" invisible="1"/>
<field name="group_invoice_so_lines" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)"/>
<field name="default_order_policy" attrs="{'invisible':['|',('group_invoice_so_lines','=',False),('group_invoice_deli_orders','=',False)],'required': ['|',('group_invoice_so_lines','=',True),('group_invoice_deli_orders','=',True)]}"/>
<newline/>
<field name="group_invoice_deli_orders" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)"/>
<field name="module_delivery" attrs="{'invisible':[('group_invoice_so_lines','=',False), ('group_invoice_deli_orders','=',False)]}"/>
<newline/>
<field name="task_work" on_change="onchange_task_work(task_work)"/>
<newline/>
<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_sale_pricelist"/>
<field name="group_uom"/>
<field name="group_sale_delivery_address"/>
<field name="group_discount_per_so_line"/>
<field name="module_sale_margin"/>
<field name="module_sale_layout"/>
<field name="module_warning"/>
<field name="module_sale_journal"/>
<field name="group_multiple_shops"/>
<field name="decimal_precision"/>
<field name="default_picking_policy" attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}"/>
<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)]}"/>
<field name="module_analytic_journal_billing_rate" attrs="{'invisible':[('module_account_analytic_analysis','=',False)]}"/>
<separator string="Sale Order" colspan="4"/>
<field name="group_uom"/>
<field name="default_picking_policy" attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}"/>
<field name="group_sale_delivery_address"/>
<field name="group_discount_per_so_line"/>
<field name="group_sale_pricelist"/>
<field name="module_sale_margin"/>
<field name="group_multiple_shops"/>
<field name="module_sale_layout"/>
<field name="decimal_precision"/>
<field name="module_sale_journal"/>
<field name="module_warning"/>
<separator string="Invoicing Policy" colspan="4"/>
<field name="module_project_timesheet" invisible="1"/>
<field name="module_project_mrp" invisible="1"/>
<field name="group_invoice_so_lines" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)"/>
<field name="default_order_policy" attrs="{'invisible':['|',('group_invoice_so_lines','=',False),('group_invoice_deli_orders','=',False)],'required': ['|',('group_invoice_so_lines','=',True),('group_invoice_deli_orders','=',True)]}"/>
<field name="group_invoice_deli_orders" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)"/>
<field name="module_delivery" attrs="{'invisible':[('group_invoice_so_lines','=',False), ('group_invoice_deli_orders','=',False)]}"/>
<field name="task_work" on_change="onchange_task_work(task_work)"/>
<newline/>
<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="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)]}"/>
<field name="module_analytic_journal_billing_rate" attrs="{'invisible':[('module_account_analytic_analysis','=',False)]}"/>
</group>
</field>
</record>