Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
I find out that there are two different behaviours of read only mode on tabs.
Let's examine that you decided that readOnly logic of Lead window should depends on Lead Status field. When this field has value Converted then whole tab should be non-editable. So I change readOnly logic of this tab to @LeadStatus@=C. (Also set LeadStatus as always updatable)
Use Case A: When field LeadStatus doesn't have any dependent fields and callouts, then save of record is needed to change readOnly mode of tab.
Use Case B: When field LeadStatus has some dependent fields or callouts, then changing of Lead Status value will results into changing readOnly mode of tab immediately.
Steps to reproduce: Open Window Lead -> tab Lead and changed ReadOnlyLogic to @LeadStatus@=C
Use Case A: Lead Status shouldn't have any dependent fields or callouts in current configuration. Use Case B: Go to Table and Column AD_User and change callout of column LeadStatus for example to org.compiere.model.CalloutOpportunity.salesStage (it's not important which callout will be filled).
I would expect if iDempiere should always support Use Case B rather than A.
Environment
None
Activity
Show:
Tomáš Švikruha August 26, 2015 at 12:38 PM
After reading the code I found out that there is a part of code in ADTabpanel.java which is probably responsible for mentioned different behaviours.
If you take a look at conditions starting on line 711 (... if ( ! ( dependants.size() > 0 ...) then there is a return from method when condition is fulfilled so that's mean readOnly logic on other lines is not updated.
Can somebody explain to me why there is a block of code from line 703 to 721 (... if (col > 0) condition ...)?
I find out that there are two different behaviours of read only mode on tabs.
Let's examine that you decided that readOnly logic of Lead window should depends on Lead Status field. When this field has value Converted then whole tab should be non-editable. So I change readOnly logic of this tab to @LeadStatus@=C. (Also set LeadStatus as always updatable)
Use Case A:
When field LeadStatus doesn't have any dependent fields and callouts, then save of record is needed to change readOnly mode of tab.
Use Case B:
When field LeadStatus has some dependent fields or callouts, then changing of Lead Status value will results into changing readOnly mode of tab immediately.
Steps to reproduce:
Open Window Lead -> tab Lead and changed ReadOnlyLogic to @LeadStatus@=C
Use Case A:
Lead Status shouldn't have any dependent fields or callouts in current configuration.
Use Case B:
Go to Table and Column AD_User and change callout of column LeadStatus for example to org.compiere.model.CalloutOpportunity.salesStage (it's not important which callout will be filled).
I would expect if iDempiere should always support Use Case B rather than A.