Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Prevent MO from being planned over work center off time

Subscriure's

Get notified when there's activity on this post

This question has been flagged
manufacturingplanning17.0+e
2 Respostes
3807 Vistes
Avatar
Cédric Paradis

Hi,

We're using V17e on prem.

I was wondering if there was a way to prevent Manufacturing orders / work orders being planned during the off hours of the work centers' schedules.

Our processes have to be completed in one go, without any break during runs.

Exemple of what Odoo is currently planning:

The wanted behavior would be for USINE/MO/28859 to be delayed until 8AM instead of starting the day before then having to stop for the night.

The work center is configured with a working hours schedule.

Is there any way to achieve the wanted behavior in vanilla Odoo?

0
Avatar
Descartar
RAFAEL EDUARDO VILLEGAS

I believe the only way is to manually plan the manufacturing orders. 
By default, almost all systems will begin one MO after another.

Avatar
Gracious Joseph
Best Answer

To prevent Manufacturing Orders (MOs) or Work Orders from being scheduled during off-hours in Odoo (v17e) and ensure that operations respect the work center's defined working hours, follow these steps:

1. Understand the Issue

Odoo’s default planning engine for MOs and Work Orders tries to optimize for the earliest available start time. However, it does not automatically restrict operations to occur only within a work center’s scheduled hours unless additional configuration or logic is applied.

2. Configure Work Center Operating Hours

  1. Set Work Center Working Hours:
    • Navigate to Manufacturing > Configuration > Work Centers.
    • Select the work center (e.g., USINE).
    • Under the Working Hours field, assign the correct schedule (e.g., 8 AM to 5 PM).
  2. Verify the Schedule:
    • Go to Settings > Technical > Resources > Working Hours.
    • Check that the working hours (e.g., 8 AM - 5 PM) and breaks (if any) are correctly defined.

3. Use the "One Work Order at a Time" Option

  1. Configure Work Center Rules:
    • Open the work center configuration and enable One Work Order at a Time.
    • This ensures that only one work order is scheduled in the work center at a time, preventing overlapping jobs.
  2. Ensure Capacity and Duration Align:
    • For each manufacturing process, check that the duration of operations matches the work center’s schedule.
    • Navigate to Manufacturing > Configuration > Operations and adjust the operation times if necessary.

4. Use the "Scheduling with Constraints" Feature

Odoo Enterprise includes tools to handle constraints in scheduling.

  1. Enable Advanced Planning Options:
    • Navigate to Settings > Manufacturing.
    • Enable Work Order Dependencies or Planning by Work Centers if they aren’t already enabled.
  2. Ensure Dependencies are Correctly Configured:
    • For each operation, set up dependencies to ensure proper sequencing.
    • Go to the Bill of Materials (BoM) and define the dependencies in the Operations tab.
  3. Configure Work Center Schedules in Operations:
    • In the Routing linked to your BoM, ensure the work center’s schedule is assigned.

5. Automatically Adjust Planning to Working Hours

Odoo's planning logic might require adjustments to prevent jobs from being split across off-hours. You can achieve this in one of two ways:

Option A: Manual Adjustment

  • Use the Gantt view in the Manufacturing module:
    • Navigate to Manufacturing > Planning > Work Centers.
    • Drag and drop operations to align with work center hours.

Option B: Customization (Automated Adjustment)

  • Use Python and Odoo Studio to create logic that prevents MOs from being scheduled outside working hours. Here’s an example:
Python Code:
from odoo import models, fields, api
from datetime import timedelta

class MrpWorkOrder(models.Model):
    _inherit = 'mrp.workorder'

    @api.model
    def schedule_with_working_hours(self):
        for workorder in self:
            work_center = workorder.workcenter_id
            working_hours = work_center.resource_calendar_id
            planned_start = workorder.date_planned_start

            # Adjust start time to align with work center working hours
            if not working_hours.is_work_time(planned_start):
                next_work_time = working_hours.plan_hours(0, planned_start)
                workorder.date_planned_start = next_work_time
                workorder.date_planned_finished = next_work_time + timedelta(hours=workorder.duration_expected)
  • This logic checks if the planned start time aligns with working hours. If not, it shifts the start time to the next available working hour.

6. Test the Setup

  1. Create a New MO:
    • Ensure that the work order is planned within the configured work center hours.
    • If using customizations, verify that the MOs adjust automatically to fit working hours.
  2. Simulate Edge Cases:
    • Test scenarios where the operation duration exceeds the remaining working hours in the day.
    • Confirm that Odoo schedules the next part of the operation to the following working day.

7. Conclusion

