تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2812 أدوات العرض

I want the Price_list field to keep the fixed_price value from the product_pricelist_item of the product in the invoice, but from my code. The value is 0. How should I fix a fixed_price value from a product_pricelist_item of a product stored in a field? Thanks for the help.
-----------------------------------------------------

class AccountInvoiceLine(models.Model):

  _inherit = 'account.invoice.line'

price_list = fields.Float('fixed_price ',compute='get_commission')

@api.multi

def get_commission(self):

self. price_list =  self.env.cr.execute\

("SELECT a.fixed_price FROM product_pricelist_item a"

"WHERE a.pricelist_id=2 AND a.product_id=%s",

(self.product_id.id,))

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
5
سبتمبر 20
63150
2
أغسطس 24
1755
2
فبراير 22
5476
1
أبريل 15
22794
2
فبراير 25
1699