You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
573 B

[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
[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
  1. from openerp import models, fields, api
  2. class ResPartner(models.Model):
  3. _inherit = 'res.partner'
  4. mails_to = fields.Integer(compute="_compute_mails_to")
  5. mails_from = fields.Integer(compute="_compute_mails_from")
  6. @api.multi
  7. def _compute_mails_to(self):
  8. for r in self:
  9. r.mails_to = self.env['mail.message'].sudo().search_count([('partner_ids', 'in', r.id)])
  10. @api.multi
  11. def _compute_mails_from(self):
  12. for r in self:
  13. r.mails_from = self.env['mail.message'].sudo().search_count([('author_id', '=', r.id)])