Odoo `field_description` 已分配但未应用

Odoo `field_description` is Assigned But Not Applied

我正在成功创建一个 Odoo 模块,现在我要完成它了。

所以在我的 .py 文件中有一个名为 x_show_in_ecommercex_description_sale_ecommerce 的字段。我已经指定了它 field_description,但在 Odoo 中它似乎没有被应用。

我希望这个 Field Label 填充其他词,因为我已经在我的 .py 文件中分配了,但我得到的是与字段本身相同的名称,但没有 space。

这也会影响导出到 excel

时可用的字段列表

这是我的 .py 文件:

class ProductTemplateInherited(models.Model):
    _inherit = "product.template"

    x_show_in_ecommerce = fields.Boolean(field_description="Show In Ecommerce", store=True, help="If this checkbox filled, this product will show in Central E-Commerce", ttype="boolean")
    x_description_sale_ecommerce = fields.Text(field_description="Description Sale Ecommerce", store=True, help="A description of the Product that you want to communicate to your customers. This description will be pulled to E-Commerce", ttype="text")

感谢您的帮助和见解

尝试使用 string 而不是 field_description:

x_show_in_ecommerce = fields.Boolean(string="Show In Ecommerce", store=True, help="If this checkbox filled, this product will show in Central E-Commerce", ttype="boolean")
x_description_sale_ecommerce = fields.Text(string="Description Sale Ecommerce", store=True, help="A description of the Product that you want to communicate to your customers. This description will be pulled to E-Commerce", ttype="text")