ODOO Communication between widgets - odoo

How can I communicate between multiple widgets?
I have 2 widgets on the same page, and when clicking on one of the first widget button, I need to modify the content of the second widget.
Can anyone help me?
Details:
I extend FieldMany2One (selectbox) and ListView. What I need is, when select an option in FieldMany2One, I need to update content in ListView. What I need is to get an instantiated widget into another widget.
In method reinit_value of FieldMany2One widget, I need to get instance of the ListView.
Best regards,
Pedro

Related

Xamarin forms: custom view as a cell

In my project, I need to create a list of feeds, something like:
I think to create a XAML content view, but how can use it as a cell?
Is it a good approach?
I think the best way to go is to choose Data Template Selector. If you use Data Template Selector, You can Choose a DataTemplate (view) at runtime based on the value of a data-bound property. Lets say, In your case, your List view might have 3/4 or any number of different kind of ViewCell. Based on the type of cell you want to display different view cell.
There is a nice tutorial on Xamarin doc, you can read at https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/templates/data-templates/selector
Read this one after that (this is a example for Chat App using ViewCell) https://blog.xamarin.com/customizing-list-view-cells-xamarin-forms-datatemplateselector/
Let me know if you need any specific help after reading that.

Changing default dropdown value in sap crm web ui

I want to change default values which gets populated in the below picture.
I tried modifying get_v_role method but it didn't serve my purpose.
Please help.
In personalize->personalize settings, there is sort option. It sometimes overwrites this arrangement of values of get_v method.
Also code can be written in inbound plug of this view. I did it for overview page drop down and it worked. You can try for your search page.
For filtering/changing drop-down value of search parameter, You've to Re-define GET_DQUERY_DEFINITIONS method of ZCL_XXX_IMPL class of component. GET_V_XX methods are only used to modify drop-down/F4 help of view pages not the search view.
STEPS:
Click F2 while placing the cursor on Account ID(for which parameter you want
to modify) drop-down.
Go to BSP Component using t-code - BSP_WD_CMPWB
Enter the component name and Enhancement set
Select the view.
Go to Implementation class .
If your component is enhanced then it will be having ZCL_XXX_IMPL class. otherwise you've to enhance that component. Click on that class.
After that find GET_DQUERY_DEFINITIONS method and implement same way as
GET_V_XXX.

Windows 8 Grouped Items Page no content displayed

in my Windows 8 (Modern UI) App, i want to add a GroupedItemsPage. When I add it as my
main Page, everything Shows up, and the sample data of the template is displayed.
But when i want to add it as an additional page, that i navigate to through my MainPage,
the Content is not displayed. I only see the Title but now Elements at all.
Can anyone help me with this?
Can you provide some sample code? You might have mixed something up with the Databinding or the navigation.

How to add grid to Extjs Form and submit its data?

I am designing a highly complex data entry form using extjs 4.0. I am binding a model to my form.
Inside my model I am having a property say "Products" which represent the Product model. Now I want to show these products in Grid on my form Panel. User can add remove the products from the grid and save the form.
What is the best way to achieve this ?
If I understood you correctly you have a 1 to Many association of objects where the 1 side is loaded into a form for editing and the Many need to also be show but in a grid within the form.
The way I approached a similar design is by adding a gridpanel below the form. In my case there were other components so my grid was wrapped in a tabpanel. Similar to this example see form 5.
Now, what goes in the grid? Well I added a store representing my Many objects - or Products for your example. I setup a writer proxy for that store and added a roweditor plugin to the grid. The end result was an easy way for users to manage the relationships, edit properties of both parent and children objects all from one screen. I chose to have an autosync store for the Many store, but you dont have to. You can easily add a save button to the grid, or just bind the action to the parent's Save button.
Hope this get's your creative juices flowing :)
You could overwrite setValues(), getValues() methods of your form. Just add grid binding to the base methods. Note - no need to extend the form to create your own class. You could overwrite these functions right where you declare the form.
{
xtype: 'form',
setValues: function(){}
}
Hope this helped.

Is there a way to implement ajax search with dojo data grid component?

I am using dojox.grid.DataGrid and dojo.data.ItemFileWriteStore to render a grid. I want to implement a record search. Is there any way to do this?
After loading the page someone can search through the 'search form' above the grid. when the search button is pressed it will refresh/reload the grid data returned from the server according to the form values.
Please check the illustration.
You need to apply the filter() method on the DataGrid instance. Here you'll find the exact answer to your problem: http://dojotoolkit.org/reference-guide/dojox/grid/DataGrid.html#filtering-data