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

hi everyone, help me please.

I have 1 problem: For example, I have a convention that beer product (case) has product code A and beer product (bottle) has product code B and 1 case includes 12 bottles.
First I stocked 1 box, then I sold 2 bottles, finally 10 bottles left.
May I ask if Odoo ver 16 has a function to convert the quantity of 2 different product codes?

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

Hi,

Are you asking about the function that handles the conversion of quantity from one uom to another ? If yes, you can check the _compute_quantity function in the product.uom model.

Sample:   line.product_uom._compute_quantity(line.product_qty, line.product_id.uom_id)


Thanks

Ảnh đại diện
Huỷ bỏ