summaryrefslogtreecommitdiff
path: root/indoteknik_custom/views
diff options
context:
space:
mode:
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>