我想在product_template模型的每个产品的数据库中保存可用数量(qty_available)字段。我该怎么办?
我想在pos中显示每种产品的可用数量。所以我需要qty_available我该怎么做?
qty_available = fields.Float(
'Quantity On Hand', compute='_compute_quantities', search='_search_qty_available',
digits=dp.get_precision('Product Unit of Measure'),
help="Current quantity of products.\n"
"In a context with a single Stock Location, this includes "
"goods stored at this Location, or any of its children.\n"
"In a context with a single Warehouse, this includes "
"goods stored in the Stock Location of this Warehouse, or any "
"of its children.\n"
"stored in the Stock Location of the Warehouse of this Shop, "
"or any of its children.\n"
"Otherwise, this includes goods stored in any Stock Location "
"with 'internal' type.")
此字段在库存中定义。 如何在product_template或pos模块中使其可用?