diff --git a/addons/account/res_config.py b/addons/account/res_config.py index 92692084b75..484bd7f520a 100644 --- a/addons/account/res_config.py +++ b/addons/account/res_config.py @@ -30,17 +30,16 @@ class account_configuration(osv.osv_memory): ('no_tax', 'No Tax'), ('global_on_order', 'Global On Order'), ('on_order_line', 'On Order Lines'), - ], 'Taxes', required=True, - help = """ - This allows you to set tax policy to sale order. - if you want to set global tax on sale order then select Global On Order it will add 'Global On Order' group to employees. - if you want to set tax On Order Lines then select On Order Lines it will add 'On Order Lines' group to employees. + ], 'Taxes', required=True, + help=""" + If you want to apply global tax on sale order then select 'Global On Order' it will add 'Global On Order' group to employees. + If you want to apply different taxes for sale order lines then select 'On Order Lines' it will add 'On Order Lines' group to employees. """), 'tax_value': fields.float('Value'), } _defaults = { - 'tax_policy': 'global_on_order', + 'tax_policy': 'global_on_order', } def get_default_tax_policy(self, cr, uid, ids, context=None): @@ -52,14 +51,14 @@ class account_configuration(osv.osv_memory): else: applied_groups.update({'tax_policy': 'no_tax'}) return applied_groups - + def _check_default_tax(self, cr, uid, context=None): ir_values_obj = self.pool.get('ir.values') for tax in ir_values_obj.get(cr, uid, 'default', False, ['product.product']): if tax[1] == 'taxes_id': return tax[2] return False - + def default_get(self, cr, uid, fields_list, context=None): ir_values_obj = self.pool.get('ir.values') res = super(account_configuration, self).default_get(cr, uid, fields_list, context=context) @@ -75,7 +74,7 @@ class account_configuration(osv.osv_memory): if self._check_default_tax(cr, uid, context) and res['fields'].get('tax_value'): res['fields']['tax_value'] = {'domain': [], 'views': {}, 'context': {}, 'selectable': True, 'type': 'many2one', 'relation': 'account.tax', 'string': 'Value'} return res - + def set_tax_policy(self, cr, uid, ids, vals, context=None): data_obj = self.pool.get('ir.model.data') users_obj = self.pool.get('res.users') @@ -103,30 +102,10 @@ class account_configuration(osv.osv_memory): users_obj.write(cr, uid, [uid], {'groups_id': [(3,remove_group_id)]}) ir_values_obj.set(cr, uid, 'default', False, 'groups_id', ['res.users'], [(3,remove_group_id)]) else: - groups = [order_group_id, remove_group_id] + groups = [order_group_id, order_line_group_id] for group_id in groups: groups_obj.write(cr, uid, [user_group_id], {'implied_ids': [(3,group_id)]}) users_obj.write(cr, uid, [uid], {'groups_id': [(3,group_id)]}) ir_values_obj.set(cr, uid, 'default', False, 'groups_id', ['res.users'], [(3,group_id)]) - def set_tax_value(self, cr, uid, ids, vals, context=None): - chart_account_obj = self.pool.get('wizard.multi.charts.accounts') - acc_installer_obj = self.pool.get('account.installer') - chart_template_obj = self.pool.get('account.chart.template') - tax_obj = self.pool.get('account.tax') - chart_template_ids = chart_template_obj.search(cr, uid, [('visible', '=', True)], context=context) - taxes = [] - if chart_template_ids: - name = _('Tax %.2f%%') % vals.get('tax_value') - taxes = tax_obj.search(cr, uid, [('name', '=', name)], context=context) - check_default_taxes = self._check_default_tax(cr, uid, context) - if not check_default_taxes and not taxes: - installer_id = acc_installer_obj.create(cr, uid, {}, context=context) - acc_installer_obj.execute(cr, uid, [installer_id], context=context) - if chart_template_ids: - code_digits = chart_account_obj.onchange_chart_template_id(cr, uid, [], chart_template_ids[0], context=context)['value']['code_digits'] - object_id = chart_account_obj.create(cr, uid, {'code_digits': code_digits}, context=context) - chart_account_obj.execute(cr, uid, [object_id], context=context) - return check_default_taxes - account_configuration() \ No newline at end of file diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index 5558d5f3323..347c6c0c0c9 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -117,11 +117,13 @@ form - - - - - + + + + + + + diff --git a/addons/crm/res_config.py b/addons/crm/res_config.py index 7657982c93d..a86c2aabf4f 100644 --- a/addons/crm/res_config.py +++ b/addons/crm/res_config.py @@ -25,16 +25,12 @@ class crm_configuration(osv.osv_memory): _inherit = 'res.config' _columns = { - 'module_crm_caldav' : fields.boolean("Caldav synchronization", - help=""" - This allows you Caldav features in Meeting, Share meeting with other calendar clients like sunbird. - It installs crm_caldav module. - """), - 'module_fetchmail_crm': fields.boolean("Lead/Opportunity mail gateway", - help = """ - this allows you to configure your incoming mail server. - It installs fetchmail_crm module. - """), + 'module_crm_caldav' : fields.boolean("Use caldav to synchronize Meetings", + help="""This allows you Caldav features in Meeting, Share meeting with other calendar clients like sunbird. + It installs crm_caldav module."""), + 'module_fetchmail_crm': fields.boolean("Lead/Opportunity mail gateway", help=""" + This allows you to configure your incoming mail server, + It installs fetchmail_crm module."""), 'server' : fields.char('Server Name', size=256), 'port' : fields.integer('Port'), 'type': fields.selection([ @@ -99,7 +95,7 @@ class crm_configuration(osv.osv_memory): ir_values_obj = self.pool.get('ir.values') result = {} installed_modules = self.get_default_installed_modules(cr, uid, ids, context=context) - if 'fetchmail_crm' in installed_modules.keys(): + if 'module_fetchmail_crm' in installed_modules.keys(): for val in ir_values_obj.get(cr, uid, 'default', False, ['fetchmail.server']): result.update({val[1]: val[2]}) return result @@ -120,11 +116,11 @@ class crm_configuration(osv.osv_memory): model_obj = self.pool.get('ir.model') fetchmail_obj = self.pool.get('fetchmail.server') ir_values_obj = self.pool.get('ir.values') - if vals.get('fetchmail_crm'): - object_id = model_obj.search(cr, uid, [('model','=','crm.lead')])[0] + object_id = model_obj.search(cr, uid, [('model','=','crm.lead')]) + if vals.get('module_fetchmail_crm') and object_id: fetchmail_vals = { 'name': 'Incoming Leads', - 'object_id': object_id, + 'object_id': object_id[0], 'server': vals.get('server'), 'port': vals.get('port'), 'is_ssl': vals.get('is_ssl'), @@ -133,7 +129,7 @@ class crm_configuration(osv.osv_memory): 'password': vals.get('password') } server_ids = fetchmail_obj.search(cr, uid, []) - if not self.get_default_installed_modules(cr, uid, ['fetchmail_crm'], context) or not server_ids: + if not self.get_default_installed_modules(cr, uid, ids, context) or not server_ids: tt = fetchmail_obj.create(cr, uid, fetchmail_vals, context=context) else: fetchmail_ids = fetchmail_obj.search(cr, uid, [('name','=','Incoming Leads')], context=context) diff --git a/addons/crm/res_config_view.xml b/addons/crm/res_config_view.xml index 8fd35eb0ab5..46b3447c673 100644 --- a/addons/crm/res_config_view.xml +++ b/addons/crm/res_config_view.xml @@ -5,34 +5,34 @@ Sales Application res.config form - + - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -59,8 +59,11 @@ - + + + + \ No newline at end of file diff --git a/addons/plugin_outlook/plugin_outlook.xml b/addons/plugin_outlook/plugin_outlook.xml index 27fd8d6d11f..33a94dc2b42 100644 --- a/addons/plugin_outlook/plugin_outlook.xml +++ b/addons/plugin_outlook/plugin_outlook.xml @@ -52,9 +52,9 @@ Sales Application res.config form - + - +