Skip to content

Commit

Permalink
[IMP] crm_lost_reason_multi_company: lead lost reason multicompany
Browse files Browse the repository at this point in the history
  • Loading branch information
SaraDForgeFlow committed Jan 30, 2025
1 parent 0f546a2 commit 111841f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
1 change: 0 additions & 1 deletion crm_lost_reason_multi_company/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
"security/crm_lost_reason.xml",
"views/crm_lost_reason.xml",
],
"pre_init_hook": "pre_init_hook",
}
16 changes: 0 additions & 16 deletions crm_lost_reason_multi_company/hooks.py

This file was deleted.

1 change: 1 addition & 0 deletions crm_lost_reason_multi_company/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import crm_lost_reason
from . import crm_lead
16 changes: 16 additions & 0 deletions crm_lost_reason_multi_company/models/crm_lead.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models

class CrmLead(models.Model):
_inherit = "crm.lead"

lost_reason_id = fields.Many2one(
'crm.lost.reason',
string='Lost Reason',
index=True,
ondelete='restrict',
tracking=True,
check_company=True,
)
1 change: 1 addition & 0 deletions crm_lost_reason_multi_company/models/crm_lost_reason.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class CrmLostReason(models.Model):

_inherit = "crm.lost.reason"
_check_company_auto = True

company_id = fields.Many2one(
"res.company",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ <h1 class="title">Crm Lost Reason Multi Company</h1>
!! source digest: sha256:8f63f9f0f1ef3eb7ed0898f95838da4f6daba579e4be0f7b55ab49d86ea878ff
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/multi-company/tree/16.0/crm_lost_reason_multi_company"><img alt="OCA/multi-company" src="https://img.shields.io/badge/github-OCA%2Fmulti--company-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-crm_lost_reason_multi_company"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/multi-company&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module add multi-company management to crm lost reason</p>
<p>This module add multi-company management to crm lost reason</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand Down

0 comments on commit 111841f

Please sign in to comment.