[16.0][FIX] account_cutoff_accrual_sale : Fixes for SO invoiced on order + [ADD] support for down payment
I added pleeeeenty of tests !
Covering:
- normal service on order : should be invoiced when SO is confirmed
- shipping service on order : should be invoiced when first stock delivery occurs (that's a specificity of delivery module https://github.com/odoo/odoo/blob/16.0/addons/delivery/models/sale_order.py#L155)
- stock product on order : should be invoiced when delivered (invoicing policy doesn't matter here, accrual is based on stock valuation change, i.e. the effective stock delivery)
cc @rousseldenis @lmignon @sbidoul
Also fixed account_cutoff_accrual_order_base that was updating stock in the test while not depending on stock module. Code moved to modules depending on this one and stock
Edit: I also added support for downpayment
@lmignon @rousseldenis This needs review
@alexis-via @sbidoul Can you merge this one?
@sbidoul and merge this one also
/ocabot merge minor
On my way to merge this fine PR! Prepared branch 16.0-ocabot-merge-pr-326-by-sbidoul-bump-minor, awaiting test results.
Congratulations, your PR was merged at cd99d1ba03fafcb8a983152bf74ede6ed997c812. Thanks a lot for contributing to OCA. ❤️