-
-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[9.0][ADD] crm_phonecall module #131
Conversation
5f01d4a
to
b6a2e0b
Compare
b6a2e0b
to
b047f17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work extracting, passing to new API and testing some parts. A little more to do in my comments for improving still more and we were good to go.
crm_phonecall/README.rst
Outdated
Contributors | ||
------------ | ||
|
||
* Vicent Cubells <vicent.cubells@tecnativa.com> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put Odoo S. A.
crm_phonecall/__init__.py
Outdated
@@ -0,0 +1,8 @@ | |||
# -*- coding: utf-8 -*- | |||
############################################################################## |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use new header style
crm_phonecall/__openerp__.py
Outdated
"name": "CRM Phone Calls", | ||
"version": "9.0.1.0.0", | ||
"category": "Customer Relationship Management", | ||
"author": "Tecnativa, " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include Odoo S. A.
crm_phonecall/models/res_partner.py
Outdated
phonecall_count = fields.Integer( | ||
compute='_phonecall_count', | ||
string="Phonecalls", | ||
copy=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being computed, copy and default are ignored.
from openerp import tools | ||
from openerp import fields, models | ||
|
||
AVAILABLE_STATES = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you take it from the same source instead of creating the list 2 times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list is created only one time.
|
||
tools.drop_view_if_exists(cr, 'crm_phonecall_report') | ||
cr.execute(""" | ||
create or replace view crm_phonecall_report as ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this report inheritable extracting the SQL parts in methods as you already seen in for example invoices.
tag_id = data_obj.browse(res_id).res_id | ||
except ValueError: | ||
pass | ||
if 'name' in fields: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do here a loop here for avoiding too much code:
for field in ('name', 'user_id'...):
if field in fields:
res[field] = getattr(phonecall, field)
phonecalls.schedule_another_phonecall( | ||
this.date, | ||
this.name, | ||
this.user_id.id or False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need of the or False
Other comment from migration (for at least avoiding a crash):
|
Another thing: you need to rename ir.filters from crm.phonecall.report or there will be a duplicated name error. |
9f24772
to
a6eba81
Compare
I'll rebase on pass tests... |
d154c06
to
6c26edc
Compare
6c26edc
to
bc7a6b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionallity checked but you can only access Sales >
Configuration > Leads & Opportunities > Phone Calls > Categories if you are in developer mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on runbot
This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history.
This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history.
* crm_phonecall module (#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
* crm_phonecall module (OCA#131) This module is the part extracted from Odoo v8 crm module from Odoo that allows to record phone calls. As it has been stripped off from Odoo v9, we add again the feature via this module. Migration scripts are also included to upgrade a v8 database via OpenUpgrade and don't lose your history. * [MIG] crm_phone_call: Migrated to 10.0 - FIX: Correct some lint errors * [MIG] crm_phone_call: Migrated to 10.0
Extracted model from crm module to manage phone calls.
Addition is needed for users who want to analyze those calls, imputed times and much more.
WIP because I'm working on tests now.
cc @Tecnativa