Skip to content

Commit

Permalink
[FIX][account_fiscal_year_closing] fix create and write
Browse files Browse the repository at this point in the history
  • Loading branch information
matteoopenf committed Jul 13, 2022
1 parent ee16e44 commit 657ffc0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions account_fiscal_year_closing/models/account_fiscalyear_closing.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,19 @@ class AccountFiscalyearClosingMapping(models.Model):
string="Destination account",
)

@api.model
def create(self, vals):
if 'dest_account_id' in vals:
vals['dest_account_id'] = vals['dest_account_id'][:1]
res = super(AccountFiscalyearClosingMapping, self).create(vals)
return res

def write(self, vals):
if 'dest_account_id' in vals:
vals['dest_account_id'] = vals['dest_account_id'][:1]
res = super(AccountFiscalyearClosingMapping, self).write(vals)
return res

def dest_move_line_prepare(self, dest, balance, partner_id=False):
self.ensure_one()
move_line = {}
Expand Down

0 comments on commit 657ffc0

Please sign in to comment.