简体   繁体   中英

How to disable a button in openbravo?

I want to disable the "complete" button which appears when you are creating a new requisition from the procurement management module in openbravo. It is a custom button placed on the right side of the toolbar.

You can hide the complete button by setting displayed field to No in the Application Dictionary || windows,tabs and fields || Requisition.

Since the " complete " button is in Openbravo Core , You need to save your changes under custom template.

  1. ad_field.displayed
  2. document Action

You can hide the Complete button by using the Display logic ,Since it's your Custom button you can hide using certain condtion.

For example ,If you need to display the button at new requisition at that time you will have the default value set to that column as ' N ' . Once you click the complete button you change the value to ' Y ' . Then write the Display Logic like @Column_Name@='N' .

If you need to hide the changes from core then you should go with Template and perform your changes and it will be track the changes in template.

Note: Once you are making the changes in core Only your template need to be marked as " In Development " . And make sure other modules not in Development .

http://wiki.openbravo.com/wiki/ERP_2.50:Developers_Guide/How_To_Create_a_Configuration_Script

This question could be ambiguous, just wanted to add, if you want to disable an Openbravo html button with the right CSS, you can do:

document.getElementById('myButton').setAttribute("class", "ButtonLink_disabled");

document.getElementById('myButton').setAttribute("class", "ButtonLink_enabled");

(I spent a good time searching for that and this question was the first showing)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM