Touati Djamel (otd) 9bf1d5e47a [FIX] {stock,mrp}_account: ignore the type of inventory valuation in MO
Steps to reproduce the bug:
- Create a storable product “P1”:
     - Go to product category → set the inventory valuation to
     “Automated”
     - Create a BoM:
         - Add a component with the cost set to 10$
         - Add an analytic account
- Create a MO to produce one unit of “P1”:
    - Confirm the MO:
        - an analytic account line is created with the amount of $10
    - Mark as done the MO:
        - The amount is updated to $0

Problem:
In the case where the inventory valuation is set to “automated” we use
the analytical distribution since this commit:
https://github.com/odoo/odoo/blob/7e3403068fc3fbc40182b3cfeb80e97a9300e8ff/addons/account/models/account_move_line.py#L2326

but in the case of MO it shouldn't use it

Solution:
If we are in MO, ignore the type of inventory valuation

opw-3081877
opw-3086626

closes odoo/odoo#110478

X-original-commit: af7be17b71fc72d15149c4baabadeacdcf77cc99
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-20 09:40:52 +01:00
2022-12-13 17:03:17 +01:00
2023-01-03 13:16:02 +01:00
2023-01-19 18:50:06 +01:00
2023-01-03 13:16:02 +01:00
…
…
…
…
2023-01-03 13:16:02 +01:00
…
2023-01-03 13:16:02 +01:00

Build Status Tech Doc Help Nightly Builds

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, ...

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.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%