How to recompute stored functional field values in Odoo?

前端 未结 4 1283
日久生厌
日久生厌 2020-12-09 21:50

Sometimes stored fields must be recomputed, but triggers can not be launched (e.g. in case of SQL injection).

How to recompute them an easy way?

4条回答
  •  生来不讨喜
    2020-12-09 22:47

    in the odoo11

    env.add_todo(model._fields['loading_time'], env['product.product'].search([]))
    model.recompute()
    

提交回复
热议问题