Modularize the code of Inventory.complete_lines() to allow better extensions
The current code of Inventory.complete_lines() is very monolytic.
It creates the the lines and then, if some key field is added, it must to be added after create lines, or recomputed as it is done in stock_lot.
This way is not the better one and it doesn't work when there is a new required field in inventory lines.