summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-10-09 15:01:30 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-10-09 15:01:30 +0700
commit475b927a543890639cfef7731ba8617449a423ec (patch)
tree856fecbb3ca3a7d9dc54ecb31e3c61b66db3aed2
parentce1c714c95f68b07f9b891600ba1e3b88288652c (diff)
add image small
-rwxr-xr-xindoteknik_custom/models/purchase_order_line.py1
-rwxr-xr-xindoteknik_custom/views/purchase_order.xml3
2 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order_line.py b/indoteknik_custom/models/purchase_order_line.py
index 7af84b48..fa300c67 100755
--- a/indoteknik_custom/models/purchase_order_line.py
+++ b/indoteknik_custom/models/purchase_order_line.py
@@ -37,6 +37,7 @@ class PurchaseOrderLine(models.Model):
is_ltc = fields.Boolean(string='Sudah di LTC', default=False, help='centang ini jika barang sudah di LTC')
note = fields.Char(string='Note')
sale_automatic_id = fields.Many2one('sale.order', string='SO')
+ image_small = fields.Binary("Product Image", related="product_id.image_1920")
qty_reserved = fields.Float(string='Qty Reserved', compute='_compute_qty_reserved')
delete_line = fields.Boolean(string='Delete', default=False, help='centang ini jika anda ingin menghapus line ini')
diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml
index f6e5a1a4..0db378f0 100755
--- a/indoteknik_custom/views/purchase_order.xml
+++ b/indoteknik_custom/views/purchase_order.xml
@@ -69,6 +69,9 @@
<field name="suggest" readonly="1" widget="badge" decoration-danger="suggest == 'harus beli'" decoration-success="suggest == 'masih cukup'"/>
<!-- <field name="suggest" readonly="1"/> -->
</field>
+ <field name="product_id" position="before">
+ <field name="image_small" readonly="1" optional="hide"/>
+ </field>
<field name="price_unit" position="after">
<field name="price_vendor" attrs="{'readonly': 1}" optional="hide"/>
</field>