我的视图.xml
<odoo>
<data>
<record model = "ir.ui.view" id = "custom_expense.list">
<field name = "name"> custom_expense list </field>
<field name = "model"> custom_expense.custom_expense </field>
<field name = "arch" type = "xml">
<tree>
<field name = "name" />
<field name = "test" />
</tree>
</field>
</record>
<record model = "ir.actions.act_window" id = "custom_expense.action_window">
<field name = "name"> custom_expense </field>
<field name = "res_model"> custom_expense.custom_expense </field>
<field name = "view_mode"> tree, form </field>
</record>
<menuitem name = "custom_expense" id = "custom_expense.menu_root" />
<menuitem name = "Menu 1" id = "custom_expense.menu_1" parent = "custom_expense.menu_root" />
<menuitem name = "Submenu 1" id = "custom_expense.menu_1_list" parent = "custom_expense.menu_1"
action = "custom_expense.action_window" />
</data>
</odoo>
我的模型.py
from odoo import models, fields, api
class custom_expense (models.Model):
_name = 'custom_expense.custom_expense'
_inherit = 'hr.expense'
test = fields.Char (string = 'Valuethird')
我想显示 hr.expense 模型中的“名称”字段,但我发现错误:TypeError: Many2many fields custom_expense.custom_expense.tax_ids 和 hr.expense.tax_ids 使用相同的表和列 - - -