İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4940 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Ağu 23
3868
0
Nis 23
2952
5
Haz 21
17782
1
Mar 21
5723
1
Kas 19
3618