Commit Graph
3 Commits
Author SHA1 Message Date
Carsten Wolff (cawo) 48972503c2 [FIX] sales_team: set forcecreate=0 on crm_team_member_admin_sales
A considerable number of upgrade requests fail on different python constraints,
because the DBs in question are missing the `crm_team_member_admin_sales`
xmlid, while the data is in conflict with the attempt to restore the default
data (e.g. `base.user_admin` and `team_sales_department` have been assigned to
different companies or simply the data still exists and is still marked as
active).

The removal of the xmlid can only be done by an admin in developer mode and it
is safe to assume that the intent was to no longer have the default data and
that it is of no use to recreate it.

To support this intention and to make these upgrades succeed, set
`forcecreate="0"` on the XML record `crm_team_member_admin_sales`.

opw-3414340

closes odoo/odoo#128020

X-original-commit: 73fa2c03928afb8a3bdc3533d3af0874505ff6b8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Carsten Wolff (cawo) <cawo@odoo.com>
2023-07-11 09:10:27 +02:00
Thibault Delavallée 9790d7dcfb [REF][MOV] sales_team, crm: move team membership model to sales_team
GLOBAL PURPOSE

Ability to have salesmen belonging to several sales team is a core requirement
of CRM. It is therefore moved from website_crm_score to crm along with cleaning
and behavior improvement. Automatic lead assignment is also moved and cleaned.

SPECIFICIATIONS

Move sales team membership model from website_crm_score (enterprise) directly
into sales_team. It allows to have the base requirements to correctly handle
mono and multi sales team for salesperson.

Membership is modeled using a decorated many2many relationship. Members of
a sales team are res.users. Subscriptions are crm.team.member linking a team
and an user. It is a rename of team.user model coming from website_crm_score
as well as some other relational fields renaming.

Part of old team.user model is moved directly to sales team, part of it to
crm module (notably assignment limits). Its support will be improved in the
upcoming commits. Assignment related fields will be cleaned and used when
moving assignment directly into CRM.

LINKS

Task ID-2086889 (main task)
Task ID-2357969 (scoring migration task)
Community PR odoo/odoo#48422
Enterprise PR odoo/enterprise#499
Upgrade PR odoo/upgrade#996996
2021-01-21 10:56:19 +00:00
Thibault Delavallée 150095ebc7 [IMP] sales_team: lint module
PURPOSE

Prepare enhancements of sales team membership.

SPECIFICATIONS

Linting containing

  * reorder fields according to their use;
  * order methods according to guidelines (compute, CRUD, actions, tools);
  * fix some docstrings and typos;
  * remove unused imports and dead code;
  * rename files according to guidelines;
  * move views in their own file for mail.activity and assets;
  * correctly name data and demo files;
  * rename some inner methods to ease understanding;

LINKS

Task ID 2086889 (sales team enhancements)
Task ID 2234698 (preparation lint)
Community PR odoo/odoo#49520
2020-04-14 11:53:08 +00:00