So I am trying to record a stock move. I have two Locations, let’s say A and B, and want to move one item from A to B. A is type “Storage” and B is type “Customer”.
I create my stock move, fill everything in, and this might be important: I split the move into two moves by Lot. That worked, but the “Do” button is disabled. I could not understand why - the required inventory is available in A and everything is filled in properly.
So I did what you should not do: I went into the HTML source and removed the disabled attribute from the button and clicked it. That resulted in the inventory moved as expected, just as I wanted to.
Therefore I wonder if there is some possibility for me to better understand when the “Do” button is disabled.
You should never do that. It’s disabled for some reason, so you’re corrupting your data.
It might be for various reasons depending on the modules you have activated. So maybe if you post a list of the activated ones we can try to help.
Just by having the stock module activated, here are some reasons can make the button disabled:
If the item is already included in a shipment.
If assigning the item is necessary (due to type of location), and the item is still in the initial “draft” stage.
The stock_lot module does not add any restriction.
To know why can be disabled any field, there’s not an easy way for users, you should inspect the source code of Tryton (python), not the html, of the modules you have activated to know why.
Thank you very much for your reply. After digging through the code, I found that the reason the “Do” button was disabled was that an assignation for the stock was required - if I understood it correctly.
The correct way to ship an item to a customer is of course to go to Inventory → Shipments → Customer Shipments and to create a proper shipment there (if no previous Sale is involved). This allowed me to ship the item without any issues.