2915f6da6d832ad0f2f8402bb3abe1e8139604b5
Steps to reproduce issue:
1. Create a Product with Lots/Serials tracking
2. Create a BoM with an operation and add Product as By-Product
3. Create a Manufacturing Order using the BoM, click on Confirm then Plan
4. Go to Shop Floor, click on "Register [the By-Product]"
- Not the button with the units
5. Click on either "Import Lots" or "Generate Serials"
6. Enter a Lot/Serial number and click on "Generate"
7. Traceback error:
> loc_dest = self.env['stock.location'].browse(default_vals['location_dest_id'])
> KeyError: 'location_dest_id'
Explanation:
When going through the Shop Floor, the context is missing a lot of elements that are normally passed in the manufacturing order form.
https://github.com/odoo/odoo/blob/338173e231355d265ddc88bcef5e9b0a608e248e/addons/mrp/views/mrp_production_views.xml#L432-L437
Suggested fix:
`default_dest_location_id` is the missing element causing the traceback but `default_location_id` is also required to create a `stock_move_line`.
Fix in Community, test in Enterprise.
opw-3719439
closes odoo/odoo#155846
Related: odoo/enterprise#57789
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
…
…
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%