Skip to Content
Menú
This question has been flagged
1 Respondre
4998 Vistes

Hello, I have 2 simple models:

 the first one is to create a product and it has name and quantity

the other one is to record how many products sold. 

I want to get the quantity value from the first model onto the second one and update it if something is sold, how can I do that? 

Thanks,,,

Avatar
Descartar
Best Answer

Hi,

You can create a Many2one field in the second model with first model as comodel. Then you can access the quantity field of first model as "many2one_fleld_id.quantity".

Regards

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
d’ag. 23
3903
0
d’abr. 23
2978
5
de juny 21
17867
1
de març 21
5769
1
de nov. 19
3672