The former cost of a stock.valuation.adjustment.lines line is the sum
of cost * qty of each quant linked to the stock.move record linked to
this line (with the field 'move_id').
opw:648922
When a landed costs is applied on goods that are already out, these landed
costs need to be subtracted in the stock valuation account and added in the output account.
(they were just added before)
When the landed cost is negative, it needs to do the opposite for what is already out also.
When splitting landed costs against the picking line, the decimal
precision was not taken into account.
For example: with a landed cost of 5.01 split equally over two lines,
the cost for each line is 2.505 which is rounded to 2.51 with a decimal
precision of the fractional part of 2. Hence the total was wrongly of
5.02 (which is an issue when wanted to validate the landed costs).
With this commit, the split landed costs are restrained to stay under
the whole landed cost price.
closes#6882fixes#5568
opw-639503
- Support negative costs by creating reverse valuation move,
and undoing the quant computation.
This may or may not produce the exact reverse effect on
the quant, as it depends on the rounding of the unit
cost, which uses decimal precision 'Account'
- Hide 'compute' button when cost is not draft
- Forbid cancel of posted cost
- Forbid deletion of cost if not draft
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
[MERGP] Inline Searchview
This task split the searchview in two parts: SearchView and SearchViewDrawer. The drawer is displayed inside the main view and the searchview stays in place. It also changes the scrolling behavior of the web client: the main view area can scroll without affecting the UI (so the various menus stays in place)
Because of this, other large changes have been made:
the drawer has been redesigned,
the Custom Filter widget has been split in two (Custom Report and SaveCurrentFilter),
the main view is now scrollable, so the UI stays in place and only the view can change
The text 'Group By...' has been changed into 'Group By' (most addons had to be modified)
bootstrap classes are used when it makes sense (for example, badge)
the left menu is also scrollable (separately from the main view)
It is likely that some stupid bugs have been introduced. Please don't hurt me.