[Error] When Odoo creates a document, it prompts that the message cannot be recorded. Please configure the sender's email address.

After the customer reinstalled the odoo16 system today, the records under each module that were used normally can no longer be used. It prompts "The message cannot be recorded, please configure the sender's email address." This error is a common error and is commonly seen in projects, inventory, sales orders, purchase orders, warehousing orders, etc.

I originally thought that the mailbox was not configured properly, but after following the prompts, I found that it was useless.

This kind of problem should be related to the mailbox call. The newly installed system could be used without configuring the mailbox before. It was found that the modules related to the project were not fully installed.

"name": "Project Human Resources Association",
"summary": "Link human resources to the project, which refers to the assignor and associates the designated user with an employee.
from odoo import api, fields, models


class ResUsers(models.Model):
    _inherit = "res.users"

    hr_category_ids = fields.Many2many(
        comodel_name="hr.employee.category",
        string="人力资源类别",
        compute="_compute_hr_category_ids",
        help="链接到当前公司中的用户动态计算员工类别的技术领域 .",
    )

    @api.depends("company_id", "employee_ids", "employee_ids.category_ids")
    def _compute_hr_category_ids(self):
        for user in self:
            user.hr_category_ids = user.employee_ids.filtered(
                lambda x: x.company_id == user.company_id
            )[:1].category_ids

After finally installing the project mailbox configuration module, everything is normal.

Guess you like

Origin blog.csdn.net/fqfq123456/article/details/134051456