diff options
| author | jem-odoo <jem@openerp.com> | 2018-06-13 14:24:34 +0200 |
|---|---|---|
| committer | jem-odoo <jem@openerp.com> | 2018-08-02 16:12:39 +0200 |
| commit | a9658d5bf58bf2a9e906e2684f87d39e19e745c7 (patch) | |
| tree | c3925dd5912cbd63b95248a7f42615ea2ae12f8b /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 255e66695a74c433c1e579d86a8e5640ca04241f (diff) | |
[IMP] sale: untaxed amount to invoice/invoiced on sale line
Similar fields were introduced at d2e33ba57c0517b88f3cdf987f6b161883b8272e
but their computation were not totally exact, so someone removed them.
Also, for performance sake, they were replaced by a (too) simpler
calculation at 39d0613187d36f16c541734e80925e9d.
Turns out, those fields were usefull !
Neither of those 2 implementations were 100% correct, so this commit
reintroduced thoses 2 fields on sale.order.line object:
1/ untaxed_amount_invoiced: will contain the amount (money without
taxes) invoiced
from the sale line, taking refund linked to the same SO line into
account. The formula is
SUM(inv_line.price_subtotal) - SUM(ref_line.price_subtotal)
where
`inv_line` is a customer invoice line linked to the SO line
`ref_line` is a customer credit note (refund) line linked to the SO
line
2/ untaxed_amount_to_invoice: will contain the amount (taxes excluded)
of the money to invoice from this sale line. The formula is
SOL.total - SOL.untaxed_amount_invoiced
Those numbers are interesting in reporting, and to manage the billing
part for salespersons.
Task #1857652
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
