怎么写自己数据表的id?
-
谢谢哦,现在我做了个one2many的字段,然后直接这个字段related过去就可以用了。
'stock_rules' : fields.one2many('stock.warehouse.orderpoint', 'product_id', 'Stock Rules', readonly=True),
'product_min_qty': fields.related('stock_rules', 'product_min_qty', type='float', string='Min Quantity'),
'product_max_qty': fields.related('stock_rules', 'product_max_qty', type='float', string='Max Quantity'),