Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
5273 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Agu 23
4360
0
Apr 23
3208
5
Jun 21
18246
1
Mar 21
6009
1
Nov 19
3925