7a27d52d71bf2925284bb1a7bda8cc2a1918c30c
_is_* helpers
Before this commit, there were the `_is_in`, `_is_out`, `_is_dropshipped`
and `_is_dropshipped_returned` helpers on stock move. These methods were
called on the stock moves upon their validation to know if they should
be valued.
But the valuation of a stock move actually depends on its move lines[0].
These helpers weren't convenient enough since every cost method should
implement the logic to get the valud quantity (see _run_valuation and
_run_fifo).
We add helpers returning in and out move lines and `_is_in` and
`_is_out` to use these helpers to decide their return value.
We also expose a list of valued type (`_get_valued_types`) that will be
used in the move validation to check every `_is_*`helper without calling
them explicitely. Once we'll know the valued type of each move to
validate, we'll be able to call the methods actually doing something
with the valuation in batch. We prepare this in _action_done to lay the
foundation of the batch calls when the stock valuation layer will be
implemented.
We took the opportunity to fix an edge case of the consignment: if the
owner of a move is the company of the move, it should be valued.
[0] 48f4ce4afa
task-1875873
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
Then follow the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%