Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
4626 Widoki

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,

Awatar
Odrzuć
Autor Najlepsza odpowiedź

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? 

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
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?

Powiązane posty Odpowiedzi Widoki Czynność
2
sie 25
7097
3
cze 25
3138
2
lut 25
1588
0
lis 24
1371
1
paź 24
1580