|
@@ -41,17 +41,3 @@ class AccountInvoice(models.Model):
|
|
|
order.amount_tax = currency.round(amount_tax)
|
|
|
order.amount_untaxed = currency.round(amount_untaxed)
|
|
|
order.amount_total = currency.round(amount_tax + amount_untaxed)
|
|
|
-
|
|
|
-class AccountInvoiceLine(models.Model):
|
|
|
- _name = 'account.invoice.line'
|
|
|
- _inherit = 'account.invoice.line'
|
|
|
-
|
|
|
- price_subtotal = fields.Float(compute='_compute_price_subtotal')
|
|
|
-
|
|
|
- @api.depends('price_unit', 'quantity', 'discount')
|
|
|
- def _compute_price_subtotal(self):
|
|
|
- for line in self:
|
|
|
- price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
|
|
|
- taxes = line.invoice_line_tax_id.compute_all(price, line.quantity, line.product_id, line.invoice_id.partner_id)
|
|
|
- currency = line.invoice_id.currency_id.with_context(date=line.invoice_id.date_invoice or fields.Date.context_today(line.invoice_id))
|
|
|
- line.price_subtotal = currency.round(taxes['total'])
|