Odoo: Hide one option inside a dropdown menu - odoo

I would like to hide one of the options that appears in a dropdown menu. For example, i want to hide the option "Modulos" in the dropdown "Equipo" so the user cant select it. Is this possible? How?
Thank you in advance

Add domain in your many2one dropdown field.
equipo = fields.Many2one('model.name', 'Equipo', domain = [('field_name','!=','Modulos')])

Related

Unable to Click on Edit Button , in WebTable

I am using xpath to click on edit button , but i dont know where the webtable starts so i can click on the webelement.
Below is the link for WebTable.
http://demo.automationtesting.in/WebTable.html
Thanks in Advance.
Try this:
// gets the first edit button
WebElement Edit_btn= driver.findElements(By.xpath("//div[#class = 'avddbl']/button")).get(0);
Actions action = new Actions(driver).doubleClick(Edit_btn);
action.build().perform();
If you want some specific selection e.g. want to edit info of particular user
Then you can use below xpath where you have to changes email address only it will click on the edit icon of that particular record .
//div[text()='steven#hotm.com']/../following-sibling::div//div[#class='avddbl']/button[contains(#class,'btn')]

MS Visual Studio - How do I use a button to Sort my combobox variables?

I searched and only found how to sort combobox variables through the Properties sidebar. This will not work for what I'm trying to do.
I have a textbox where the user will type in a name. They click the Add button, and the name is added to the combobox options. Let's say I add "Bob" then "Andy" then "Carl". In the combobox it would list them in that order.
I need to use a button that will sort these names alphabetically. How would I do that?
Instead of changing the "Sorted" in properties to true, I set it so that when you click the button, it would do this. So the "Sort" button code would look like this:
ComboBox1.Sorted = True
Put them in an array and use Array.Sort then back into the combobox

Word: remove page from multipage userform

I want, depending of the previous choice from the user just let some tab's being seen.
Once i am new in VBA, i start showing all the tab's and after the choice from the user, i remove the tab's that i don't want. For that i am using this line of code
MultiPage1.Pages.Remove "name of the tab"
The problem is, if i don't have the same CAPTION and the NAME field of the tab the tab is not remove.
If anyone have a diferent solution for this or another away to remove without have to change the caption for the same name of NAME field i would be thankful.
Thanks
You can give a page of a multi-page control a different name from the caption in the Properties Window. You can access it from the View menu.
I've highlighed the name of the control in yellow and the caption in aqua.
If the captions are unique, you could use a Select Case statement to get the name, based on the caption. Are users actually typing in the caption of the tabs they want, or selecting from check boxes? In either case, the captions would have to be unique, so you could do something like:
Select Case True
Case Check1.Value
MultiPage1.Pages.Remove Pages("kp").Index
Case Check2.Value
MultiPage1.Pages.Remove Pages("jp").Index
End Select
That's a bit rough, but is that the general idea?

Need to build a macro that will take value(table name/form name) from a textbox and open the related table/form in ACCESS

i want to create a starting form in ACCESS that will hold a Textbox and a button.If user input text(say form name/table name) and click the button,it will show the form/table.If the name is not correct it will show a message.I am new in access.please help me with the macro or other things.
Thanks in advance.
Create a table and put the choices.
Create a blank form in design view.
In this blank form add a text box and a button.
Right click the text box, then choose Change To Combo Box
View the Combo Box properties
From the combo box properties, go to Data Tab
Here, you will see Row Source. Click the drop down in the Row Source and select the table where you put your choices.
You can Limit users to choose only from the available choices by changing Limit to List from No to Yes.
If you will limit your users from the choices, better not to add the button.

Select dropdownlist item after button click

I have an asp drowndownlist and I'd like to change its selection after a button click. I can't seem to find a way to do this, is there a way? (Its a reset button of sorts, and I would like the dropdownlist to return to the "default" value.)
DropDownList.SelectedIndex = -1
In the click event can you do:
DropDownList.SelectedItem = "whatever";
DropDownList.DataBind()
?
Use
dropdownlist.ClearSelection()