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

Question for Odoo 14

The Odoo webshop uses the product field virtual_available to as the available quantity of the product. It is calculated by qty_available + incoming_qty - outgoing_qty.

In a specific use case, it is not desired to sell products that are not yet available, thus, that the webshop uses qty_available - outgoing_qty, until the products arrive for real.

The question is, if this can also be achieved by configuration. And is there a most appropriate possibility? For instance, with different warehouses or warehouse locations for purchases or incoming moves. Or with a different date config.


Until now, the behavior was partly achieved by a custom field and overrides of webshop API methods, but it's almost impossible to get it right in all occurrences (there are more than 130 references to virtual_available in the code).

It was also considered to change virtual_available directly to the desired calculation. What will be the side effects?


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

As I did not find a solution for this problem, I created a small addon for it: https://github.com/ayudoo/warehouse_forecast_quantity

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 24
1229
1
thg 6 24
3093
2
thg 1 23
6653
0
thg 2 21
2453
0
thg 3 17
3514