Merge lp://staging/~hirt/ocb-addons/6.1_base_contact_finalize into lp://staging/ocb-addons/6.1

Proposed by Etienne Hirt
Status: Needs review
Proposed branch: lp://staging/~hirt/ocb-addons/6.1_base_contact_finalize
Merge into: lp://staging/ocb-addons/6.1
Diff against target: 973 lines (+559/-100)
4 files modified
base_contact/__openerp__.py (+11/-6)
base_contact/base_contact.py (+294/-53)
base_contact/base_contact_view.xml (+252/-40)
base_contact/security/ir.model.access.csv (+2/-1)
To merge this branch: bzr merge lp://staging/~hirt/ocb-addons/6.1_base_contact_finalize
Reviewer Review Type Date Requested Status
Omar (Pexego) code review, no test Needs Fixing
Review via email: mp+193941@code.staging.launchpad.net

Description of the change

Finalising the base contact 6.1 desig by adding the missing fields as described in https://bugs.launchpad.net/openobject-addons/+bug/923440

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Etienne, thank you for making again the MP properly. I will check it, but it's a huge diff for only a bugfix. I'm not sure if this is going to fit into OCB project and goals.

Let's see what others reviewers say.

Regards.

Revision history for this message
Etienne Hirt (hirt) wrote :

Dear Pedro,

Thanks for your offer to check it.

Somehow the redesign of the base_contact module for 6.1 was never
finished as it was abandoned by openerp. I prepared the fixes some time
ago to have the function available at Art of Technology. This
functionality is also the main reason for us not considering Version 7
(yet).

The effort now is to have others being able to profit from it, too and
also to profit from the community.

Best Regards

Etienne

On 05.11.2013 17:09, Pedro Manuel Baeza wrote:
> Hi, Etienne, thank you for making again the MP properly. I will check it, but it's a huge diff for only a bugfix. I'm not sure if this is going to fit into OCB project and goals.
>
> Let's see what others reviewers say.
>
> Regards.

Revision history for this message
Omar (Pexego) (omar7r) wrote :

At first sight, you should remove pdb import and the commented lines, on the other hand, you convert the partner_id field, from related to function field without search function, this field could be used in several addons as filter, with function field will not work anymore at least without search function.
IMHO I prefer name_search as works now, because your way don't support, for example, with compound first names or more than one last name, this is applyable to view_init function too.

It's a huge diff as Pedro said and I think that isn't the best way to complete this addon but we can wait for opinion of other reviewers, for now, I will mark it as needs fixing, for the up things.

Regards

review: Needs Fixing (code review, no test)
Revision history for this message
Etienne Hirt (hirt) wrote :

Dear Omar,

thanks for the review and your valuable comments. Please check my
answers below.

Best Regards

Etienne

On 20.11.2013 01:19, Omar (Pexego) wrote:
> Review: Needs Fixing code review, no test
>
> At first sight, you should remove pdb import and the commented lines, on the other hand,
mostly done
> you convert the partner_id field, from related to function field without search function, this field could be used in several addons as filter, with function field will not work anymore at least without search function.
With the related field you have no real control what partner is selected
as main partner.
Originally I wanted to have conditional storage but this somehow did not
work. I removed it then because contacts are nowhere searched for
partners as far as I know. Also IMHO the related fields can not be
searched if not stored.
What do you propose?
> IMHO I prefer name_search as works now, because your way don't support, for example, with compound first names or more than one last name, this is applyable to view_init function too.
Please check again the proposed search function. Because it's intention
is to extend the original function instead of limit it. Should we also
consider one lastname with multiple/compound first names?

Without the view_init function all newly entered contacts are filled
into lastname only. Thus the proposed function is an extension but not
perfect as it can not guess that multiple Firstnames are used.
>
> It's a huge diff as Pedro said and I think that isn't the best way to complete this addon but we can wait for opinion of other reviewers, for now, I will mark it as needs fixing, for the up things.
>
> Regards

Revision history for this message
Omar (Pexego) (omar7r) wrote :

Hi Etienne,

Thanks for updating. Related fields can not be grouped but, searched yes. Other solution, you could have a search function defined in your function field.

At Spain for example, everyone have two last names and one or two first names, like Jose Antonio or Diego Armando, we could not have limitation in that.

Regards

Revision history for this message
Etienne Hirt (hirt) wrote :

Hi Omar,

Thanks for insisting. With your inputs I found now a solution that supports any number of first and lastname for all searches. This was not the case in the baseline I started with.

Also the partner_id I could change back to related as the sorting of the address_id fits the requirements for the main job.

The view_init is a helper function that is a 90% solution but helps the user even if the remaining 10% when there is more than one firstname.

The partner_contact class is ready for re-reviewing. But the partner_address requires some further work. I therefore set the state to WIP.

Best Regards

6817. By Etienne Hirt

remove the executable flag that wrongly added in last commit

6818. By Etienne Hirt

* store partner_id in location directly to solve usability issue of having
  locations assigned to partners if any and to view it while using.
  Attention: this commit does not store the partner_ids yet at updating
             but for install the module it is added.
* override copy method for res.partner.location to avoid copying the
  related addresses's

6819. By Etienne Hirt

add auto_init for partner_id in res_partner_location

6820. By Etienne Hirt

* streamline location editing
* enhance and streamline search

6821. By Etienne Hirt

delete action as menu deletion did not work for upgrade contact/address with new action

6822. By Etienne Hirt

*further streamlining location editing
*restrict deletion of partner when there are assigned addresses

6823. By Etienne Hirt

* changes of partner of address does still not fully update the location partner_id
to be continued

6824. By Etienne Hirt

* use storage triggers for partner_id in res_partner_location
* minor UI adjustments:
** group extended for location menu but not addresses
** add partner to functions/addresses in contact form

6825. By Etienne Hirt

* enhance contact and location search
* fix length of name in contact to allow full lenght of last_name + first_name

6826. By Etienne Hirt

void delection of assigned locations

6827. By Etienne Hirt

commit files no longer executable

6828. By Etienne Hirt

do merge

6829. By Etienne Hirt

add street to res_partner_address displayname

6830. By Etienne Hirt

add other phone to address tree and form

6831. By Etienne Hirt

* store all related fields from location if one changes
* add trigger on change_location_id also because the on_change function does not store all changes!

Unmerged revisions

6831. By Etienne Hirt

* store all related fields from location if one changes
* add trigger on change_location_id also because the on_change function does not store all changes!

6830. By Etienne Hirt

add other phone to address tree and form

6829. By Etienne Hirt

add street to res_partner_address displayname

6828. By Etienne Hirt

do merge

6827. By Etienne Hirt

commit files no longer executable

6826. By Etienne Hirt

void delection of assigned locations

6825. By Etienne Hirt

* enhance contact and location search
* fix length of name in contact to allow full lenght of last_name + first_name

6824. By Etienne Hirt

* use storage triggers for partner_id in res_partner_location
* minor UI adjustments:
** group extended for location menu but not addresses
** add partner to functions/addresses in contact form

6823. By Etienne Hirt

* changes of partner of address does still not fully update the location partner_id
to be continued

6822. By Etienne Hirt

*further streamlining location editing
*restrict deletion of partner when there are assigned addresses

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