Files
odoo_source/addons/website_livechat/__manifest__.py
T
Samuel Degueldre a25064380f [IMP] mail, *: introduce messaging components registry
*: hr_holidays, im_livechat, sms, snailmail, website_slides

Most messaging related components have common needs concerning
subscribing to model changes, and not needing to be rerendered unless
their props change. Previously, most components would call the hooks
"useModels" and "useShouldUpdateBasedOnProps" individually. Messaging
components also depend on one another quite a bit, requiring a lot of
explicit imports of other components. It would also be useful to be able
to have cyclic dependencies between component (eg Message renders a
component that allows to delete the message, and the delete component
renders the message in a confirmation dialog), but that doesn't work
with explicit imports (the odoo module system doesn't support cyclic
dependencies).

This commit adds a Component decorator that:
- Registers the component in an internal registry
- Makes all components in this registry available at render time to
components that have been registered in this way
- Calls the useModels and useShouldUpdateBasedOnProps hooks during
component initialization (setup)

enterprise PR: odoo/enterprise#20304

closes odoo/odoo#74982

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-08-18 10:09:24 +00:00

57 lines
2.4 KiB
Python

# -*- coding: utf-8 -*-
{
'name': 'Website Live Chat',
'category': 'Hidden',
'summary': 'Chat with your website visitors',
'version': '1.0',
'description': """
Allow website visitors to chat with the collaborators. This module also brings a feedback tool for the livechat and web pages to display your channel with its ratings on the website.
""",
'depends': ['website', 'im_livechat'],
'installable': True,
'application': False,
'auto_install': True,
'data': [
'views/website_livechat.xml',
'views/res_config_settings_views.xml',
'views/website_livechat_view.xml',
'views/website_visitor_views.xml',
'security/ir.model.access.csv',
'security/website_livechat.xml',
'data/website_livechat_data.xml',
],
'assets': {
'web.assets_frontend': [
'mail/static/src/js/utils.js',
'im_livechat/static/src/legacy/public_livechat.js',
'website_livechat/static/src/legacy/public_livechat.js',
'im_livechat/static/src/legacy/public_livechat.scss',
'website_livechat/static/src/legacy/public_livechat.scss',
],
'website.assets_editor': [
'website_livechat/static/src/js/**/*',
],
'web.assets_backend': [
'website_livechat/static/src/components/visitor_banner/visitor_banner.js',
'website_livechat/static/src/models/messaging_notification_handler/messaging_notification_handler.js',
'website_livechat/static/src/models/thread/thread.js',
'website_livechat/static/src/models/visitor/visitor.js',
'website_livechat/static/src/components/visitor_banner/visitor_banner.scss',
],
'web.assets_tests': [
'website_livechat/static/tests/tours/**/*',
],
'web.qunit_suite_tests': [
'website_livechat/static/src/components/discuss/discuss_tests.js',
'website_livechat/static/src/models/messaging_notification_handler/messaging_notification_handler_tests.js',
'website_livechat/static/tests/helpers/mock_models.js',
'website_livechat/static/tests/helpers/mock_server.js',
],
'web.assets_qweb': [
'website_livechat/static/src/components/discuss/discuss.xml',
'website_livechat/static/src/components/visitor_banner/visitor_banner.xml',
],
},
'license': 'LGPL-3',
}