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

Helllo guys why i'm getting this error?



    raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: product.pricelist.item(8, 9)

this is the related code:


                    elif rule.compute_price == 'nettech':
if product.aed_is_true:
price_tempo = self.env['res.currency'].search([('name', '=', 'IRR')], limit=1).rate * product.aed_in_irr + product.sud2 + (((self.env['res.currency'].search([('name', '=', 'IRR')], limit=1).rate * product.aed_in_irr + product.sud2) * (product.sud-rule.product_sub) / 100)) or 0.0
price = round(price_tempo,-4)
elif not product.aed_is_true:
price = price

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

I think that the error is not coming from the attached code, 

Anyway when we have this type of error that is means we should create a loop with the pricelist variable in your case.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 25
1134
2
thg 4 25
1498
0
thg 1 25
1444
1
thg 12 24
2992
0
thg 4 24
1467