-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi_livechat: change mail.channel.partner to mail.channel.member #461
base: 16.0
Are you sure you want to change the base?
Conversation
stanleykao72
commented
Jul 13, 2023
- mail.channel: the function _prepare_multi_livechat_channel_vals doesn't return public and group_public_id field when create mail.channel
- model mail.channel.partner change to mail.channel.member
"public": "groups", | ||
"group_public_id": self.env.ref("base.group_user").id, | ||
# "public": "groups", # V16 dropout public field | ||
"group_public_id": False, # V16 checks contrains with group_public_id self.env.ref("base.group_user").id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Field public
is removed in v16 -> ok
Field group_public_id
is computed in v16 with readonly=False
. Maybe just remove the field from result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remove Field group_public_id, and it's working after I tested it.
@@ -41,7 +47,8 @@ def _compute_is_pinned(self): | |||
def _inverse_is_pinned(self): | |||
# TODO: make batch search via read_group | |||
for r in self: | |||
channel_partner = self.env["mail.channel.partner"].search( | |||
# V16 change mail.channel.partner to mail.channel.member | |||
channel_partner = self.env["mail.channel.member"].search( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
from odoo import api, fields, models | ||
from odoo import api, fields, models, _ | ||
from odoo.exceptions import UserError, ValidationError | ||
|
||
import logging | ||
|
||
_logger = logging.getLogger(__name__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New imports are not used...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed not used imports