diff --git a/account_statement_ext_voucher/__openerp__.py b/account_statement_ext_voucher/__openerp__.py index 5858012c..ab12bbd8 100644 --- a/account_statement_ext_voucher/__openerp__.py +++ b/account_statement_ext_voucher/__openerp__.py @@ -30,23 +30,20 @@ 'account_voucher' ], 'description': """ - This module is deprecated. It was only needed when using account_bank_statement_ext with voucher in order to compute the period - correctly. This is mainly because with account_bank_statement_ext, the period is computed for each line. - - Now, we include this in the account_statement_ext module and added a dependencies on account_voucher (mainly cause we can't get - rid of the voucher in version 7.0). - + This module is deprecated. It was only needed when using + account_bank_statement_ext with voucher in order to compute the period + correctly. This is mainly because with account_bank_statement_ext, the period + is computed for each line. + + Now, we include this in the account_statement_ext module and added a + dependencies on account_voucher (mainly cause we can't get rid of the voucher + in version 7.0). """, 'website': 'http://www.camptocamp.com', - 'init_xml': [], - 'update_xml': [ + 'data': [ "statement_voucher_view.xml", ], - 'demo_xml': [], - 'test': [], 'installable': False, - 'images': [], 'auto_install': False, 'license': 'AGPL-3', - } diff --git a/account_statement_ext_voucher/statement_voucher.py b/account_statement_ext_voucher/statement_voucher.py index 001e3d35..34d16e0f 100644 --- a/account_statement_ext_voucher/statement_voucher.py +++ b/account_statement_ext_voucher/statement_voucher.py @@ -32,10 +32,11 @@ class AccountVoucher(Model): context = {} if not context.get('period_id') and context.get('move_line_ids'): res = self.pool.get('account.move.line').browse( - cr, uid, context.get('move_line_ids'), context=context)[0].period_id.id + cr, uid, context.get('move_line_ids'), + context=context)[0].period_id.id context['period_id'] = res elif context.get('date'): - periods = self.pool.get('account.period').find( + periods = self.pool['account.period'].find( cr, uid, dt=context['date'], context=context) if periods: context['period_id'] = periods[0]