📅  最后修改于: 2022-03-11 14:45:50.350000             🧑  作者: Mango
@api.depends('line_ids.value')
def _compute_total(self):
for record in self:
record.total = sum(line.value for line in record.line_ids)