跳至內容
選單
此問題已被標幟
1 回覆
4951 瀏覽次數

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
8月 23
3880
0
4月 23
2954
5
6月 21
17793
1
3月 21
5743
1
11月 19
3623