Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
898 Lượt xem
  • I have a product with variant values ​​configured like Length, Width, Height, and color (Value extra price = 0). Because these parameters are very complex, it is not possible to use Odoo backend to calculate but it must go through Google Sheets. API

  • On the website, when the customer enters the parameters to be customized and then clicks the [Quotation] button. Odoo will send a request to Google Sheet, and then will get the final price, then will return it to Odoo.

  • Everything is working fine. But I'm having a big problem, I cannot override the external price in the next steps like [Add to Cart], [Check out], [Confirm Order], ... because the price is always recalculated based on the value extra price of the variant values ​​declared in Odoo. Please suggest me a solution to solve this problem. Thanks so much
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You mean to store the result of a calculated column? please try like the below:

thePrice= fields.Float(string='Price',compute='_compute_price',store=True)

Ảnh đại diện
Huỷ bỏ
Tác giả

The values ​​of the parameters Length, Width, Height are optional sizes that customers want, they can enter the desired size. And the system will return the selling price after being calculated.
These values ​​are dynamic, so I can't save them to the database at the moment.

Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 5 25
1512
3
thg 11 24
8277
3
thg 9 24
6103
0
thg 12 17
3908
1
thg 4 25
5134