Nimesh Contractor(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-configuration_wizard_improvement-atp-configuration_wizard_sales-nco
 into lp:~openerp-dev/openobject-addons/trunk-application_setting_cleanup-atp.

Requested reviews:
  Atul Patel(OpenERP) (atp-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configuration_wizard_improvement-atp-configuration_wizard_sales-nco/+merge/109334

Hello sir,

         I have change the following things in sale configration.

         1) Improve sale Configuration view.
         2) Improve sequence and arrangement for sale Configuration wizard.
         3) Sets the decimal precision between 0 to 20.
         4) Correct the link of Thunderbird plug-in xpi file and outlook msi 
file configuration.
         5) Change the string to Sale Orders.
         6) Make visible config fetchmail lead when checked.

Thanks,
 NCO.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-configuration_wizard_improvement-atp-configuration_wizard_sales-nco/+merge/109334
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-application_setting_cleanup-atp.
=== modified file 'base_setup/base_setup.py'
--- base_setup/base_setup.py	2012-05-16 16:01:15 +0000
+++ base_setup/base_setup.py	2012-06-08 11:53:21 +0000
@@ -107,15 +107,15 @@
         '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."""),
     }

=== modified file 'base_setup/base_setup_views.xml'
--- base_setup/base_setup_views.xml	2012-06-04 12:11:39 +0000
+++ base_setup/base_setup_views.xml	2012-06-08 11:53:21 +0000
@@ -51,7 +51,7 @@
                     <button string="Cancel" special="cancel"/>
                 </header>
                 <sheet layout="auto">
-                    <group>
+                    <group 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"/>
+	                        <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>

=== modified file 'crm/res_config.py'
--- crm/res_config.py	2012-05-14 15:09:26 +0000
+++ crm/res_config.py	2012-06-08 11:53:21 +0000
@@ -26,7 +26,7 @@
     _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",

=== modified file 'crm/res_config_view.xml'
--- crm/res_config_view.xml	2012-05-15 07:27:17 +0000
+++ crm/res_config_view.xml	2012-06-08 11:53:21 +0000
@@ -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">

=== modified file 'crm_claim/res_config_view.xml'
--- crm_claim/res_config_view.xml	2012-05-15 07:27:17 +0000
+++ crm_claim/res_config_view.xml	2012-06-08 11:53:21 +0000
@@ -10,7 +10,7 @@
             <field name="priority" eval="12"/>       <!-- to put fetchmail_lead before fetchmail_claim -->
             <field name="arch" type="xml">
                 <group name="config_fetchmail" position="after">
-                    <field name="fetchmail_claim"/>
+                    <field name="fetchmail_claim" attrs="{'readonly': [('fetchmail_claim','=',False)]}"/>
                     <button colspan="2" type="object" name="configure_fetchmail_claim" string="Configure" icon="gtk-execute"/>
                 </group>
             </field>

=== modified file 'plugin_outlook/plugin_outlook.py'
--- plugin_outlook/plugin_outlook.py	2012-02-16 17:21:36 +0000
+++ plugin_outlook/plugin_outlook.py	2012-06-08 11:53:21 +0000
@@ -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' : """
+    
+    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:

=== modified file 'plugin_thunderbird/plugin_thunderbird.py'
--- plugin_thunderbird/plugin_thunderbird.py	2012-01-31 13:36:57 +0000
+++ plugin_thunderbird/plugin_thunderbird.py	2012-06-08 11:53:21 +0000
@@ -34,13 +34,10 @@
         '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)
     }
-
-    _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' : """
+    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...
@@ -50,5 +47,11 @@
     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
 
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file

=== modified file 'plugin_thunderbird/plugin_thunderbird.xml'
--- plugin_thunderbird/plugin_thunderbird.xml	2012-04-24 07:22:21 +0000
+++ plugin_thunderbird/plugin_thunderbird.xml	2012-06-08 11:53:21 +0000
@@ -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>

=== modified file 'sale/res_config.py'
--- sale/res_config.py	2012-05-30 13:46:13 +0000
+++ sale/res_config.py	2012-06-08 11:53:21 +0000
@@ -27,7 +27,7 @@
     _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,14 @@
         '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):
+        decimal = self.browse(cr, uid, ids, context=context)[0].decimal_precision
+        if decimal > 20:
+            return False
+        return True
+    _constraints = [
+        (_check_decimal, 'Digits must be between 0 and  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)

=== modified file 'sale/res_config_view.xml'
--- sale/res_config_view.xml	2012-05-14 12:09:56 +0000
+++ sale/res_config_view.xml	2012-06-08 11:53:21 +0000
@@ -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>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to