A byproduct is a produced when producing another product (the targetted
product).
A move can be linked to another move. eg: we could have a manufacturing
order of 3 units linked to a move of a delivery order of these 3 units.
If we produce 2 units, the manufacturing order is split in 2 units and
1 units, and the delivery order is split similarily because of the link
1. [T manufacturing move split] -> [T delivery move split]
(T is the targetted product, B is the byproduct)
But in 8c307d7b1 a move_dest_id of a byproduct was linked to the targetted
product delivery move, thus in some situation the move of the delivery
order of the byproduct would erroneously be split 2 times instead of one.
1. [B manufacturing move split] -> [T delivery move split]
2. [T manufacturing move split] -> [T delivery move split]
This could also be the source of other issue, and since the byproduct
and targetted product are different, the link should anyway not be done.
opw-697151
note: this change is already in 10.0 (it is inside mrp refactoring 2ddc35a53)
In commit 43977deb7 a mrp.bom was transformed from a recursive model
which may contains BoMs containing BoMs and so on, to a simpler model
containing a line of products (mrp.bom containing mrp.bom.line).
mrp_byproduct wasn't changed to reflect on this change which caused an
error.
Since there is no product Unit of Sale on a byproduct, the current
behaviour causing the error of trying to multiply based on the Unit of
Sale of the BoM product has been removed.
closes#7806
opw-645639
opw-645640
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes