diff options
| author | jem-odoo <jem@openerp.com> | 2017-11-15 14:08:08 +0100 |
|---|---|---|
| committer | jem-odoo <jem@openerp.com> | 2017-11-17 10:01:00 +0100 |
| commit | 7a951d7085120e6376d649d6800d9833b49fdc51 (patch) | |
| tree | 2821279f4219682a1ef90443fc51c0defea31a87 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 93aea80cdf09f2ae2961fca4b3ac6f1408be9bf0 (diff) | |
[FIX] sale: to invoice/invoiced amounts for delivered policy
This commits make the computation of amount to invoice
and amout already invoiced on sale order line works
with invoice policy based on delivered quantities.
Before this, the upselling of delivered quantities
was not working: you were seeing the upsell amount
in the amount to invoice (qty delivered > qty ordered).
Notes:
- When a product is not delivered (qty delivered = 0), its
amount to invoice is zero too
- Draft invoice are not take into account really; they are
included at sale order price (discount on draft invoice does
not impact amounts to invoice/invoiced)
Also, when a SO in state 'draft' or 'cancel', its amount
to invoice should be zero, but its invoiced amount should
take all validated invoices into account.
Finally, more correct trigger are set on the compute
method, to trigger recomputation on right moment.
This commit also compute the 2 amount fields as sudo, since
the amount should not be dependent of access right of current
user.
To check those different points, this commit provide some
more tests with ordered and delivered product, SO cancelling,
upselling or delivery, ...
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
