📜  odoo 12 计算文档 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:50.350000             🧑  作者: Mango

代码示例1
@api.depends('line_ids.value')
def _compute_total(self):
    for record in self:
        record.total = sum(line.value for line in record.line_ids)