Code review comment for lp:~openerp-dev/openobject-addons/7.0-fix-contact-company-handling

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

On 2013-04-18, Joël Grand-Guillaume wrote:
> For what I've tested today, and from a functional point of view here, it
> remains one big issue (may be miss some still...) : all the group by features.
>
> I don't know if you think about providing a new module (same feature than you
> did for invoice) for other objects ? At least on invoices (and accounting
> entries but that was already mostly ok), it works as expected.

Yes the group by issue is the main problem that remained, and we've now tried to find a way to improve the situation globally, via 2 changes:
 - the partner display name (name_get) was changed to "Company, Contact" to make the choice of the company very clear
 - this display name name is now also used as the default ordering for res.partner (when account_report_company) is installed

This is not a perfect solution but its mitigate the problem and will ensure that results are always consistent when searching/filtering/sorting by partners: the Company and its Contacts will always be physically grouped (as successive rows) everywhere:
 - in name_search results when trying to choose a partner
 - in the list/kanban views of partners
 - whenever any list of business documents is ordered by Customers/Supplier/Partner/Contact
 - in any view using "group by" res.partner (regular lists and analysis views)

Even if all fields are not directly summed/aggregated together in all cases like for invoices, at least the data will be impossible to miss, e.g:
  - Agrolait
  - Agrolait, Michel Fletcher
  - Agrolait, Thomas Passot
  - Axelor
  - Axelor, Laith Jubair
  - etc.

With this change I think the merge proposals are in a correct state to be merged in the 7.0 branch, and they represent quite an improvement in correctness and usability as compared to the current 7.0, thanks to all the feedback that was provided by everyone.

Then if we notice that this is *really* insufficient for a certain case, we may add another module similar to account_report_company. However this really needs to be experienced in practice with real users in their daily use, not simply compared with what was possible in 6.1. For example POs have very limited address management (no delivery/invoice address like SO), and partners are filtered by default on the "supplier" flag, so in practice users should not tend to use different contacts for different orders to the same supplier. For Deliveries/Shipments grouping by partner has little use as there's not much to aggregate in the list view except the row count.

> - Incomming shipment and Delivery Order : no group by here by default, but
> making to incoming shipment for Agrolait and one on Michel Fletcher
> (Agrolait), I would expect I can at least search on "Agrolait" and find all
> picking related to them. Not finding them is really sad...

For some reason the partner_id field was simply missing from the search view on Incoming Shipments and Delivery Orders, while it was in the one for Internal Moves as well as "Incoming/Outgoing Products".
This has been corrected and the proper field (with child_of operator to match contact) was added to these search views.
A number of remaining relevant search views were also fixed at the same time (including the Analysis views too):
 - Analytic Accounts
 - Assets
 - CRM Leads, Opportunities, Phone Calls
 - CRM Claims
 - CRM Helpdesk
 - MRP Repairs
 - Projects
 - Project Issues
 - Stock Pickings
 - Vouchers (somes search views had not been fixed yet)

Thanks again for your tests and feedback!

« Back to merge proposal