[FIX] website_crm_partner_assign: fix url in email Forward to partner
Bug exists since a long time ago, but because url is empty, nobody reported it before today since the consequence is just to don't have any link. On our prod we have some automation/customization that make this bug visible. opw-3257270 closes odoo/odoo#119554 X-original-commit: 5a5ee4a73ede391877bfef51a0aafcefa682e856 Signed-off-by: Jérémy Kersten <jke@odoo.com>
This commit is contained in:
@@ -104,14 +104,11 @@ class CrmLeadForwardToPartner(models.TransientModel):
|
||||
return True
|
||||
|
||||
def get_lead_portal_url(self, lead):
|
||||
action = lead.type == 'opportunity' and 'action_portal_opportunities' or 'action_portal_leads'
|
||||
action_ref = self.env.ref('website_crm_partner_assign.%s' % (action,), False)
|
||||
portal_link = "%s/?db=%s#id=%s&action=%s&view_type=form" % (
|
||||
return "%s/my/%s/%s" % (
|
||||
lead.get_base_url(),
|
||||
self.env.cr.dbname,
|
||||
lead.type,
|
||||
lead.id,
|
||||
action_ref and action_ref.id or False)
|
||||
return portal_link
|
||||
)
|
||||
|
||||
forward_type = fields.Selection([
|
||||
('single', 'a single partner: manual selection of partner'),
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<field name="lead_location" readonly="1"/>
|
||||
<field name="partner_assigned_id"/>
|
||||
<field name="partner_location" readonly="1"/>
|
||||
<field name="lead_link" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
<notebook colspan="4" groups="base.group_no_one">
|
||||
|
||||
Reference in New Issue
Block a user