Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3315 Zobrazení

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 





Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
bře 25
1305
1
čvc 21
3121
0
pro 17
3786
2
čvc 25
4492
2
pro 24
7670