https://blog.csdn.net/sinat_23931991/article/details/86695259

备注:

fields中的inverse属性理解:

    product_qty = fields.Float(
        'Real Quantity', compute='_compute_product_qty', inverse='_set_product_qty',
        digits=0, store=True,
        help='Quantity in the default UoM of the product')

product_qty 这个字段本来是由compute方法计算出来的,但是如果用户手动设置了该字段的值,就会触发inverse属性中的方法,触发的方式可以是write和create方法.

相关文章:

  • 2021-06-26
  • 2021-06-11
  • 2021-09-26
  • 2021-06-28
  • 2021-10-09
  • 2022-12-23
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2021-12-05
  • 2021-04-28
  • 2022-01-31
相关资源
相似解决方案