Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
3295 Visualizações

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
mar. 25
1293
1
jul. 21
3087
0
dez. 17
3780
2
jul. 25
4458
2
dez. 24
7636