Skip to Content
Menu
This question has been flagged
4 Replies
3631 Views

So im trying to make a field on the stock move that can determine whether stock is moving in or out. easy enough for inventory, but for manufacturing its a little harder.

How does odoo decide whether to add or subtract from stock quantity?

that way i can create a compute field based around that.


Cheers,

Avatar
Discard
Author Best Answer

Yes. It’s only to display on a report pivot. So I’ll test it out. I should be able to create a field in the stock move line shouldn’t I? 

would this work for manufacturing orders too? And inventory adjustments? 

Avatar
Discard
Best Answer

Hi,

The quantity calculation depends on source locations and destination locations type. There are different location types you can see that by going to Inventory -->Configurations --> locations. It includes Internal location, vendor Location, Customer location, etc. Based on the location type we are checking whether the quantity should be subtracted or added.
You can get an idea by checking the computation details of Quantity on Hand of a product

Avatar
Discard
Author

Hi. I thought it had something to do with that.

For receipt, delivery and internal, I can work it out (internal is a little confusing because I can’t see the subtraction of stock in the product moves.).

But for manufacturing orders (Consumables our, finished goods in) and inventory adjustments (up or down)

Hi,  if you want to set a field on the stock move in order to see whether it is In Or out you can check this criterion and add it in your code. But it didn't affect the quantity updation.For just knowing whether it is In Or Out.Modify the code

Stock Move Indest_location.usage in ('internal', 'transit') AND

source_location.usage not in ('internal', 'transit')Stock Move Out

source_location.usage in ('internal', 'transit')

AND  dest_location.usage not in ('internal', 'transit')) 

Author

Yes. It’s only to display on a report pivot. So I’ll test it out. I should be able to create a field in the stock move line shouldn’t I?

would this work for manufacturing orders too? And inventory adjustments?

Related Posts Replies Views Activity
0
Nov 24
87
1
Oct 24
140
3
Mar 24
3793
1
Mar 24
243
3
Dec 23
756