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

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
srp 23
3970
0
dub 23
2998
5
čvn 21
17924
1
bře 21
5790
1
lis 19
3704