Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
10073 Lượt xem
I want to add chatter to an appointment in odoo 12
i got this error

ValueError: Field `message_follower_ids` does not exist Error context:
View `Patient Form`
[view_id: 479, xml_id: my_clinic.patient_form, model: clinic.patient, parent_id: n/a]

model

class Appointment(models.Model):

_name = 'clinic.appointment'
_rec_name = 'date'
_inherit = ['mail.thread']

patient = fields.Many2one(comodel_name='clinic.patient', string='name')
date = fields.Datetime(string='Appointment Date')
office = fields.Many2one(
comodel_name='clinic.office', string='office_name')
Views

<record model="ir.ui.view" id="patient_form">
<field name="name">Patient Form</field>
<field name="model">clinic.patient</field>
<field name="arch" type="xml">
<form>
<sheet>
<group>
<group>
<field name="name"/>
<field name="gender" />
</group>
<group>
<field name="phone" widget='phone'/>
<field name="email" widget='email' />
</group>

</group>
<group>
<tab>
<field name="blood_group" />
</tab>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>

</field>
</record>

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello,

Can you make sure you have inherit = mail.thread on your model "clinic.patient" currently it seems you have put on "clinic.appointment". 

Regards,

Mustufa Rangwala (Probuse)

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello,

Have you added _inherit attribute later on in your code? If yes then have you upgraded module?

Thanks,

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 8 15
7148
0
thg 10 20
5211
1
thg 2 25
1507
2
thg 12 24
2483
0
thg 11 24
1505