تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
1969 أدوات العرض

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?

الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال