Skip to content

Commit d0ec288

Browse files
committed
[19.0][MIG] crm_phonecall
1 parent e5726fa commit d0ec288

10 files changed

Lines changed: 50 additions & 50 deletions

File tree

crm_phonecall/README.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
15
===============
26
CRM Phone Calls
37
===============
@@ -13,17 +17,17 @@ CRM Phone Calls
1317
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1418
:target: https://odoo-community.org/page/development-status
1519
:alt: Beta
16-
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
1721
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1822
:alt: License: AGPL-3
1923
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github
20-
:target: https://github.com/OCA/crm/tree/18.0/crm_phonecall
24+
:target: https://github.com/OCA/crm/tree/19.0/crm_phonecall
2125
:alt: OCA/crm
2226
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/crm-18-0/crm-18-0-crm_phonecall
27+
:target: https://translation.odoo-community.org/projects/crm-19-0/crm-19-0-crm_phonecall
2428
:alt: Translate me on Weblate
2529
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=19.0
2731
:alt: Try me on Runboat
2832

2933
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -61,7 +65,7 @@ Bug Tracker
6165
Bugs are tracked on `GitHub Issues <https://github.com/OCA/crm/issues>`_.
6266
In case of trouble, please check there if your issue has already been reported.
6367
If you spotted it first, help us to smash it by providing a detailed and welcomed
64-
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_phonecall%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
68+
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_phonecall%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
6569

6670
Do not contact contributors directly about support or help with technical issues.
6771

@@ -99,6 +103,9 @@ Contributors
99103
- Antoni Marroig <amarroig@apsl.net>
100104

101105
- Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>
106+
- `Studio73 <https://studio73.es>`__:
107+
108+
- Eugenio Micó <eugenio@studio73.es>
102109

103110
Maintainers
104111
-----------
@@ -113,6 +120,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
113120
mission is to support the collaborative development of Odoo features and
114121
promote its widespread use.
115122

116-
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/18.0/crm_phonecall>`_ project on GitHub.
123+
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/19.0/crm_phonecall>`_ project on GitHub.
117124

118125
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

