Hi, i’m doing some modification in Production Order
and we get one that we don’t know how to solve.
Our customer doesn’t know how many products he will produce so he estimate, he
can produce more or less than he put on Qty field, but the Production Order is automatic and
finishes when the quantity produce is the same that was informed.
So we need to remove this behaviour to finish automaticaly and let the customer decide when the production finished
-
We tried to use hooks, but hooks only added our behaviour after the whole code on method.
-
We thought in extend the Production Order, make a copy of the Doctype and add in our app, but we saw
that other DocTypes have links directly with the Production Order in Code. -
As a temporary solution we tried to change where the hooks add our behaviour and replace instead add, actually we could replace, but it was just more like a test and to not get totally stuck.
And as we could see (In principle) the method that sets status to “Complete” is get_status() in production_order.py
So, we are following the wrong way trying to change this? How can we change that behaviour using our customized app ?