← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 708467] Re: Act_window : Incomplete behavior

 

To summarize the 2 parts of the current view:

1. Default for new records:
This is settled by the proposed branch from Ujjvala, which we'll review and merge.

2. Filtered records on click of act_windows:
Jay, I can't agree with your suggestion to add a "context_domain" for this purpose. Firstly because 6.0 is out and such API changes are against the policy on a stable branch, secondly, because it would add yet another weird context parameter, making the API and XML even more complex, and finally, because it would mean that the same info is added yet another time to the context in a different syntax.. i.e. more duplication of code (search_default + default_ + context_domain?).
So let's pick option B, which is the same as what I proposed (yes when you clear the search the default coming from the related link is dropped too). We can thus discuss this implementation on both GTK and Web Client.

As a summary for the R&D teams, this means we modify the clients to
handle the search_default_xxx values on many2one fields as exact matches
using the ID (e.g. adding to the domain something like
[('field_id','=',id)], and revert to the default behavior
[('field_id','ilike','value')] as soon as a manual value is entered or
the search view is cleared.

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/708467

Title:
  Act_window : Incomplete behavior

Status in OpenERP Server:
  Confirmed

Bug description:
  There has been a problem observed on act_windows(links or shortcuts).

  The problem is, act_windows do not respect domain and they work
  according to context set on search panel,but this context can lead to
  a completely wrong result.

  Example:
  Install stock module(With demo data).
  Go to Sales/Products , edit the code of CPU1 to be CPU.
  Click on Stock Moves(act_windows), you will see that the the purpose of link is not served at all. (result includes records for cpu2,cpu3) as well.

  
  Second problem, clicking NEW should set default product_id on new Stock.move,which doesn't happen anymore.

  Overall,
  1. If domain is not supposed to beset, there should be a special key which loads FILTERED records on links.
  2. 'default_FIELD':active_id or kind of relevant entry should appear in context.

  Thanks.





References