Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5743 Lượt xem

I have a question about the stock/inventory system of Odoo. I have a temporary table of items and quantities that I "sold" and every night I want to aggregate/consolidate this into a single sales/purchase order to adjust the inventory. In addition, I would like odoo to report the real inventory, let's everything that's booked via sales order, inventory adjustments with the stuff that comes from the temporary table. 

In general, I would want to what is the easiest way to implement this type of logic. I started  by (partially re-)implementing `product.template` and `product.product` for the `qty_available`. But reports, this seems to use the quants, I tried to look into that module but I cannot make heads and tails of how it calculates which quantity in which conditions. 

What would probably also work in my situation if I had a stock move or sales order that I could just keep appending too but then finalize it at midnight? But I'm not sure odoo allows me to do that? If anybody could give me some pointers and push me in the right direction that would be great. 


Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

@Mihran yes. That's what I am also already doing, but I have one additional requirement I need to consolidate `stock.moves` together. Basically, I have a function every midnight that makes the `stock.move` that needs to happen.  Now the problem I mostly have been around the "realtime previews" -- I still want odoo to report the correct inventory even though in a formal sense there is no stock.move.



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Lawrence,


You can try creating a move for that movement in 'stock.move'. This should reduce the quantity on hand according to the location passed in the stock movement. Don't mess with 'stock.quant' for this requirement.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 24
2420
2
thg 4 23
7788
2
thg 3 21
4966
3
thg 9 19
4395
2
thg 10 24
2557