In vanilla Odoo, while some adjustments can be made using configurations like working hours, dependencies, and the Gantt view, full automation of this behavior might require minor customization. Using the provided solutions, you can:

  1. Restrict scheduling to work center hours.
  2. Adjust the planning logic manually or automatically to align with defined schedules.

Let me know if you'd like further assistance with implementing any of these configurations or customizations!

-1
Avatar
Descartar
Harishankar Unnikrishnan (hun)

Hey Gracious,

I was reviewing this forum post for a client of mine and I noticed something in your solution that I cannot find.

You mention, "Open the work center configuration and enable One Work Order at a Time." However, this is not a configuration that exists on the work center level. Can you please throw some light on this particular setting?

Gracious Joseph

Hey! Good catch — and you're absolutely right to question that.

The setting "One Work Order at a Time" is not located on the Work Center form directly, but rather it's a configuration that applies to Routing Operations, and it depends on the version of Odoo you're working with.

Here's the breakdown:

In Odoo 15+:

The "One Work Order at a Time" checkbox is indeed part of the Routing Operation, not the Work Center.

To find it:

1. Go to Manufacturing > Configuration > Operations > Routings (Make sure Developer Mode is ON).

2. Open a Routing and check the Operations under it.

3. In each operation line, there will be a checkbox labeled “One Work Order at a Time”.

4. That setting prevents Odoo from scheduling multiple work orders for that operation simultaneously at the same work center.

It’s easy to assume it’s a Work Center setting because it’s tightly linked with how Work Orders get scheduled, but the actual constraint is enforced at the routing operation level.

---

Additional Tip:

If your client wants to enforce this across the board for a specific Work Center, you’d have to manually or programmatically ensure that all routing operations using that Work Center have this box checked.

Harishankar Unnikrishnan (hun)

Thanks for the response, Gracious!

I know what you are referring to, but Routings is no longer part of Oodo manufacturing. That was something we had in v14, and we are currently in v18 with v19 releasing later this year. Instead of routings, you directly assign Operations to BOMs, with each Operation being tied to a Work Center. We don't do it through routings anymore.

Looks like this "One Work order at a time" is also done away with because I cannot find the field in the list of fields under technical settings. I assumed your answer was on the latest version since it was posted a couple of months back, but as I understand it, this is the workflow for versions prior to v15.

Please feel free to correct me if I'm wrong. Thanks!

Gracious Joseph

Hey! You're absolutely right—and you nailed the key differences across the versions. 👏

You're spot on that Routings were deprecated after v14, and since Odoo 15, the manufacturing flow was simplified. Now, Operations are directly tied to the Bill of Materials (BoM) and each Operation specifies its own Work Center, making it easier to manage and visualize the production flow without relying on a separate Routing object.

So yes—no more Routings as standalone entities from v15 onwards. The BoM now contains the Operations directly, and those Operations are fully configurable, including:

Work Center assignment

Duration computations

Operator tracking

Subcontracting options (if enabled)

Regarding “One Work Order at a Time”:
You’re again correct that the "One Work Order at a Time" field, which used to exist on the Work Center model (mrp.workcenter) to enforce serialized production, is no longer present in the interface or model as of v18.

This field was useful in older versions when companies wanted to avoid overlapping work orders on the same Work Center. In the modern flow:

Odoo instead relies more on Scheduling Conflicts, Capacity Planning, and Work Center Capacity (Number of units per cycle, time per unit, etc.).

To control concurrency, you're expected to manage this either through Work Center capacity settings or custom logic if you want serialized work order handling.

For v18+ Alternatives:
If you need to enforce "one work order at a time" behavior, a couple of options exist:

Set the Work Center Capacity to 1:

Go to the Work Center

Set Capacity to 1

This way, even though the field is gone, scheduling will naturally space work orders sequentially.

Customize Work Center Behavior via Studio or Code:

Add a constraint on scheduling work orders in custom logic

Example: block scheduling if a WO is already running on that Work Center.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
How can I plan my MO's back from my delivery date (with lead times) instead of forward?
manufacturing planning
Avatar
Avatar
1
de maig 25
2181
Sub Manufacturing orders planning Solved
manufacturing planning
Avatar
Avatar
2
de juny 23
3411
Parent Work order
manufacturing planning
Avatar
0
de des. 21
2930
Available and Capable to Promise in sales and manufacturing module
sales manufacturing planning
Avatar
Avatar
1
d’ag. 24
3910
Register production at different manufacturing operation Solved
manufacturing shopfloor 17.0+e
Avatar
Avatar
Avatar
2
d’ag. 24
1925
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now