如何在数据库中保存qty_available以便在每个产品pos odoo上显示它?

时间:2018-08-17 06:42:28

标签: odoo pos

我想在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模块中使其可用?

0 个答案:

没有答案