21099f3eaf7b01a4f605c49daea529210b599bf0
Issue 1 ------- - Set a product with: Inventory Valuation: Manual Costing Method: Average Cost (or Standard Price) - Receive 1 unit @ 10, set an owner In the 'Inventory Valuation' report, the product is valued @ 10 while no accounting entry was created. The system simply multiplies the available quantity by the cost price, without taking into account the ownership of the quants. Issue 2 ------- - Set a product with: Inventory Valuation: Automated Costing Method: Average Cost (or Standard Price) - Receive 1 unit @ 10, set an owner In the 'Inventory Valuation' report, the product is valued @ 10 while no accounting entry was created. Once again, the system simply multiplies the available quantity by the cost price, without taking into account the AML. Solution -------- A slight refactoring of the `_compute_stock_value` method is necessary to make consistent the the FIFO computation and the Standard / Average method: - in case of manual valuation, the quantity on stock moves are taken into account - in case of perpetual valuation, the quantity on AMLs is taken into account The method `_compute_quantities_dict` needs a minor change so a `False` value can be handled correctly. The FIFO method is slightly changed: - the quantity at date takes into account the owner - in case of perpetual valuation, AMLs are used instead of stock moves Bonus point: an error was discovered in `_create_account_move_line` thanks to the test `test_change_cost_method_1`. The forced quantity should follow the same sign logic than the product quantity. opw-1849535
…
…
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%