fix: hide/make read_only property fields based on read_only expression
This commit is contained in:
parent
7218c36043
commit
d4ba2c51e4
2 changed files with 6 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ let docfield_df = computed(() => {
|
|||
class="mb-2 form-control form-control-sm"
|
||||
type="text"
|
||||
v-model="store.selected_field[df.fieldname]"
|
||||
:disabled="store.read_only"
|
||||
:disabled="store.read_only || df.read_only"
|
||||
/>
|
||||
</div>
|
||||
<div class="description" v-if="df.description">{{ df.description }}</div>
|
||||
|
|
|
|||
|
|
@ -125,11 +125,16 @@ export function get_table_columns(df) {
|
|||
}
|
||||
|
||||
export function evaluate_depends_on_value(expression, doc) {
|
||||
let store = useStore();
|
||||
if (!doc) return;
|
||||
|
||||
let out = null;
|
||||
let parent = doc || null;
|
||||
|
||||
if (!store.is_customize_form) {
|
||||
parent = store.doc;
|
||||
}
|
||||
|
||||
if (typeof expression === "boolean") {
|
||||
out = expression;
|
||||
} else if (typeof expression === "function") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue