跳至内容
菜单
此问题已终结
1 回复
4985 查看

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
3888
0
4月 23
2968
5
6月 21
17853
1
3月 21
5764
1
11月 19
3656