Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3308 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mar 25
1298
1
lug 21
3091
0
dic 17
3783
2
lug 25
4484
2
dic 24
7666