为什么当我在 sale.py 中创建一个字段时,它没有在 Postgresql 数据库中创建?

Why when I create one field in sale.py it is not created in Postgresql database?

我有一个问题,因为当我在 sale.order.line 模型中创建一个字段时。当我在 sale_order_line.

中进行查询时,该字段不会出现在数据库 Postgresql 中

这是我在模型中创建字段的语句 sale.order.line :

niu = fields.Char(string="NIU", compute="_niu_validation", default=" ", readonly=True)

如果有人能帮助我,我将不胜感激。感谢您的时间和奉献精神。

因为是计算域。如果需要存储则需要添加,as参数:

store=True