Skip to Content
Menu
This question has been flagged
1 Reply
1089 Views

I'm trying to create an invoice from a custom model using an automated action from Studio.

I'm new to python and odoo. I'm familiar with c# and visual studio. (My first language was PL/1)

pricelist = record.x_studio_many2one_field_n1iIa (pricelist field)

for x in record.x_studio_many2many_field_obFyH: (product)
price = pricelist._get_product_price(x.id, 1, record.x_studio_partner_id)
log("Price is " + str(price))
The error I'm getting is: AttributeError: 'int' object has no attribute '_name which is coming from _compute_price_rule

See full error here


Avatar
Discard
Author Best Answer

I was able to get the right price.

pricelist = record.x_studio_many2one_field_n1iIa
for x in record.x_studio_many2many_field_obFyH:
price = pricelist._price_get(x, 1 )
log("Price is " + str(price[1]))

Avatar
Discard
Related Posts Replies Views Activity
3
Aug 24
264
1
Dec 24
834
0
Apr 24
247
1
May 23
1206
0
Dec 22
1433