odoo14開發:如何修改單據麵包屑導航名稱

odoo14開發

 Odoo native code document breadcrumb navigation defaults to using the name field for display, as shown in the following image:


How to modify the name I want?

According to the official [models.py] file, it can be seen that

_rec_name = None #: 用于标记记录的字段,默认值:``name``

This means that by default, the breadcrumb navigation uses the name field; how should it be written?

Developers can directly add the following code when creating a new model to achieve the desired display name.

class AccountFiscalPositionTax(models.Model):
_name = 'account.fiscal.position.tax'
_description = 'Tax Mapping of Fiscal Position'
_rec_name = 'position_id'
_check_company_auto = True

关于我们

​我们致力于帮助中小企业实现数字化转型,我们的团队由一群充满激情和创新思维的专业人士组成,他们具备丰富的行业经验和技术专长。

扫一扫获取顾问以及手册

归档
登入 發表評論
Mac OS odoo已經安裝wkhtmltopdf但是打印還是提示未安裝