-
-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] crm_phonecall_summary_predefined: Migration to 17.0
- Loading branch information
1 parent
504e480
commit 247c834
Showing
7 changed files
with
27 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,8 +43,7 @@ Configuration | |
To configure the possible summary options: | ||
|
||
1. Activate the developer mode | ||
2. Go to *CRM > Configuration > Leads & Opportunities > Phone Calls > | ||
Summaries*. | ||
2. Go to *CRM > Configuration > Phone Calls > Summaries*. | ||
3. Add or modify types there. | ||
|
||
Usage | ||
|
@@ -81,6 +80,7 @@ Contributors | |
- Vicent Cubells | ||
- Cristina Martín | ||
- Víctor Martínez | ||
- Carolina Fernandez | ||
|
||
- Anand Kansagra <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
# Copyright 2017 Vicent Cubells <[email protected]> | ||
# Copyright 2024 Tecnativa - Carolina Fernandez | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from psycopg2 import IntegrityError | ||
|
||
from odoo import SUPERUSER_ID, api | ||
|
||
|
||
def convert_names_to_many2one(cr, registry): # pragma: no cover | ||
def convert_names_to_many2one(env): # pragma: no cover | ||
"""Convert old string names to new Many2one""" | ||
with api.Environment.manage(): | ||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
summary = env["crm.phonecall.summary"] | ||
phone_call = env["crm.phonecall"] | ||
for s in phone_call.search([("summary_id", "=", False)]): | ||
try: | ||
with env.cr.savepoint(): | ||
s.summary_id = summary.create({"name": s.name}) | ||
except IntegrityError: | ||
s.summary_id = summary.search([("name", "=", s.name)]) | ||
summary = env["crm.phonecall.summary"] | ||
phone_call = env["crm.phonecall"] | ||
for s in phone_call.search([("summary_id", "=", False)]): | ||
try: | ||
with env.cr.savepoint(): | ||
s.summary_id = summary.create({"name": s.name}) | ||
except IntegrityError: | ||
s.summary_id = summary.search([("name", "=", s.name)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
To configure the possible summary options: | ||
|
||
1. Activate the developer mode | ||
2. Go to *CRM \> Configuration \> Leads & Opportunities \> Phone Calls | ||
2. Go to *CRM \> Configuration \> Phone Calls | ||
\> Summaries*. | ||
3. Add or modify types there. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
- Vicent Cubells | ||
- Cristina Martín | ||
- Víctor Martínez | ||
- Carolina Fernandez | ||
- Anand Kansagra \<<[email protected]>\> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,11 @@ | |
|
||
/* | ||
:Author: David Goodger ([email protected]) | ||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ | ||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ | ||
:Copyright: This stylesheet has been placed in the public domain. | ||
|
||
Default cascading style sheet for the HTML output of Docutils. | ||
Despite the name, some widely supported CSS2 features are used. | ||
|
||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to | ||
customize this style sheet. | ||
|
@@ -274,7 +275,7 @@ | |
margin-left: 2em ; | ||
margin-right: 2em } | ||
|
||
pre.code .ln { color: grey; } /* line numbers */ | ||
pre.code .ln { color: gray; } /* line numbers */ | ||
pre.code, code { background-color: #eeeeee } | ||
pre.code .comment, code .comment { color: #5C6576 } | ||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } | ||
|
@@ -300,7 +301,7 @@ | |
span.pre { | ||
white-space: pre } | ||
|
||
span.problematic { | ||
span.problematic, pre.problematic { | ||
color: red } | ||
|
||
span.section-subtitle { | ||
|
@@ -391,8 +392,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1> | |
<p>To configure the possible summary options:</p> | ||
<ol class="arabic simple"> | ||
<li>Activate the developer mode</li> | ||
<li>Go to <em>CRM > Configuration > Leads & Opportunities > Phone Calls > | ||
Summaries</em>.</li> | ||
<li>Go to <em>CRM > Configuration > Phone Calls > Summaries</em>.</li> | ||
<li>Add or modify types there.</li> | ||
</ol> | ||
</div> | ||
|
@@ -428,6 +428,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2> | |
<li>Vicent Cubells</li> | ||
<li>Cristina Martín</li> | ||
<li>Víctor Martínez</li> | ||
<li>Carolina Fernandez</li> | ||
</ul> | ||
</li> | ||
<li>Anand Kansagra <<a class="reference external" href="mailto:kansagraanand@hotmail.com">kansagraanand@hotmail.com</a>></li> | ||
|
@@ -436,7 +437,9 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2> | |
<div class="section" id="maintainers"> | ||
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2> | ||
<p>This module is maintained by the OCA.</p> | ||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> | ||
<a class="reference external image-reference" href="https://odoo-community.org"> | ||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /> | ||
</a> | ||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use.</p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters