mirror of
https://github.com/bringout/oca-ocb-crm.git
synced 2026-04-22 12:32:01 +02:00
19.0 vanilla
This commit is contained in:
parent
dc68f80d3f
commit
7221b9ac46
610 changed files with 135477 additions and 161677 deletions
|
|
@ -1,11 +1,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models
|
||||
from odoo import _, api, models
|
||||
|
||||
|
||||
class Users(models.Model):
|
||||
_inherit = 'res.users'
|
||||
class ResUsers(models.Model):
|
||||
_inherit = "res.users"
|
||||
|
||||
target_sales_won = fields.Integer('Won in Opportunities Target')
|
||||
target_sales_done = fields.Integer('Activities Done Target')
|
||||
@api.depends_context(
|
||||
'crm_formatted_display_name_team',
|
||||
'formatted_display_name')
|
||||
def _compute_display_name(self):
|
||||
super()._compute_display_name()
|
||||
formatted_display_name = self.env.context.get('formatted_display_name')
|
||||
team_id = self.env.context.get('crm_formatted_display_name_team', 0)
|
||||
if formatted_display_name and team_id:
|
||||
leader_id = self.env['crm.team'].browse(team_id).user_id
|
||||
for user in self.filtered(lambda u: u == leader_id):
|
||||
user.display_name += " --%s--" % _("(Team Leader)")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue