Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3749 Vizualizări

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 





Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mar. 25
2140
1
iul. 21
3596
0
dec. 17
4433
2
iul. 25
5821
2
oct. 25
8456