summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-08-06 09:37:34 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-08-06 09:37:34 +0700
commitfcae9b43dc261223b242265141353974300a304f (patch)
tree7f810f83f5acb339fed5549737efa0466c19b977 /indoteknik_custom/views
parentd1a529a1cb034086b0581b110c48785e28bf3a8c (diff)
(andri) banyaknya attachment
Diffstat (limited to 'indoteknik_custom/views')
-rw-r--r--indoteknik_custom/views/down_payment_realization.xml24
1 files changed, 21 insertions, 3 deletions
diff --git a/indoteknik_custom/views/down_payment_realization.xml b/indoteknik_custom/views/down_payment_realization.xml
index 947c3cd1..9d6a8f02 100644
--- a/indoteknik_custom/views/down_payment_realization.xml
+++ b/indoteknik_custom/views/down_payment_realization.xml
@@ -49,12 +49,28 @@
<field name="related" required="1"/>
<field name="approved_by" readonly="1"/>
</group>
+ <group attrs="{'invisible': [('lot_of_attachment', '!=', 'one_for_all_line')]}">
+ <field name="attachment_type" attrs="{'readonly': [('status', '=', 'approved')]}"/>
+
+ <field name="attachment_file_pdf" filename="attachment_filename"
+ widget="pdf_viewer"
+ attrs="{'invisible': [('attachment_type', '!=', 'pdf')], 'readonly': [('status', '=', 'approved')]}"/>
+
+ <field name="attachment_file_image" filename="attachment_filename"
+ widget="image"
+ attrs="{'invisible': [('attachment_type', '!=', 'image')], 'readonly': [('status', '=', 'approved')]}"
+ style="max-width:250px; max-height:250px; object-fit:contain;"/>
+ <br/>
+ </group>
+ </group>
+ <group col="2">
<group>
<field name="done_status"
decoration-success="done_status == 'done_realized'"
decoration-danger="done_status == 'remaining'"
widget="badge" readonly="1"/>
<field name="note_approval" required="1"/>
+ <field name="lot_of_attachment"/>
</group>
</group>
@@ -80,21 +96,23 @@
<form>
<group>
+ <field name="lot_of_attachment" invisible="1"/>
<field name="date"/>
<field name="account_id"/>
<field name="description"/>
<field name="nominal"/>
- <field name="attachment_type"/>
+ <field name="attachment_type"
+ attrs="{'invisible': [('lot_of_attachment', '=', 'one_for_all_line')]}"/>
<field name="attachment_file_pdf"
filename="attachment_filename_pdf"
widget="pdf_viewer"
- attrs="{'invisible': [('attachment_type', '!=', 'pdf')]}"/>
+ attrs="{'invisible': [('attachment_type', '!=', 'pdf'), ('lot_of_attachment', '=', 'one_for_all_line')]}"/>
<field name="attachment_file_image"
filename="attachment_filename_image"
widget="image"
- attrs="{'invisible': [('attachment_type', '!=', 'image')]}"/>
+ attrs="{'invisible': [('attachment_type', '!=', 'image'), ('lot_of_attachment', '=', 'one_for_all_line')]}"/>
<field name="done_attachment"/>
</group>
</form>