Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4992 Переглядів

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,,,

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
серп. 23
3899
0
квіт. 23
2977
5
черв. 21
17861
1
бер. 21
5767
1
лист. 19
3664