[REF] crm: ensure automatic assignment works out of the box
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. SPECIFICATIONS Assignment max being set to 0 means member is out of automatic assign process. In that case assignment information (domain in form view, gauge in kanban view) are hidden to lighten member form view. Its default value is now set to 30. It means that newly created members by default are available for automatic assignment. 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#996
This commit is contained in:
@@ -21,7 +21,7 @@ class Team(models.Model):
|
||||
# assignment
|
||||
assignment_enabled = fields.Boolean(related="crm_team_id.assignment_enabled")
|
||||
assignment_domain = fields.Char('Assignment Domain', tracking=True)
|
||||
assignment_max = fields.Integer('Max Leads (last 30 days)')
|
||||
assignment_max = fields.Integer('Max Leads (last 30 days)', default=30)
|
||||
lead_month_count = fields.Integer(
|
||||
'Leads (30 days)', compute='_compute_lead_month_count',
|
||||
help='Lead assigned to this member those last 30 days')
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
attrs="{'invisible': [('assignment_enabled', '=', False)]}">
|
||||
<field name="assignment_max" invisible="1"/>
|
||||
<field name="lead_month_count" widget="gauge"
|
||||
options="{'max_field': 'assignment_max'}"/>
|
||||
options="{'max_field': 'assignment_max'}"
|
||||
attrs="{'invisible': [('assignment_max', '=', 0)]}"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
@@ -47,7 +48,8 @@
|
||||
<span class="oe_inline"> (max) </span>
|
||||
</div>
|
||||
<field name="assignment_domain" string="Domain" widget="domain"
|
||||
options="{'model': 'crm.lead'}"/>
|
||||
options="{'model': 'crm.lead'}"
|
||||
attrs="{'invisible': [('assignment_max', '=', 0)]}"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user