mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[WIP] Correct check for context.
This commit is contained in:
committed by
Stefan Rijnhart
parent
158ecaa401
commit
42bbc31d2b
@@ -29,7 +29,7 @@ class AccountBankStatementLine(orm.Model):
|
||||
def process_reconciliation(
|
||||
self, cr, uid, id, mv_line_dicts, context=None):
|
||||
"""Put marker in context to use period from date in move line."""
|
||||
ctx = context.copy() or {}
|
||||
ctx = context and context.copy() or {}
|
||||
ctx['override_period_from_date'] = True
|
||||
return super(AccountBankStatementLine, self).process_reconciliation(
|
||||
cr, uid, id, mv_line_dicts, context=ctx)
|
||||
|
||||
@@ -28,7 +28,7 @@ class AccountMoveLine(orm.Model):
|
||||
|
||||
def create(self, cr, uid, vals, context=None, check=True):
|
||||
"""If requested, override period from date."""
|
||||
ctx = context.copy() or {}
|
||||
ctx = context and context.copy() or {}
|
||||
if (('override_period_from_date' in ctx or
|
||||
'period_id' not in vals) and 'date' in vals):
|
||||
period_model = self.pool['account.period']
|
||||
|
||||
Reference in New Issue
Block a user