Touati Djamel (otd) 5e4dbe2616 [FIX] stock_account: remove AAL when changing qty of the component to 0
Steps to reproduce the bug:
- Create a storable product “P1” with BoM:
    - Component: "C1", cost: $100
- Create a Manufacturing Order to produce 1 unit of "P1":
    - Set any analytic account
    - Confirm and validate the MO
- An analytic account line is created for $100 of C1.
- Change the quantity of the component to 0.
- Try to save

Problem:
A traceback is triggered, because the `amount` and `unit_amount`
variables are used without assignment.

Solution:
Assign “0” value to both variable in the beginning of the function,
therefore the analytic account line will be deleted.

opw-3257240

closes odoo/odoo#128495

X-original-commit: 513e3dea2c838bb6f805c567069ea39406c6634e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-07-15 12:00:07 +02:00
2023-07-12 11:19:58 +02:00
…
2015-09-08 17:58:38 +02: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%