Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
144 Представления

Hi,
I wanted to add Chatter function to a custom model in the portal view with 

<div class="container py-5">
<h1>Communication history</h1>
<t t-call="portal.message_thread">
<t t-set="object" t-value="asset"/>
</t>

</div>

Only the Chatter view is there the portal user can only recieve messges but cannot send messages. am i missing something here. any help would be appreciated.


Аватар
Отменить
Лучший ответ

Integrating the Chatter function into a custom model for portal view requires careful setup to ensure both viewing and messaging capabilities are enabled for portal users.



  Ensure your custom model inherits from 'mail.thread' and 'mail.activity.mixin'. This is crucial for Chatter functionality.

  Verify the access rights for portal users on your custom model. Portal users must have read access, and if you want them to send messages, create or write access might also be necessary.

  Customize the portal access rules. Sometimes, the lack of messaging capability is due to restrictive portal access rules. Ensure that the rules allow for message posting.

  Check the implementation of the Chatter in your portal template. Ensure that the 'message_post' method is correctly called when messages are sent from the portal. This might require custom controller routes.


For personalized assistance:
https://www.pragtech.co.in/contact.html

Аватар
Отменить
Лучший ответ

Hi ,


Your code with portal.message_thread is correct — it displays the chatter but, by default, portal users can only view messages.


To let them send messages, make sure your custom model inherits:


_inherit = ['mail.thread', 'mail.activity.mixin', 'portal.mixin']


Then, extend the portal QWeb template to include the chatter input box, since Odoo doesn’t enable message posting for portal users out of the box.


Hope it helps

Аватар
Отменить
Автор

Thanks for the reply.
is there any way to add the chatter function without the access token. any links or tutorial regarding this would be helpful.

Related Posts Ответы Просмотры Активность
0
окт. 21
2303
0
мар. 21
2381
1
февр. 25
1726
2
дек. 24
2778
0
нояб. 24
4044