Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
5253 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
août 23
4318
0
avr. 23
3181
5
juin 21
18208
1
mars 21
5979
1
nov. 19
3894