Thibault Delavallée c24ccef4fc [IMP] crm: better handle team deletion
PURPOSE

Make crm.team deletion effect explicit on main models (excluding wizards
or reports). Purpose is to ensure deleting a crm team has known side
effets.

SPECIFICATIONS

M2O on crm.team set to CASCADE

  * crm.lead.scoring.frequency: as we remove the team no need to keep the
    PLS data -> change to "cascade";
  * crm.team.member: when removing a team, remove its members as it prevents
    from unlinking the team;

M2O on crm.team set to SET NULL

  * account.move: void team_id field but track it to keep history;
  * crm.lead: void team_id field as it will be taken back into assign
    process (either manual or automatic), and will therefore be managed
    by other sales persons. In case of archived / lost leads setting to
    void has no real issue;
  * crm.stage: void team_id and set stage as shared to avoid loosing stage
    information for existing leads in that stage;
  * res.partner: void team_id taking care of this customer as this field
    is mainly informative anyway;
  * crm.iap.lead.mining.request: void team_id as it only impacts generated
    leads. Those will be created with a void team which is ok;
  * crm.reveal.rule: void team_id as it only impacts generated leads. Those
    will be created with a void team which is ok;
  * event.lead.rule: void lead_sales_team_id as this impact generated leads.
    Those will be created with a void team which is ok;
  * pos.config and pos.oser: void crm_team_id field. It is optional as it is
    not a core field of this model. Pos configurations and orders are still
    valid without team assigned on it;
  * sale.order: void team_id field but track it to keep history;
  * website: void salesteam_id field;

Prevent unlink when having more than 5 SO not canceled. If more than 5 active
SOs in the team, we consider this team to be actively used. 5 is some random
guess based on "user testing", aka more than testing CRM feature and less
than use it in real life use cases.

LINKS

Task ID-2507750
COM PR odoo/odoo#70645
ENT PR odoo/enterprise#18266
2021-06-23 08:36:18 +00:00
2015-09-08 15:45:09 +02:00
…
2015-09-08 17:58:38 +02:00
2021-05-17 19:26:27 +00:00
2020-09-28 14:07:25 +00: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%