althaf shaik 44edf9c9ac [FIX] mrp: create workorder without workcenter
When user not seleted 'work center' and only selecting 'Scheduled Start
Date' and 'Scheduled End Date' while creating  'work_order' in
'mrp_production', this traceback raises.

To reproduce the issue:
1. Install 'mrp'
2. Activate 'Work Orders' in configuration/settings
3. Go to menuitem/operation and create 'Manufacturing Orders'
4. Select any product and add a line in Work Orders
5. Give values to 'Scheduled Start Date' and 'Scheduled End Date' only.

Error: A traceback appears:"ValueError: Expected singleton:
resource.calendar()"

On '_calculate_duration_expected' method resource_calendar_id value is
getting from 'workcenter_id'.
https://github.com/odoo/odoo/blob/36459d26f1adb92f92d52ce05329e8ad3e95dd91/addons/mrp/models/mrp_workorder.py#L399-L404
Therefore in the above use case, when triggering the onchnage method,
because of resource_calender is dependend on 'workcenter' and when
workcenter is not selected it will lead to the above traceback.

Sentry-4244804815

closes odoo/odoo#128643

X-original-commit: 102ba9a848162db0029ca639ea84a9319b80d278
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-17 12:06:27 +02:00
2023-07-12 11:19:58 +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%