Skip to Content
Menu
This question has been flagged

Using the subcontracting feature, it's possible to receive the subcontracted products before you have replenished the subcontractor with the required components.

How to allow the receipt of the subcontracted products only after the components have been resupplied at the subcontractor location?

Thanks

BR

Ricardo

(I know there are the very nice OCA module that solves the question, but how to solve it in a SaaS environment?)


Avatar
Discard

Did you ever find a solution to this, Ricardo?

Best Answer
We don't recommend this.
Allowing negative inventory (with good monitoring) reveals problems that need fixing—like mismatched transactions, theft, or process lags. If you block users, some issues may just get hidden instead of addressed.

If negative inventory is disallowed, users may:

  • Start inflating inventory with fake Receipts
  • Delay validating transfers in Odoo
  • Create unnecessary inventory adjustments
  • Adjust transfers to the quantity available but ship the original quantity requested
  • Might ship or transact using similar or incorrect SKUs
  • Give up on Odoo and use manual or shadow systems

Each of these makes reconciliation even harder and introduces audit/compliance risks.

Your Users are smart, empower them with good tools and get out of their way. Train them on what to do when inventory goes negative and create robust processes to resolve the issues it uncovers.


This is not a complete solution but a prototype. Work with your Odoo Digital Advisor or Odoo Partner if you don't have the skills to create this yourself and to ensure it does not need modifications to work in your database.


1) In Developer Mode, visit Settings --> Technical --> Automation --> Automation Rules

2) Create an Automation Rule like this:


3) Add an Action of type Execute Code like this:

accuracy = env["decimal.precision"].precision_get("Product Unit of Measure")
for record in records:
    diff = round(record.quantity, accuracy)
    if (diff < 0 and record.product_id.is_storable and
            record.location_id.usage in ["internal", "transit"]):
        raise UserError(f'You need {-diff} more {record.product_id.name}(s) to complete this Transfer!')


You will then see an blocking message like this:


Be ready to ARCHIVE this Automation Rule if it blocks Users from doing things they need to do. 




Avatar
Discard

Ray, you're right that those things can come up but that's a personell issue not a technical one. With a more strict system, staff are subverting policy but the ERP is stable and JEs flow well. Staff behavior can be dealt with later.

Complex systems like ERPs should not be so flexible. In some cases, it's good and right to be rigid and have strict guardrails. We're currently on day five of trying to undo a problem with prematurely receiving finished goods before completing the component MO and resupplying. Staff know they must complete the MO+resupply first but it was forgotten this time and they immediately went on to consume those finished goods in other MOs and ship+invoice pending orders. Now we have journal entries of which we can't make sense.

We didn't contact Odoo support or our partner because we thought we'd seen this before and a quick fix would be found but now more time has gone by than expected and we're still not sure.

Turns out this scenario is slightly different than last time and that's why we're struggling. That _and_ being <1 year of Odoo experience and troubleshooting.

Having said all that, thanks for your proposed solution! I will try implementing it once we get this worked out.

To be clear, I'm not advocating for all negative movements to be clocked. I'm advocating specifically for Odoo to reject the receipt of subcontracted goods before the underlying MO(s) have been completed and the subcontractor has been resupplied. It should be safe for Odoo to assume that because the finished good is able to be received, it must also be true that the subcontractor was resupplied.

Perhaps a middle ground is, "You are about to receive a subcontracted item for which the subcontractor has not been resupplied. This may cause an imbalance in your system. Do you wish to proceed?"

The operator would then have the opportunity to go and complete the unfinished MO and Resupply.

Related Posts Replies Views Activity
0
Apr 25
994
4
Feb 24
3082
0
Apr 23
1374
3
Oct 22
2897
3
Mar 25
5741