[FIX] add missing date field, it's a related field and should be added automatically with the same value of the move date

This commit is contained in:
Sébastien BEAU
2017-12-12 12:10:28 +01:00
committed by Yannick Vaucher
parent 5f6847fe95
commit beb76b3bf7

View File

@@ -233,6 +233,7 @@ class AccountJournal(models.Model):
values['company_currency_id'] = self.company_id.currency_id.id
values['journal_id'] = self.id
values['move_id'] = move.id
values['date'] = move.date
if not values.get('account_id', False):
values['account_id'] = self.receivable_account_id.id
values = move_line_obj._add_missing_default_values(values)