diff --git a/addons/account/__terp__.py b/addons/account/__openerp__.py similarity index 82% rename from addons/account/__terp__.py rename to addons/account/__openerp__.py index dfc22a2d5fe..cf2dfef7f78 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__openerp__.py @@ -54,8 +54,24 @@ module named account_voucherss 'wizard/account_move_line_reconcile_select_view.xml', 'wizard/account_move_journal_view.xml', 'account_wizard.xml', + 'wizard/account_open_closed_fiscalyear_view.xml', 'wizard/account_move_line_unreconcile_select_view.xml', + 'wizard/account_vat_view.xml', + 'wizard/account_print_journal_view.xml', + 'wizard/account_general_journal_view.xml', + 'wizard/account_central_journal_view.xml', 'wizard/account_subscription_generate_view.xml', + 'wizard/account_fiscalyear_close_view.xml', + 'wizard/account_state_open_view.xml', + 'wizard/account_journal_select_view.xml', + 'wizard/account_change_currency_view.xml', + 'wizard/account_validate_move_view.xml', + 'wizard/account_statement_from_invoice_view.xml', + 'wizard/account_pay_invoice_view.xml', + 'wizard/account_unreconcile_view.xml', + 'wizard/account_invoice_state_view.xml', + 'wizard/account_use_model_view.xml', + 'wizard/account_partner_balance_report_view.xml', 'project/wizard/project_account_analytic_line_view.xml', 'account_view.xml', 'account_end_fy.xml', diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index e0a316ae2a1..deb010c7cd0 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -27,6 +27,26 @@ from tools.misc import currency from tools.translate import _ class account_bank_statement(osv.osv): + + def button_import_invoice(self, cr, uid, ids, context=None): + mod_obj = self.pool.get('ir.model.data') + if context is None: + context = {} + model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_account_statement_from_invoice')], context=context) + resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] + context.update({'statement_id': ids[0]}) + return { + 'name': _('Import Invoice'), + 'context': context, + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': 'account.statement.from.invoice', + 'views': [(resource_id,'form')], + 'type': 'ir.actions.act_window', + 'target': 'new', + 'nodestroy': True + } + def _default_journal_id(self, cr, uid, context={}): if context.get('journal_id', False): return context['journal_id'] @@ -352,7 +372,16 @@ class account_bank_statement(osv.osv): raise osv.except_osv(_('Invalid action !'), _('Cannot delete bank statement which are already confirmed !')) osv.osv.unlink(self, cr, uid, unlink_ids, context=context) return True - + + def copy(self, cr, uid, id, default=None, context=None): + if default is None: + default = {} + if context is None: + context = {} + default = default.copy() + default['move_line_ids'] = [] + return super(account_bank_statement, self).copy(cr, uid, id, default, context) + account_bank_statement() diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index feeb38dd51b..5ef07f6c88b 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -54,13 +54,13 @@ - - + + - - + + - + @@ -94,11 +94,11 @@ form
- + - - - + + + @@ -115,7 +115,7 @@ tree - + @@ -142,14 +142,16 @@ - - - - + + + + + + - - - + + +