İçereği Atla
Menü
Bu soru işaretlendi
4 Cevaplar
4624 Görünümler

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
Vazgeç
Üretici En İyi Yanıt

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

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

Üretici

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?

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Ağu 25
7096
3
Haz 25
3132
2
Şub 25
1588
0
Kas 24
1371
1
Eki 24
1580