Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
4642 Zobrazení

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
Zrušit
Autor Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

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')) 

Autor

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 Odpovědi Zobrazení Aktivita
2
srp 25
7159
3
čvn 25
3202
2
úno 25
1595
0
lis 24
1386
1
říj 24
1591