我将字段添加到res.partner
<record id="mypartner_form" model="ir.ui.view">
<field name="name">partner.myform</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="partner_category_id" />
</field>
</field>
</record>
但不是结果
from openerp.osv import fields,osv,orm
_inherit = "res.partner"
_columns = {
'partner_category_id':fields.many2one('partner.category','Partner Category'),
}
请帮助
我想在客户和供应商之后添加归档,但没有结果
答案 0 :(得分:1)
请尝试以下操作:
from openerp.osv import fields,osv,orm
class res_partner_extension(osv.osv):
_inherit = "res.partner"
_columns = {
'partner_category_id':fields.many2one('partner.category','Partner Category'),
}