Skip to Content
मेन्यू
This question has been flagged
1 Reply
5115 Views

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
Discard
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
Discard
Related Posts Replies Views Activity
1
अग॰ 23
4134
0
अप्रैल 23
3087
5
जून 21
18058
1
मार्च 21
5891
1
नव॰ 19
3789