crm_phonecall/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{
55
"name": "CRM Phone Calls",
6-
"version": "18.0.1.0.2",
6+
"version": "19.0.1.0.0",
77
"category": "Customer Relationship Management",
88
"author": "Odoo S.A., Tecnativa, Odoo Community Association (OCA)",
99
"website": "https://github.com/OCA/crm",

crm_phonecall/models/crm_phonecall.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ class CrmPhonecall(models.Model):
6060
column2="tag_id",
6161
)
6262
partner_phone = fields.Char(string="Phone")
63-
partner_mobile = fields.Char("Mobile")
6463
priority = fields.Selection(
6564
selection=[("0", "Low"), ("1", "Normal"), ("2", "High")],
6665
default="1",
@@ -77,15 +76,13 @@ def _onchange_partner_id(self):
7776
"""Contact number details should be change based on partner."""
7877
if self.partner_id:
7978
self.partner_phone = self.partner_id.phone
80-
self.partner_mobile = self.partner_id.mobile
8179

8280
@api.onchange("opportunity_id")
8381
def _onchange_opportunity_id(self):
8482
"""Based on opportunity, change contact, tags, partner, team."""
8583
if self.opportunity_id:
8684
self.team_id = self.opportunity_id.team_id.id
8785
self.partner_phone = self.opportunity_id.phone
88-
self.partner_mobile = self.opportunity_id.mobile
8986
self.partner_id = self.opportunity_id.partner_id.id
9087
self.tag_ids = self.opportunity_id.tag_ids.ids
9188

@@ -123,7 +120,6 @@ def get_values_schedule_another_phonecall(self, vals):
123120
"team_id": vals.get("team_id") or self.team_id.id,
124121
"partner_id": self.partner_id.id,
125122
"partner_phone": self.partner_phone,
126-
"partner_mobile": self.partner_mobile,
127123
"priority": self.priority,
128124
"opportunity_id": self.opportunity_id.id,
129125
"campaign_id": self.campaign_id.id,
@@ -198,7 +194,6 @@ def _prepare_opportunity_vals(self):
198194
"name": self.name,
199195
"partner_id": self.partner_id.id,
200196
"phone": self.partner_phone or self.partner_id.phone,
201-
"mobile": self.partner_mobile or self.partner_id.mobile,
202197
"email_from": self.partner_id.email,
203198
"team_id": self.team_id.id,
204199
"description": self.description,

crm_phonecall/readme/CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
- [APSL-Nagarro](https://apsl.tech):
1515
- Antoni Marroig \<<amarroig@apsl.net>\>
1616
- Heliconia Solutions Pvt. Ltd. \<<https://www.heliconia.io>\>
17+
- [Studio73](https://studio73.es):
18+
- Eugenio Micó \<<eugenio@studio73.es>\>

crm_phonecall/report/crm_phonecall_report_view.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<field name="name">By Sales Team</field>
2929
<field name="model_id">crm.phonecall.report</field>
3030
<field name="domain">[('state','=','done')]</field>
31-
<field eval="False" name="user_id" />
31+
<field name="user_ids" eval="False" />
3232
<field name="context">
3333
{'group_by': ['team_id'], 'pivot_measures': ['nbr_cases', 'duration']}
3434
</field>
@@ -37,7 +37,7 @@
3737
<field name="name">Delay To Close</field>
3838
<field name="model_id">crm.phonecall.report</field>
3939
<field name="domain">[('state','=','done')]</field>
40-
<field eval="False" name="user_id" />
40+
<field name="user_ids" eval="False" />
4141
<field name="context">
4242
{'group_by': ['team_id'], 'pivot_measures': ['delay_close']}
4343
</field>
@@ -46,7 +46,7 @@
4646
<field name="name">Phone Calls To Do</field>
4747
<field name="model_id">crm.phonecall.report</field>
4848
<field name="domain">[('state','in',('draft','open'))]</field>
49-
<field eval="False" name="user_id" />
49+
<field name="user_ids" eval="False" />
5050
<field name="context">
5151
{'group_by': ['team_id'], 'pivot_measures': ['nbr_cases']}
5252
</field>
@@ -97,7 +97,7 @@
9797
string="Sales Team"
9898
/>
9999
<field name="user_id" string="Salesperson" />
100-
<group expand="0" string="Extended Filters...">
100+
<group>
101101
<field
102102
filter_domain="[('partner_id','child_of',self)]"
103103
name="partner_id"
@@ -106,7 +106,7 @@
106106
<field name="opening_date" />
107107
<field name="date_closed" />
108108
</group>
109-
<group expand="1" string="Group By">
109+
<group>
110110
<filter
111111
context="{'group_by':'user_id'}"
112112
name="Salesperson"
@@ -148,7 +148,7 @@
148148
<field name="name">Phone Calls Analysis</field>
149149
<field name="res_model">crm.phonecall.report</field>
150150
<field name="view_mode">pivot,graph</field>
151-
<field name="context">{'search_default_team_id': active_id}</field>
151+
<field name="context">{'search_default_team_id': id}</field>
152152
</record>
153153
<menuitem
154154
action="crm_phonecall_report_action"

crm_phonecall/security/crm_security.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
<odoo>
33
<record id="group_scheduled_calls" model="res.groups">
44
<field name="name">Show Scheduled Calls Menu</field>
5-
<field name="category_id" ref="base.module_category_hidden" />
65
</record>
76
<record id="group_show_form_view" model="res.groups">
87
<field name="name">Enable form view for phone calls</field>
9-
<field name="category_id" ref="base.module_category_hidden" />
108
</record>
119
</odoo>

crm_phonecall/static/description/index.html

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>CRM Phone Calls</title>
6+
<title>README.rst</title>
77
<style type="text/css">
88

99
/*
@@ -360,16 +360,21 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document" id="crm-phone-calls">
364-
<h1 class="title">CRM Phone Calls</h1>
363+
<div class="document">
365364

365+
366+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368+
</a>
369+
<div class="section" id="crm-phone-calls">
370+
<h1>CRM Phone Calls</h1>
366371
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367372
!! This file is generated by oca-gen-addon-readme !!
368373
!! changes will be overwritten. !!
369374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370375
!! source digest: sha256:2593b2153817e6f354a6c439ac5e080a95dbe9676e3808ff05c220a83a4a0ca0
371376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<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/crm/tree/18.0/crm_phonecall"><img alt="OCA/crm" src="https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/crm-18-0/crm-18-0-crm_phonecall"><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/crm&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/crm/tree/19.0/crm_phonecall"><img alt="OCA/crm" src="https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/crm-19-0/crm-19-0-crm_phonecall"><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/crm&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373378
<p>This module allows to manage phone calls in order to analyze them.</p>
374379
<p><strong>Table of contents</strong></p>
375380
<div class="contents local topic" id="contents">
@@ -386,7 +391,7 @@ <h1 class="title">CRM Phone Calls</h1>
386391
</ul>
387392
</div>
388393
<div class="section" id="usage">
389-
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
394+
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
390395
<p>To use this module, you need to:</p>
391396
<ol class="arabic simple">
392397
<li>Go to <em>CRM &gt; Phone Calls &gt; Logged Calls &gt; New</em>.</li>
@@ -400,31 +405,31 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
400405
</ol>
401406
</div>
402407
<div class="section" id="known-issues-roadmap">
403-
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
408+
<h2><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h2>
404409
<ul class="simple">
405410
<li>Simplify the function schedule_another_phonecall returning always a
406411
recordset</li>
407412
</ul>
408413
</div>
409414
<div class="section" id="bug-tracker">
410-
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
415+
<h2><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h2>
411416
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/crm/issues">GitHub Issues</a>.
412417
In case of trouble, please check there if your issue has already been reported.
413418
If you spotted it first, help us to smash it by providing a detailed and welcomed
414-
<a class="reference external" href="https://github.com/OCA/crm/issues/new?body=module:%20crm_phonecall%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
419+
<a class="reference external" href="https://github.com/OCA/crm/issues/new?body=module:%20crm_phonecall%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
415420
<p>Do not contact contributors directly about support or help with technical issues.</p>
416421
</div>
417422
<div class="section" id="credits">
418-
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
423+
<h2><a class="toc-backref" href="#toc-entry-4">Credits</a></h2>
419424
<div class="section" id="authors">
420-
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
425+
<h3><a class="toc-backref" href="#toc-entry-5">Authors</a></h3>
421426
<ul class="simple">
422427
<li>Odoo S.A.</li>
423428
<li>Tecnativa</li>
424429
</ul>
425430
</div>
426431
<div class="section" id="contributors">
427-
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
432+
<h3><a class="toc-backref" href="#toc-entry-6">Contributors</a></h3>
428433
<ul class="simple">
429434
<li>Odoo S.A.</li>
430435
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a><ul>
@@ -448,21 +453,26 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
448453
</ul>
449454
</li>
450455
<li>Heliconia Solutions Pvt. Ltd. &lt;<a class="reference external" href="https://www.heliconia.io">https://www.heliconia.io</a>&gt;</li>
456+
<li><a class="reference external" href="https://studio73.es">Studio73</a>:<ul>
457+
<li>Eugenio Micó &lt;<a class="reference external" href="mailto:eugenio&#64;studio73.es">eugenio&#64;studio73.es</a>&gt;</li>
458+
</ul>
459+
</li>
451460
</ul>
452461
</div>
453462
<div class="section" id="maintainers">
454-
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
463+
<h3><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h3>
455464
<p>This module is maintained by the OCA.</p>
456465
<a class="reference external image-reference" href="https://odoo-community.org">
457466
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
458467
</a>
459468
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
460469
mission is to support the collaborative development of Odoo features and
461470
promote its widespread use.</p>
462-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/18.0/crm_phonecall">OCA/crm</a> project on GitHub.</p>
471+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/19.0/crm_phonecall">OCA/crm</a> project on GitHub.</p>
463472
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
464473
</div>
465474
</div>
466475
</div>
476+
</div>
467477
</body>
468478
</html>

crm_phonecall/tests/test_crm_phonecall.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ def setUpClass(cls):
2020
{
2121
"name": "Partner1",
2222
"phone": "123 456 789",
23-
"mobile": "123 456 789",
2423
"type": "contact",
2524
}
2625
)
27-
cls.partner2 = partner_obj.create(
28-
{"name": "Partner2", "phone": "789 654 321", "mobile": "789 654 321"}
29-
)
26+
cls.partner2 = partner_obj.create({"name": "Partner2", "phone": "789 654 321"})
3027
cls.phonecall1 = cls.env["crm.phonecall"].create(
3128
{
3229
"name": "Call #1 for test",
@@ -40,7 +37,6 @@ def setUpClass(cls):
4037
{
4138
"name": "Call #2 for test",
4239
"partner_phone": "123 456 789",
43-
"partner_mobile": "987 654 321",
4440
"campaign_id": cls.campaign1.id,
4541
"source_id": cls.source1.id,
4642
"medium_id": cls.medium1.id,
@@ -50,23 +46,20 @@ def setUpClass(cls):
5046
{
5147
"name": "Opportunity #1",
5248
"phone": "111 111 111",
53-
"mobile": "222 222 222",
5449
"partner_id": cls.partner1.id,
5550
}
5651
)
5752
cls.opportunity2 = cls.env["crm.lead"].create(
5853
{
5954
"name": "Opportunity #2",
6055
"phone": "222 222 222",
61-
"mobile": "333 333 333",
6256
"partner_id": cls.partner2.id,
6357
}
6458
)
65-
cls.tag = cls.env.ref("sales_team.categ_oppor1")
6659

6760
def test_compute_phonecall_count_partner(self):
6861
partner = self.env["res.partner"].create(
69-
{"name": "Partner3", "phone": "123 654 007", "mobile": "123 654 007"}
62+
{"name": "Partner3", "phone": "123 654 007"}
7063
)
7164
phonecall = self.env["crm.phonecall"].create(
7265
{
@@ -80,7 +73,7 @@ def test_compute_phonecall_count_partner(self):
8073

8174
def test_compute_duration(self):
8275
partner = self.env["res.partner"].create(
83-
{"name": "Partner4", "phone": "123 456 007", "mobile": "123 456 007"}
76+
{"name": "Partner4", "phone": "123 456 007"}
8477
)
8578
phonecall = self.env["crm.phonecall"].create(
8679
{
@@ -98,7 +91,6 @@ def test_onchange_partner(self):
9891
phonecall_form.partner_id = self.partner2
9992
phonecall_form.save()
10093
self.assertEqual(self.phonecall1.partner_phone, self.partner2.phone)
101-
self.assertEqual(self.phonecall1.partner_mobile, self.partner2.mobile)
10294
self.assertFalse(self.phonecall1.date_closed)
10395
self.phonecall1.state = "done"
10496
self.assertTrue(self.phonecall1.date_closed)
@@ -112,7 +104,6 @@ def test_schedule_another_phonecall(self):
112104
"schedule_time": False,
113105
"name": "Test schedule method",
114106
"action": "schedule",
115-
"tag_ids": self.tag.ids,
116107
}
117108
)[self.phonecall1.id]
118109
self.assertNotEqual(phonecall2.id, self.phonecall1.id)
@@ -155,7 +146,6 @@ def test_convert2opportunity(self):
155146
result = self.phonecall2.action_button_convert2opportunity()
156147
lead = self.env["crm.lead"].browse(result["res_id"])
157148
self.assertEqual(lead.phone, self.phonecall2.partner_phone)
158-
self.assertEqual(lead.mobile, self.phonecall2.partner_mobile)
159149

160150
def test_make_meeting(self):
161151
"""Make a meeting test."""

0 commit comments

Comments
 (0)