diff --git a/addons/account/account.py b/addons/account/account.py index 790d9adc15c..0d77cc2de9b 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -289,8 +289,6 @@ class account_account(osv.osv): 'check_history': fields.boolean('Display History', help="Check this box if you want to print all entries when printing the General Ledger, "\ "otherwise it will only print its balance."), - 'merge_invoice': fields.boolean('Merge Invoice Entries',help="Check this box if you want that all lines of "\ - "a customer or supplier invoice using this account are created in one line only"), } def _default_company(self, cr, uid, context={}): @@ -2071,8 +2069,8 @@ class wizard_multi_charts_accounts(osv.osv_memory): vals_journal['code'] = _('SAJ') if obj_multi.chart_template_id.property_account_receivable: - vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_receivable.id] - vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_receivable.id] + vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_income_categ.id] + vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_income_categ.id] obj_journal.create(cr,uid,vals_journal) @@ -2082,8 +2080,8 @@ class wizard_multi_charts_accounts(osv.osv_memory): vals_journal['code']=_('EXJ') if obj_multi.chart_template_id.property_account_payable: - vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_payable.id] - vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_payable.id] + vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_expense_categ.id] + vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_expense_categ.id] obj_journal.create(cr,uid,vals_journal) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 600114e90bd..41fc73ca29d 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -130,7 +130,6 @@ - diff --git a/addons/account/invoice.py b/addons/account/invoice.py index f6cccdcf2f0..c80cda3fe6d 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -431,7 +431,6 @@ class account_invoice(osv.osv): def action_move_create(self, cr, uid, ids, *args): ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') - acc_obj = self.pool.get('account.account') self.button_compute(cr, uid, ids, context={}, set_total=False) for inv in self.browse(cr, uid, ids): if inv.move_id: @@ -479,11 +478,7 @@ class account_invoice(osv.osv): # create one move line for the total and possibly adjust the other lines amount total = 0 total_currency = 0 - key_line=[] for i in iml: - if 'account_id' in i and 'taxes' in i: - if not (i['account_id'],i['taxes']) in key_line: - key_line.append((i['account_id'],i['taxes'])) if inv.currency_id.id != company_currency: i['currency_id'] = inv.currency_id.id i['amount_currency'] = i['price'] @@ -504,36 +499,6 @@ class account_invoice(osv.osv): acc_id = inv.account_id.id name = inv['name'] or '/' - iml_temp=[] - move_list=[] - - for item in key_line: - move_temp={} - if acc_obj.browse(cr,uid,item[0]).merge_invoice: - repeat=False - for move_line in iml: - if (move_line.has_key('account_id') and move_line['account_id']==item[0]) and ('taxes' in move_line and move_line['taxes']==item[1]): - move_list.append(move_line) - if repeat: - for key in move_line: - if key in ['name','amount_currency','price_unit','price','quantity']: - if key=='name': - move_temp[key]=move_temp[key] + "," +move_line[key] - else: - move_temp[key] +=move_line[key] - else: - for key in move_line: - move_temp[key]=move_line[key] - repeat=True - if move_temp: - iml_temp.append(move_temp) - - if len(iml_temp) - [[ format(l.note) or removeParentNode('tr') ]] + [[ format(l.note or removeParentNode('tr')) ]] @@ -541,7 +541,7 @@ - [[ format(o.comment) or removeParentNode('blockTable') ]] + [[ format(o.comment or removeParentNode('blockTable')) ]] @@ -551,7 +551,7 @@ - [[ format(o.payment_term and o.payment_term.note) or removeParentNode('blockTable') ]] + [[ format(o.payment_term and o.payment_term.note or removeParentNode('blockTable')) ]] @@ -559,4 +559,4 @@ - \ No newline at end of file + diff --git a/addons/account_report/account.py b/addons/account_report/account.py index de8a42f712a..528409bf845 100644 --- a/addons/account_report/account.py +++ b/addons/account_report/account.py @@ -159,7 +159,6 @@ class account_report(osv.osv): ('other','Others')], 'Type', required=True), 'expression': fields.char('Expression', size=240, required=True), -# 'expression_status': fields.char('Status expression', size=240, required=True), 'badness_limit' :fields.float('Badness Indicator Limit', digits=(16,2),help='This Value depicts the limit of badness.'), 'goodness_limit' :fields.float('Goodness Indicator Limit', digits=(16,2),help='This Value depicts the limit of goodness.'), 'parent_id': fields.many2one('account.report.report', 'Parent'), @@ -204,10 +203,7 @@ class account_report(osv.osv): return self.name_get(cr, user, ids, context=context) _constraints = [ - #TODO Put an expression to valid expression and expression_status - ] - _sql_constraints = [ - ('code_uniq', 'unique (code)', 'The code of the report entry must be unique !') + #TODO Put an expression to valid expression ] account_report() diff --git a/addons/base_module_quality/base_module_quality.py b/addons/base_module_quality/base_module_quality.py index 0477e201cbb..b50ad8d20b0 100644 --- a/addons/base_module_quality/base_module_quality.py +++ b/addons/base_module_quality/base_module_quality.py @@ -23,6 +23,7 @@ import pooler import os import osv from tools import config +from tools.translate import _ class abstract_quality_check(object): ''' @@ -52,24 +53,28 @@ class abstract_quality_check(object): #Used to provide more details if necessary. self.result_details = "" - #This bool defines if the test can be run only if the module is installed. + #This bool defines if the test can be run only if the module + #is installed. #True => the module have to be installed. #False => the module can be uninstalled. self.bool_installed_only = True - #This variable is use to make result of test should have more weight (Some tests are more critical than others) + #This variable is used to give result of test more weight, + #because some tests are more critical than others. self.ponderation = 1.0 #Specify test got an error on module self.error = False - #The tests have to subscribe itselfs in this list, that contains all the test that have to be performed. + #The tests have to subscribe itselfs in this list, that contains + #all the test that have to be performed. self.tests = [] - self.list_folders = os.listdir(config['addons_path']+'/base_module_quality/') + self.list_folders = os.listdir(config['addons_path'] + + '/base_module_quality/') for item in self.list_folders: self.item = item path = config['addons_path']+'/base_module_quality/'+item - if os.path.exists(path+'/'+item+'.py') and item not in ['report', 'wizard', 'security']: + if os.path.exists(path + '/' + item + '.py') and item not in ['report', 'wizard', 'security']: item2 = 'base_module_quality.' + item +'.' + item x = __import__(item2) x2 = getattr(x, item) @@ -87,7 +92,8 @@ class abstract_quality_check(object): def get_objects(self, cr, uid, module): # This function returns all object of the given module.. pool = pooler.get_pool(cr.dbname) - ids2 = pool.get('ir.model.data').search(cr, uid, [('module','=', module), ('model','=','ir.model')]) + ids2 = pool.get('ir.model.data').search(cr, uid, + [('module', '=', module), ('model', '=', 'ir.model')]) model_list = [] model_data = pool.get('ir.model.data').browse(cr, uid, ids2) for model in model_data: diff --git a/addons/base_module_quality/base_module_quality_wizard.xml b/addons/base_module_quality/base_module_quality_wizard.xml index 467e7e7dc24..21986b49959 100644 --- a/addons/base_module_quality/base_module_quality_wizard.xml +++ b/addons/base_module_quality/base_module_quality_wizard.xml @@ -2,6 +2,7 @@ + Results of Quality Checks @@ -45,7 +46,8 @@ - +