[LINT]
************* Module mail_archives
mail_archives/views/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
mail_archives/README.rst:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_to
mail_to/static/src/js/mail_to.js:11: [W7903(javascript-lint), ] Missing semicolon.
mail_to/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
mail_to/doc/changelog.rst:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_move_message
mail_move_message/doc/changelog.rst:1: [E7901(rst-syntax-error), ] Hyperlink target "changelog" is not referenced.
mail_move_message/data/mail_move_message_data.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_move_message.mail_move_message_models
mail_move_message/mail_move_message_models.py:74: [C8108(method-compute), Wizard] Name of compute method should starts with "_compute_"
mail_move_message/mail_move_message_models.py:91: [W8104(api-one-deprecated), Wizard.get_can_move] api.one deprecated
mail_move_message/mail_move_message_models.py:141: [W8104(api-one-deprecated), Wizard.check_access] api.one deprecated
mail_move_message/mail_move_message_models.py:198: [W8104(api-one-deprecated), Wizard.delete] api.one deprecated
mail_move_message/mail_move_message_models.py:233: [W8104(api-one-deprecated), Wizard.read_close] api.one deprecated
mail_move_message/mail_move_message_models.py:248: [C8108(method-compute), MailMessage] Name of compute method should starts with "_compute_"
mail_move_message/mail_move_message_models.py:251: [W8104(api-one-deprecated), MailMessage._get_all_childs] api.one deprecated
mail_move_message/mail_move_message_models.py:274: [W8104(api-one-deprecated), MailMessage.move] api.one deprecated
************* Module mail_base
mail_base/static/src/js/base.js:245: [W7903(javascript-lint), ] Misleading line break before '||'; readers may interpret this as an expression boundary.
mail_base/static/src/js/base.js:1119: [W7903(javascript-lint), ] Missing semicolon.
mail_base/static/src/js/base.js:1121: [W7903(javascript-lint), ] Missing semicolon.
mail_base/views/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_sent
mail_sent/doc/changelog.rst:1: [E7901(rst-syntax-error), ] Hyperlink target "changelog" is not referenced.
mail_sent/views/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_sent.models
mail_sent/models.py:8: [C8108(method-compute), MailMessage] Name of compute method should starts with "_compute_"
mail_sent/models.py:12: [W8104(api-one-deprecated), MailMessage._get_sent] api.one deprecated
************* Module mail_reply
mail_reply/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module res_partner_mails_count
res_partner_mails_count/README.rst:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module res_partner_mails_count.models
res_partner_mails_count/models.py:8: [C8108(method-compute), ResPartner] Name of compute method should starts with "_compute_"
res_partner_mails_count/models.py:9: [C8108(method-compute), ResPartner] Name of compute method should starts with "_compute_"
res_partner_mails_count/models.py:12: [W8104(api-one-deprecated), ResPartner._mails_to] api.one deprecated
res_partner_mails_count/models.py:17: [W8104(api-one-deprecated), ResPartner._mails_from] api.one deprecated
8 years ago [LINT]
************* Module mail_archives
mail_archives/views/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
mail_archives/README.rst:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_to
mail_to/static/src/js/mail_to.js:11: [W7903(javascript-lint), ] Missing semicolon.
mail_to/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
mail_to/doc/changelog.rst:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_move_message
mail_move_message/doc/changelog.rst:1: [E7901(rst-syntax-error), ] Hyperlink target "changelog" is not referenced.
mail_move_message/data/mail_move_message_data.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_move_message.mail_move_message_models
mail_move_message/mail_move_message_models.py:74: [C8108(method-compute), Wizard] Name of compute method should starts with "_compute_"
mail_move_message/mail_move_message_models.py:91: [W8104(api-one-deprecated), Wizard.get_can_move] api.one deprecated
mail_move_message/mail_move_message_models.py:141: [W8104(api-one-deprecated), Wizard.check_access] api.one deprecated
mail_move_message/mail_move_message_models.py:198: [W8104(api-one-deprecated), Wizard.delete] api.one deprecated
mail_move_message/mail_move_message_models.py:233: [W8104(api-one-deprecated), Wizard.read_close] api.one deprecated
mail_move_message/mail_move_message_models.py:248: [C8108(method-compute), MailMessage] Name of compute method should starts with "_compute_"
mail_move_message/mail_move_message_models.py:251: [W8104(api-one-deprecated), MailMessage._get_all_childs] api.one deprecated
mail_move_message/mail_move_message_models.py:274: [W8104(api-one-deprecated), MailMessage.move] api.one deprecated
************* Module mail_base
mail_base/static/src/js/base.js:245: [W7903(javascript-lint), ] Misleading line break before '||'; readers may interpret this as an expression boundary.
mail_base/static/src/js/base.js:1119: [W7903(javascript-lint), ] Missing semicolon.
mail_base/static/src/js/base.js:1121: [W7903(javascript-lint), ] Missing semicolon.
mail_base/views/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_sent
mail_sent/doc/changelog.rst:1: [E7901(rst-syntax-error), ] Hyperlink target "changelog" is not referenced.
mail_sent/views/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module mail_sent.models
mail_sent/models.py:8: [C8108(method-compute), MailMessage] Name of compute method should starts with "_compute_"
mail_sent/models.py:12: [W8104(api-one-deprecated), MailMessage._get_sent] api.one deprecated
************* Module mail_reply
mail_reply/templates.xml:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module res_partner_mails_count
res_partner_mails_count/README.rst:1: [W7908(missing-newline-extrafiles), ] Missing newline
************* Module res_partner_mails_count.models
res_partner_mails_count/models.py:8: [C8108(method-compute), ResPartner] Name of compute method should starts with "_compute_"
res_partner_mails_count/models.py:9: [C8108(method-compute), ResPartner] Name of compute method should starts with "_compute_"
res_partner_mails_count/models.py:12: [W8104(api-one-deprecated), ResPartner._mails_to] api.one deprecated
res_partner_mails_count/models.py:17: [W8104(api-one-deprecated), ResPartner._mails_from] api.one deprecated
8 years ago |
|
# -*- coding: utf-8 -*- from openerp import api, models, fields
class MailMessage(models.Model): _inherit = 'mail.message'
sent = fields.Boolean('Sent', compute="_compute_sent", help='Was message sent to someone', store=True)
@api.one @api.depends('author_id', 'partner_ids') def _compute_sent(self): self_sudo = self.sudo() self_sudo.sent = len(self_sudo.partner_ids) > 1 \ or len(self_sudo.partner_ids) == 1 \ and self_sudo.author_id \ and self_sudo.partner_ids[0].id != self_sudo.author_id.id
@api.multi def message_format(self): message_values = super(MailMessage, self).message_format() message_index = {message['id']: message for message in message_values} for item in self: msg = message_index.get(item.id) if msg: msg['sent'] = item.sent return message_values
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message' sent = fields.Boolean('Sent', help='dummy field to fix inherit error')
|