-
-
Notifications
You must be signed in to change notification settings - Fork 392
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
[8.0] New module: phonecall_plan #94
Conversation
This module provides a wizard to plan calls from partners/leads views.
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.
Thanks for the contribution!
phonecall_plan/README.rst
Outdated
@@ -0,0 +1,70 @@ | |||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
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.
@Moret84 Thanks for your contribution to the OCA.
Let me introduce to you some basic information about contribution in OCA and I will review other points in more comments inside the code..
In general, please follow the principles:
- Contribution guidelines: https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md
- Please follow the OCA README template:
https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst - We recommend to include a screenshot as well to help new comers (nice to have)
- Please use simple headers in all py files following OCA templates
https://github.com/OCA/maintainer-tools/blob/master/template/module/__openerp__.py#L3
phonecall_plan/README.rst
Outdated
:alt: License: AGPL-3 | ||
|
||
============== | ||
phonecall_plan |
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 plain English "Phonecall Plan"
phonecall_plan/README.rst
Outdated
phonecall_plan | ||
============== | ||
|
||
This module add a wizard to allow you to plan call from lead/partner view. |
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 module adds a wizard to allow you to plan calls from the lead and partner views."
phonecall_plan/README.rst
Outdated
|
||
This module add a wizard to allow you to plan call from lead/partner view. | ||
|
||
Installation |
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.
Remove the section which does not add any added value (this is the standard process)
phonecall_plan/README.rst
Outdated
|
||
To install this module, you just need to select it from availables modules | ||
|
||
Configuration |
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.
same here
phonecall_plan/__init__.py
Outdated
@@ -0,0 +1,22 @@ | |||
# -*- 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.
please use short headers
phonecall_plan/__openerp__.py
Outdated
'name': 'Phonecall plan', | ||
'summary': "Wizard to plan calls from leads/partners", | ||
'version': '8.0.1.0.0', | ||
'depends': ['base', 'crm'], |
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.
Nothing wrong here but you can improve it putting the dependencies and data files in a separate line (check other OCA modules)
Non-blocking though
@@ -0,0 +1,99 @@ | |||
# Translation of Odoo Server. |
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.
remove this file
phonecall_plan/wizards/__init__.py
Outdated
@@ -0,0 +1,22 @@ | |||
# -*- 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.
headers (all py files)
<field name="name">Scheduled calls</field> | ||
<field name="model">add.call</field> | ||
<field name="arch" type="xml"> | ||
<form> |
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.
Can you improve the indentation (too wide/too many spaces per indentation)?
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.
I have 4 spaces per indent. Do you think it is too much? Should I use 2 instead ?
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.
I think you have tabs instead of spaces
Thanks for your review. So sorry, I contribute for the very first time. I read carefully all docs, but it seems I forgot some parts. I've made a commit with all changes from your comments. |
phonecall_plan/README.rst
Outdated
|
||
To use this module, you need to: | ||
|
||
More |
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 this title?
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.
Do you have an other idea for the title ?
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, just remove it.
phonecall_plan/__init__.py
Outdated
@@ -0,0 +1,22 @@ | |||
# 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.
Short headers according template https://github.com/OCA/maintainer-tools/blob/master/template/module/__init__.py
phonecall_plan/__init__.py
Outdated
############################################################################## | ||
# | ||
# Odoo, Open Source Management Solution | ||
# Copyright (C) 2015 Fogits Solutions - http://www.fogits.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.
Why is here another company name?
phonecall_plan/__openerp__.py
Outdated
'base', | ||
'crm' | ||
], | ||
'author': 'Aurélien Rivet, 6IT, Odoo Community Association (OCA)', |
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.
Here there should be only companies, nor individuals (unless you are on your own). I see 2 author entries here.
return {} | ||
|
||
|
||
class AddPartnerCall(models.TransientModel): |
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.
One model per file.
obj_phone = self.env['crm.phonecall'] | ||
for partner in self.partner_ids: | ||
obj_phone.create( | ||
{ |
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 save one line and one indentation level if you put this bracket in the previous line.
'user_id': self.salesperson_id.id, | ||
'state': "open", | ||
}) | ||
return {} |
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.
Just return True.
Can you include tests? |
@Moret84, are you going to work on the comments? |
Yeah I'm sorry . I changed my code. But I haven't written test yet. I am afraid I don't really know how to write effective of them. I feel a bit ashamed. |
OK, no problem for the tests. They are not mandatory. |
Oops I forgot one point of your review in my latest commit (one model per file). I also noticed a check didn't pass because of the deprecated "active" key in the manifest file. Will fix it soon. |
Hi @Moret84 , thanks for this contribution. This module looks very useful an if you could continue with it we will help you in reviews. Let us know please. Thanks again |
Please, rename module to crm_phonecall_plan |
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.
Code Review
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/111/8.0 |
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.
The Runbot link does not work.
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.
Hi @misern2. I have seen that the link points to the top-menu entry: website. If you are entering for first time you can change the url with http://3293144-94-bbe389.runbot2.odoo-community.org/web to enter the login page.I hope this helps.
Please @elicoidal @pedrobaeza unblock this PR, thanks! |
When i try to test it from partner view, when i try to confirm the wizard it show an error like: The operation cannot be completed, probably due to the following:
[object with reference: summary_id - summary.id] ` I hope it helps. |
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.
some details. No test
please attend comment on error
|
||
============== | ||
CRM Phonecall Plan | ||
============== |
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.
Lines must be at least as long as the title
for partner in self.partner_ids: | ||
obj_phone.create({ | ||
'date': self.date, | ||
'name': _('To fill !!!'), |
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.
Please improve description...
Hi @Moret84 , please could you review comments? Are you going to continue with this PR? |
Hi @rafaelbn I am not working on Odoo anymore so I won't continue with this PR. |
This module provides a wizard to plan calls from partners/leads views.