字段 `message_follower_ids`不存在!
-
想添加follower,首先
class mail_mass_mailing_list(osv.Model):
_inherit = ['mail.mass_mailing.list', 'mail.thread']
[b]然后视图:[/b]
<!-- form view -->
<record model="ir.ui.view" id="geeker_mass_mailing_list_inherit_view_form">
<field name="name">geeker.mass_mailing.list.inherit.form</field>
<field name="model">mail.mass_mailing.list</field>
<field name="type">form</field>
<field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_list_form" />
<field name="arch" type="xml">
<sheet position="after">
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</sheet>
</field>
</record>
[b]错误log:[/b]
Error details:
字段message_follower_ids
不存在!
错误的上下文:
视图geeker.mass_mailing.list.inherit.form
[view_id: 1707, xml_id: n/a, model: mail.mass_mailing.list, parent_id: 1619]" while parsing /opt/odoo/addons_geeker/geeker_mailingcontact/geeker_mailingcontact_view.xml:18, near
<record model="ir.ui.view" id="geeker_mass_mailing_list_inherit_view_form">
<field name="name">geeker.mass_mailing.list.inherit.form</field>
<field name="model">mail.mass_mailing.list</field>
<field name="type">form</field>
<field name="inherit_id" ref="mass_mailing.view_mail_mass_mailing_list_form"/>
<field name="arch" type="xml">
<sheet position="after">
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</sheet>
</field>
</record>
查了好多遍,不知道问题出在那里?求教! -
[quote author=mrshelly link=topic=17428.msg31563#msg31563 date=1449210422]
<br />...<br />class mail_mass_mailing_list(osv.Model):<br /> _name = "mail.mass_mailing.list"<br /> _inherit = ['mail.thread']<br />...<br />
试试看?
[/quote]
谢谢!刚才试过了,还是一样的错误提示。
我自己开发的模块,添加follow就不会有问题,系统自带的模块用继承方式添加似乎总有问题。
不知道是不是这种情况?