Modify method create_processing_move to accept an optional date for the account moves generated.

This commit is contained in:
Jordi Garcia 2018-01-19 16:18:47 +01:00
parent 87f59033ac
commit 7999cec1e5
1 changed files with 3 additions and 2 deletions

View File

@ -66,7 +66,7 @@ class Payment:
return group
def create_processing_move(self):
def create_processing_move(self, date=None):
pool = Pool()
Currency = pool.get('currency.currency')
Move = pool.get('account.move')
@ -82,7 +82,8 @@ class Payment:
if self.processing_move:
return self.processing_move
date = Date.today()
if date is None:
date = Date.today()
period = Period.find(self.company.id, date=date)
# compatibility with account_bank_statement_payment