コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2324 ビュー

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

アバター
破棄
最善の回答

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.

アバター
破棄
関連投稿 返信 ビュー 活動
1
6月 25
1134
2
4月 25
1498
0
1月 25
1444
1
12月 24
2992
0
4月 24
1467