odoo fields属性介绍


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方法.


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM