Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
6086 Zobrazení

how to create new button using studio module 

Avatar
Zrušit
Nejlepší odpověď

Creating a new button using Odoo Studio typically involves the following steps:

  1. Accessing Odoo Studio:

    • Log in to your Odoo instance as an administrator.
    • Go to the module for which you want to create a new button.
  2. Entering Studio Mode:

    • In the top-right corner, click on the "Edit" or "Customize" button to enter the Studio mode. This mode will allow you to make changes to the application's interface and behavior without coding.
  3. Adding a Button:

    • Once in Studio mode, navigate to the appropriate model (e.g., a specific object or record type) to which you want to add a button.
    • From the left sidebar, choose "Views" or "Buttons" (the exact wording might differ based on your Odoo version).
  4. Creating the Button:

    • Click on "Create" or a similar option to add a new element to the selected view.
    • Select the element type as "Button."
  5. Configuring the Button:

    • Give the button a name that describes its purpose.
    • Define the action that the button should perform. This might include opening a form, triggering a specific workflow action, or executing a custom function.
    • Configure the button's appearance, label, and any other visual aspects.
  6. Setting the Button Action:

    • Depending on the action you want the button to perform, you might need to link it to a specific action or function. This could involve opening a specific view, executing a server action, or running a predefined workflow.
  7. Save and Apply Changes:

    • Once you've configured the button, save your changes within Studio.
    • Exit Studio mode.
  8. Testing the Button:

    • Navigate to the relevant record or object in Odoo and check if the new button appears.
    • Click on the button and ensure that it performs the desired action correctly.



Avatar
Zrušit
Nejlepší odpověď

Hi 

Open the xml view that we need a button > studio tool > add the code for the button > create server action for the functionality 

check these references 

Add button using studio

New Button in Studio


Regards

Avatar
Zrušit
Nejlepší odpověď

Hi,

Studio does not have this feature in the released version and it will be available from 17 or may be may be available in some latest saas versions.

For now, you can add button directly in the view, choose to add it in the inherited view of the original view and you can place this code:

< button name="1000" type="action" string="test"/>

and if you need to execute python code, define a server action and copy its ID and place in the name of the button.


Thanks

Avatar
Zrušit
Nejlepší odpověď

Hi,

Please refer to the blog given below:
https://www.cybrosys.com/blog/how-to-add-a-button-using-the-odoo-studio-version-15

Hope it helps


Avatar
Zrušit