Merge lp://qastaging/~camptocamp/partner-contact-management/partner_firstname_vre_firstname_crm into lp://qastaging/~partner-contact-core-editors/partner-contact-management/7.0

Proposed by Vincent Renaville@camptocamp
Status: Needs review
Proposed branch: lp://qastaging/~camptocamp/partner-contact-management/partner_firstname_vre_firstname_crm
Merge into: lp://qastaging/~partner-contact-core-editors/partner-contact-management/7.0
Diff against target: 405 lines (+369/-0)
7 files modified
crm_firstname/__init__.py (+21/-0)
crm_firstname/__openerp__.py (+42/-0)
crm_firstname/crm.py (+196/-0)
crm_firstname/crm_view.xml (+20/-0)
crm_firstname/data.xml (+12/-0)
crm_firstname/i18n/crm_firstname.pot (+39/-0)
crm_firstname/i18n/fr.po (+39/-0)
To merge this branch: bzr merge lp://qastaging/~camptocamp/partner-contact-management/partner_firstname_vre_firstname_crm
Reviewer Review Type Date Requested Status
Lorenzo Battistini (community) Needs Resubmitting
Sandy Carter (http://www.savoirfairelinux.com) pep8 Needs Fixing
Yannick Vaucher @ Camptocamp code review, no test Approve
Alexandre Fayolle - camptocamp code review, no test Approve
Review via email: mp+213673@code.qastaging.launchpad.net

Description of the change

This add the functionality :

- When a email is received , it will create the lead + the partner (Firstname and Lastname is discovered based on email address).

- The partner created is set as follower of the lead.

To post a comment you must log in.
32. By Vincent Renaville@camptocamp

[FIX] author

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Hello,

Thanks for this proposal. Here are few things to fix.

In _compute_name_custom why not using the same way to construct the full name?

http://bazaar.launchpad.net/~partner-contact-core-editors/partner-contact-management/7.0/view/head:/partner_firstname/partner.py#L43

ir.model.data is defined twice.

128 + obj_data = self.pool.get('ir.model.data')
129 + ## We search category for this contact :
130 + obj_data = self.pool.get('ir.model.data')
131 + ##

By the way you can use list index

self.pool['ir.model.data']

crm.py|111 col 1| F841 local variable 'create_context' is assigned to but never used

ll.133 - 139 missing context in search and browse

review: Needs Fixing (code review, no test)
33. By Vincent Renaville@camptocamp

[FIX] add missing context in browse and search, use the same contract_name function as specified in partner_firstname, remove un used variable

Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Thanks Yannick for your review,

I have fixed according to your review at rev 33.

For the _compute_name_custom , I think I have used an old version of the version present partner_firstname module.
I have update it as well.

Vincent

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Could you provide some docstring and exemples of what will do _common_lead_partner ?

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

I fail to see how the addon name "crm_firstname" relates to the described functionality. Please copy the description provided in the MP in __openerp__.py : this is what people looking at the module will see.

__openerp__.py : s/demo_xml/demo/ and then remove it as it is empty

+ 'email': tools.email_split(lead.email_from) and tools.email_split(lead.email_from)[0] or False, => use the val if cond else default construct if you absolutely want this on a single line. Same thing for the other fields in that dict.

you forgot to add the tests and to link them in __openerp__.py :-)

review: Needs Fixing (code review, no test)
34. By Vincent Renaville@camptocamp

[FIX] improve module name and description + remove unused section

35. By Vincent Renaville@camptocamp

[FIX] impve code readibility

Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello,

Thanks for the review

I have improve code visibility according to your review and the module description.

I have test manually with different kind of email.

Thanks for the review

Vincent

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

OK.

I'd still like to see tests in the near future for this one.

review: Approve (code review, no test)
36. By Vincent Renaville@camptocamp

[FIX] typo

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) :
review: Approve (code review, no test)
37. By Vincent Renaville@camptocamp

[FIX] Cleaning of unused field

Revision history for this message
Sandy Carter (http://www.savoirfairelinux.com) (sandy-carter) wrote :

crm_firstname/__openerp__.py:22:1: O603 Manifest "license" key is missing
crm_firstname/__openerp__.py:35:19: E231 missing whitespace after ','
crm_firstname/__openerp__.py:37:11: E126 continuation line over-indented for hanging indent
crm_firstname/__openerp__.py:39:11: E123 closing bracket does not match indentation of opening bracket's line
crm_firstname/__openerp__.py:41:2: O600 Warning unknown Manifest key ('active') <-- deprecated
crm_firstname/crm.py:5:30: W291 trailing whitespace
crm_firstname/crm.py:35:30: E127 continuation line over-indented for visual indent
crm_firstname/crm.py:41:1: W293 blank line contains whitespace
crm_firstname/crm.py:43:17: E126 continuation line over-indented for hanging indent
crm_firstname/crm.py:48:77: W291 trailing whitespace
crm_firstname/crm.py:49:17: E123 closing bracket does not match indentation of opening bracket's line
crm_firstname/crm.py:58:9: E265 block comment should start with '# '
crm_firstname/crm.py:58:11: W291 trailing whitespace
crm_firstname/crm.py:67:80: E231 missing whitespace after ','
crm_firstname/crm.py:70:1: W293 blank line contains whitespace
crm_firstname/crm.py:77:17: E126 continuation line over-indented for hanging indent
crm_firstname/crm.py:91:26: E231 missing whitespace after ':'
crm_firstname/crm.py:113:17: E265 block comment should start with '#

review: Needs Fixing (pep8)
Revision history for this message
Lorenzo Battistini (elbati) wrote :

This project is now hosted on https://github.com/OCA/partner-contact. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

review: Needs Resubmitting

Unmerged revisions

37. By Vincent Renaville@camptocamp

[FIX] Cleaning of unused field

36. By Vincent Renaville@camptocamp

[FIX] typo

35. By Vincent Renaville@camptocamp

[FIX] impve code readibility

34. By Vincent Renaville@camptocamp

[FIX] improve module name and description + remove unused section

33. By Vincent Renaville@camptocamp

[FIX] add missing context in browse and search, use the same contract_name function as specified in partner_firstname, remove un used variable

32. By Vincent Renaville@camptocamp

[FIX] author

31. By Vincent Renaville@camptocamp

[IMP] pep8 + translation

30. By Vincent Renaville@camptocamp

[ADD] Follower + add email in name in case no contact found

29. By Vincent Renaville@camptocamp

[FIX] change osv to orm

28. By Vincent Renaville@camptocamp

[FIX] remove pdb

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: