Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4939 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
sie 23
3867
0
kwi 23
2949
5
cze 21
17781
1
mar 21
5721
1
lis 19
3617