Browse Source

[FIX] Function changed

pull/124/head
Sreejith P 7 years ago
parent
commit
1fc32169d7
  1. 6
      sale_discount_total/models/account_invoice.py

6
sale_discount_total/models/account_invoice.py

@ -38,8 +38,8 @@ class AccountInvoice(models.Model):
amount_untaxed_signed = self.amount_untaxed
if self.currency_id and self.currency_id != self.company_id.currency_id:
currency_id = self.currency_id.with_context(date=self.date_invoice)
amount_total_company_signed = currency_id.compute(self.amount_total, self.company_id.currency_id)
amount_untaxed_signed = currency_id.compute(self.amount_untaxed, self.company_id.currency_id)
amount_total_company_signed = currency_id._convert(self.amount_total, self.company_id.currency_id)
amount_untaxed_signed = currency_id._convert(self.amount_untaxed, self.company_id.currency_id)
sign = self.type in ['in_refund', 'out_refund'] and -1 or 1
self.amount_total_company_signed = amount_total_company_signed * sign
self.amount_total_signed = self.amount_total * sign
@ -99,4 +99,4 @@ class AccountInvoice(models.Model):
class AccountInvoiceLine(models.Model):
_inherit = "account.invoice.line"
discount = fields.Float(string='Discount (%)', digits=(16, 20), default=0.0)
discount = fields.Float(string='Discount (%)', digits=(16, 20), default=0.0)

Loading…
Cancel
Save