Improve methods customization of sale and purchase
Currently, the methods get_invoice_line and get_move are quite difficult to override to implement a new kind of shipment/invoice method because all the computation is done inside this unique method and it relies on the fact that only two methods are possible (if method1 else ...)
Indeed both methods in both model are based on the same design:
- test not line
- compute quantity to do
- remove quantity already done
- if quantity > 0, do
So the idea is to move the actual computations into specific methods that will always test the method (or return None).