Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2369 Представления

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.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июн. 25
1237
2
апр. 25
1548
0
янв. 25
1514
1
дек. 24
3079
0
апр. 24
1551