更改计算字段代码如下:
for record in self:
if record.x_khdf1 and record.x_khdf2 and record.x_khdf3:
record['x_khzf'] = record['x_khdf1']*0.5 + record['x_khdf2']*0.3 + record['x_khdf3']*0.2
更改计算字段代码如下:
for record in self:
if record.x_khdf1 and record.x_khdf2 and record.x_khdf3:
record ['x_khzf'] = record ['x_khdf1'] *0.5 + record ['x_khdf2'] *0.3 + record ['x_khdf3'] *0.2