related field doesn't return all results with one2many field

Bug #687536 reported by Tristan Hill
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP's Framework R&D

Bug Description

The current related field implementation only follows the first item of one2many or many2many field if it is not the last specified field. This can mean that not all expected items are returned.

Branch to be linked that follows all items in these fields if the related field type is set to one2many or many2many.

Changed in openobject-server:
status: New → Invalid
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Tristan,

   I have checked the issue in 6.0 with latest revisions. fields.realted type="one2many" and "many2many" are having all the records of the related field. So it doesn't seem to be a real problem.
  It can be the case that when you're using a related reference from a one2many field then it will take the reference of the first record only.
  For e.g.
  Case 1 : Reference from O2M
    Sale Order -> Field-Sale Order Lines(O2M)
    Sale Order -> Field-Taxes(M2M related to Sale Order Lines)
  In the above case it will take all the taxes from the first sale order line.

  Case 2 : Reference from M2M
    Sale Order -> Field-Customer(M2O)
    Sale Order -> Field-Address(O2M related to Customer)
    Sale Order -> Field-Category(M2M related to Customer)
  In this case all the addresses and categories of the particular Customer will be there in the related O2M and M2M fields.

Thanks

Revision history for this message
Tristan Hill (stan) wrote :

Hi Anup,

> Case 1 : Reference from O2M
> Sale Order -> Field-Sale Order Lines(O2M)
> Sale Order -> Field-Taxes(M2M related to Sale Order Lines)
> In the above case it will take all the taxes from the first sale order line.

This sounds like the issue I'm referring to. Would you not expect this taxes field to return the taxes for all order lines?

Revision history for this message
Tristan Hill (stan) wrote :

Hi

Maybe this can be mentioned in the documentation if the implementation is not changed?

Thanks

Changed in openobject-server:
status: Invalid → New
Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Tristan,

    The feature needs to be discussed. It can be considered for the future releases as it's not breaking the system.
    Experts, please share your views.

Thanks.

Changed in openobject-server:
importance: Undecided → Wishlist
status: New → Confirmed
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
Revision history for this message
Dimitri John Ledkov (ex-credativ) (dle-credativ) wrote :

Any other comments from anyone on this issue? Can this branch be merged? We need to follow all m2m fields related most of the time especially if it's 2-3 hops.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.