diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index 3930b9b3e11..94f023e0cab 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__terp__.py @@ -35,9 +35,7 @@ Customer and Supplier Invoices Bank statements """, - 'author': 'Tiny', 'website': 'http://www.openerp.com', - 'depends': ['product', 'base', 'process'], 'init_xml': [], 'update_xml': [ 'security/account_security.xml', diff --git a/addons/account/account.py b/addons/account/account.py index b6dd4bfb11b..bfd48d55b00 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2152,7 +2152,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): for key,value in todo_dict.items(): if value['account_collected_id'] or value['account_paid_id']: - obj_acc_tax.write(cr, uid, [key], vals={ + obj_acc_tax.write(cr, uid, [key], { 'account_collected_id': acc_template_ref[value['account_collected_id']], 'account_paid_id': acc_template_ref[value['account_paid_id']], }) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 56c4ddba96e..63baf5165e4 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -124,7 +124,7 @@ class account_bank_statement(osv.osv): states={'confirm':[('readonly', True)]}), 'move_line_ids': fields.one2many('account.move.line', 'statement_id', 'Entry lines', states={'confirm':[('readonly',True)]}), - 'state': fields.selection([('draft', 'Draft'),('confirm', 'Confirm')], + 'state': fields.selection([('draft', 'Draft'),('confirm', 'Confirmed')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"), 'currency': fields.function(_currency, method=True, string='Currency', @@ -157,7 +157,7 @@ class account_bank_statement(osv.osv): if not st.state=='draft': continue - if not (abs(st.balance_end - st.balance_end_real) < 0.0001): + if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001): raise osv.except_osv(_('Error !'), _('The statement balance is incorrect !\n') + _('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end)) @@ -578,11 +578,13 @@ class account_bank_statement_line(osv.osv): 'note': fields.text('Notes'), 'reconcile_amount': fields.function(_reconcile_amount, string='Amount reconciled', method=True, type='float'), + 'sequence': fields.integer('Sequence'), } _defaults = { 'name': lambda self,cr,uid,context={}: self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement.line'), 'date': lambda *a: time.strftime('%Y-%m-%d'), 'type': lambda *a: 'general', + 'sequence': lambda *a: 10, } account_bank_statement_line() diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 6d14f25427c..d7ca374a64c 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -179,7 +179,7 @@ -