bve-odooandXavier Alt 9d1cb826c7 [FIX] crm: missing company on default crm team on incoming emails
Commit 0edc854a84 introduces a company check on the salesperson, partner
& team on the lead model.

However 184334a97d1ccd19b9a7266a13ff51531d22cff4 was not able to find the expected company on a lead
created by email when the team did not have a company set. Which is the case by
default for the following crm.team:

  - Sales (3ad1867ea4)
  - Pre-Sales
  - Website (3ad1867ea4)
  - PoS

Having added the company check introduce an unexpected error:
  "Incompatible companies on records:\n-
  '[header subject of email]'
  belongs to company False and 'Customer'
  (partner_id: '[name in header from of email]')
  belongs to another company."

Error was hard to spot as the db logs are reporting that the routing of the
email was correctly done. But script to send eml using xmlrpc showed the error.

In this commit we fix the issue by removing the custom code trying to set
a company in ``message_new`` method of crm.lead. Indeed as it is a computed
field with a complete heuristic it is easier to let the ORM do its job and
remove that wrong value. It is now correctly computed as with any other
lead.

opw-2862509
opw-2783249
opw-2832435
opw-2881841

closes odoo/odoo#98746

X-original-commit: 2fec9c53314ef3f7c7e3305a6ee2417018d70ce5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Xavier Alt <alt@odoo.com>
2022-08-24 09:29:27 +02:00
2022-08-19 10:31:02 +02:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%