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

Hi , 

I would like to save in a custom  table the product id when his stock was modified . 

So i rewrite the stock_quant write method . 

@api.model
def write(self, vals):
_logger.error(
"WRITE@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
res = super(Quant, self).write(vals)
_logger.error(vals)
_logger.error(self.ids)
_logger.error(self.product_id)

On this method i would like to get the product_id associated to the object . All logs i made  were wrong . I don t know how to get the product_id . 

Could you help me please?


Thanks a lot 


Thomas 





الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مارس 25
1275
1
يوليو 21
3085
0
ديسمبر 17
3777
2
يوليو 25
4418
2
ديسمبر 24
7610