mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] account_statement_ext_voucher: Fix PEP8
This commit is contained in:
@@ -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',
|
||||
|
||||
}
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user