Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4058 Visualizzazioni

I have set my outgoing shipment configuration as "Bring goods to output location before shipping (Pick + Ship), it works fine, but when I want to switch the configuration to "Ship directly from stock (Ship only)", it throws me an error in method "_get_mto_pull_rule" in stock module  as "IndexError: list index out of range". 

Does any one know what wrong going here?

Avatar
Abbandona
Risposta migliore
( To resolve this cleanly in Odoo (v16, v17, or v18).


Step 1: Check Warehouse Routes & Rules

  1. Go to Inventory → Configuration → Warehouses.
  2. Open your warehouse.
  3. Change the Outgoing Shipment strategy to "Ship directly from stock (Ship Only)".

Then, go to:

  • Inventory → Configuration → Routes
  • Search for routes with names like:
    • Make To Order
    • Your Warehouse: Delivery
    • Or custom routes that mention MTO, Ship, or Pick

For each route involved in shipping or MTO:

  1. Open it and go to the Rules tab.
  2. Ensure each rule has:
    • A valid source and destination location.
    • A defined action (e.g., Pull From, Push To).
    • Correct picking type (check Operation Type).

If _get_mto_pull_rule fails, it's usually because no rule with procure_method = make_to_order and location_src_id for the warehouse is found.


Step 2: Check Product Routes

  1. Go to Inventory → Products → Products.
  2. Choose a product that was involved in the failed delivery order.
  3. Under the Inventory tab, check if:
    • Routes contains "Make To Order" or custom MTO routes.
    • If yes, but you’ve now changed the warehouse to use “Ship Only”, either:
      • Uncheck Make To Order on the product, OR
      • Make sure a valid MTO pull rule exists for the warehouse.


Step 3: Fix or Reset the MTO Pull Rule

  1. Go to Inventory → Configuration → Routes.
  2. Find the Make To Order route (usually internal).
  3. Open its Rules.
  4. Make sure at least one rule is present with:
    • Procurement Method = Make To Order
    • Source Location = the Stock location of your warehouse
    • Destination Location = based on the process (could be customer or transit)
    • Operation Type = Delivery Order
    • If not present — create it manually.


Step 4: Developer Mode — Check Default Rule Logic

  • Sometimes when changing the warehouse configuration, the old rules are left but the warehouse expects different default pull/push logic.
  • You can go to Technical → Rules and clean up old pull/push rules that are no longer valid.


Step 5 : Restart Server & Upgrade Stock Module .


Thanks & Regards , 

Company :- DataInteger Consultancy Services LLP

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mag 25
59
2
apr 25
407
1
apr 25
3028
2
giu 24
7025
2
mar 15
4125