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

hello,

I want to calculate product price base on UOM that customer choose .

if UOM of product is L and customer choose ml so i want to re calculate the price how can calculate it .

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

Hi,

As you know, the price of a product is usually not directly linked to the UOM in the standard Odoo, but with some customization, this can be achieved.

you can inherit the uom category lines (uom.uom) and add a float field to store the price per UOM. 

now, Inherit the sale.order.line model and write an onchange for the UOM field to update the product unit price based on the price from the UOM chosen.

Thanks

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