Skip to content

Commit

Permalink
fixed error while creating new record on account.invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
yibudak committed Sep 7, 2021
1 parent 4996eaf commit d409a71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion account_invoice_export/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _compute_amount_tl(self):
currency_obj = self.env['res.currency'].browse(self.currency_id.id)
currency_try = self.env['res.currency'].search([('name', '=', 'TRY')], limit=1)
company = self.env['res.company'].browse(1)
date = self.date_export or self.date_invoice
date = self.date_export or self.date_invoice or datetime.now()
self.amount_total_tl = currency_obj._convert(self.amount_total, currency_try, company, date)
self.amount_tax_tl = currency_obj._convert(self.amount_tax, currency_try, company, date)
self.amount_untaxed_tl = currency_obj._convert(self.amount_untaxed, currency_try, company, date)

0 comments on commit d409a71

Please sign in to comment.