Skip to content
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

Closed
wants to merge 6 commits into from
Closed

[8.0] New module: phonecall_plan #94

wants to merge 6 commits into from

Conversation

Moret84
Copy link

@Moret84 Moret84 commented May 17, 2016

This module provides a wizard to plan calls from partners/leads views.

This module provides a wizard to plan calls from partners/leads views.
@coveralls
Copy link

coveralls commented May 17, 2016

Coverage Status

Coverage decreased (-0.9%) to 78.07% when pulling 7773fa2 on Moret84:8.0 into 9f830ec on OCA:8.0.

@Moret84 Moret84 changed the title New module: phonecaall_plan. New module: phonecall_plan May 17, 2016
@Moret84 Moret84 changed the title New module: phonecall_plan [8.0] New module: phonecall_plan May 23, 2016
Copy link

@elicoidal elicoidal left a 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!

@@ -0,0 +1,70 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg

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:

:alt: License: AGPL-3

==============
phonecall_plan

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
==============

This module add a wizard to allow you to plan call from lead/partner view.

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."


This module add a wizard to allow you to plan call from lead/partner view.

Installation

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)


To install this module, you just need to select it from availables modules

Configuration

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use short headers

'name': 'Phonecall plan',
'summary': "Wizard to plan calls from leads/partners",
'version': '8.0.1.0.0',
'depends': ['base', 'crm'],

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this file

@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-

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>

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)?

Copy link
Author

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 ?

Copy link
Member

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

@Moret84
Copy link
Author

Moret84 commented Oct 9, 2016

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.


To use this module, you need to:

More
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this title?

Copy link
Author

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 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, just remove it.

@@ -0,0 +1,22 @@
# coding: utf-8
##############################################################################
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

##############################################################################
#
# Odoo, Open Source Management Solution
# Copyright (C) 2015 Fogits Solutions - http://www.fogits.com
Copy link
Member

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?

'base',
'crm'
],
'author': 'Aurélien Rivet, 6IT, Odoo Community Association (OCA)',
Copy link
Member

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):
Copy link
Member

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(
{
Copy link
Member

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 {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just return True.

@pedrobaeza
Copy link
Member

Can you include tests?

@pedrobaeza
Copy link
Member

@Moret84, are you going to work on the comments?

@Moret84
Copy link
Author

Moret84 commented Oct 20, 2016

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.

@pedrobaeza
Copy link
Member

OK, no problem for the tests. They are not mandatory.

@Moret84
Copy link
Author

Moret84 commented Oct 21, 2016

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.

@rafaelbn
Copy link
Member

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

@rafaelbn rafaelbn added this to the 8.0 milestone May 11, 2017
@rafaelbn
Copy link
Member

Please, rename module to crm_phonecall_plan

Copy link

@misern2 misern2 left a 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
Copy link

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.

Copy link

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.

@rafaelbn
Copy link
Member

Please @elicoidal @pedrobaeza unblock this PR, thanks!

@JoanDx
Copy link

JoanDx commented May 31, 2017

When i try to test it from partner view, when i try to confirm the wizard it show an error like:
`Integrity Error

The operation cannot be completed, probably due to the following:

  • deletion: you may be trying to delete a record while other records still reference it
  • creation/update: a mandatory field is not correctly set

[object with reference: summary_id - summary.id] `
And from Lead view it doesnt appear nothing like plan a call in submenu More.

I hope it helps.

Copy link

@elicoidal elicoidal left a 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
==============

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 !!!'),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please improve description...

@rafaelbn
Copy link
Member

rafaelbn commented Jun 8, 2017

Hi @Moret84 , please could you review comments? Are you going to continue with this PR?

@Moret84
Copy link
Author

Moret84 commented Jun 8, 2017

Hi @rafaelbn I am not working on Odoo anymore so I won't continue with this PR.

@Moret84 Moret84 closed this Jun 8, 2017
@rafaelbn rafaelbn reopened this Jul 10, 2017
@rafaelbn rafaelbn closed this Jul 11, 2017
@rafaelbn rafaelbn reopened this Jul 11, 2017
@rafaelbn rafaelbn closed this Jul 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants