Files
odoo_source/addons/mrp
Karnav Sojitra ad498a3b3b [FIX] mrp: create MO while location type is not in production
This issue occurs when the user tries to create a manufacturing order while the
location type of products is not in production.

steps to produce:
1. install mrp module
2. create a new company and switch to it
3. open inventory module > settings > enable storage locations >
save the changes > configuration > locations > virtual locations
4. now change the default location type from production to any other value
5. Try to create a manufacturing order and the error will be generated.

in mrp_production the location_by_company takes default 'usage' as production:
https://github.com/odoo/odoo/blob/012cfbf82717248631626cab73867fe0362cd59c/addons/mrp/models/mrp_production.py#L474-L477
Therefore, in above use case at time if triggering onchange/compute method, if
location type is not in production, location_by_company gets `Nonetype` which
will lead to above traceback.

sentry-4215242929

closes odoo/odoo#124261

X-original-commit: b07183fbfb938b67edb220f3b53f58053bde5aad
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-06-08 16:10:24 +02:00
..
…

Odoo Manufacturing Resource Planning

Manage Bill of Materials, plan manufacturing orders, track work orders with the Odoo Open Source MRP app.

Get all your assembly or manufacturing operations managed by Odoo. Schedule manufacturing orders and work orders automatically. Review the proposed planning with the smart kanban and gantt views. Use the advanced analytics features to detect bottleneck in resources capacities and inventory locations.

Schedule Manufacturing Orders Efficiently

Get manufacturing orders and work orders scheduled automatically based on your procurement rules, quantities forecasted and dependent demand (demand for this part based on another part consuming it).

Define Flexible Master Data

Get the flexibility to create multi-level bill of materials, optional routing, version changes and phantom bill of materials. You can use BoM for kits or for manufacturing orders.

Get Flexibility In All Operations

Edit manually all proposed operations at any level of the progress. With Odoo, you will not be frustrated by a rigid system.

Schedule Work Orders

Check resources capacities and fix bottlenecks. Define routings and plan the working time and capacity of your resources. Quickly identify resource requirements and bottlenecks to ensure your production meets your delivery schedule dates.

A Productive User Interface

Organize manufacturing orders and work orders the way you like it. Process next orders from the list view, control in the calendar view and edit the proposed schedule in the Gantt view.

Inventory & Manufacturing Analytics

Track the evolution of the stock value, according to the level of manufacturing activities as they progress in the transformation process.

Fully Integrated with Operations

Get your manufacturing resource planning accurate with it's full integration with sales and purchases apps. The accounting integration allows real time accounting valuation and deeper reporting on costs and revenues on your manufacturing operations.