summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-09-05 09:07:23 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-09-05 09:07:23 +0700
commit0a1f22cac507ee7e9975f1a68f79bccdf179c9fd (patch)
tree31921d1123d6f839fb20b97fbbfa729e8eaa7277
parentef8a6f39e6967c592b14f5ebc1d4ebcdb6fd2f7b (diff)
<miqdad> add image
-rw-r--r--indoteknik_custom/models/stock_move.py1
-rw-r--r--indoteknik_custom/views/stock_picking.xml100
2 files changed, 63 insertions, 38 deletions
diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py
index 90ab30a4..d4106830 100644
--- a/indoteknik_custom/models/stock_move.py
+++ b/indoteknik_custom/models/stock_move.py
@@ -15,6 +15,7 @@ class StockMove(models.Model):
barcode = fields.Char(string='Barcode', related='product_id.barcode')
vendor_id = fields.Many2one('res.partner' ,string='Vendor')
hold_outgoingg = fields.Boolean('Hold Outgoing', default=False)
+ product_image_128 = fields.Image('Product Image', related='product_id.image_1920')
# @api.model_create_multi
# def create(self, vals_list):
diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml
index b3f0ce9f..e230bccc 100644
--- a/indoteknik_custom/views/stock_picking.xml
+++ b/indoteknik_custom/views/stock_picking.xml
@@ -8,7 +8,7 @@
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="default_order">final_seq asc</attribute>
- <!-- <attribute name="default_order">create_date desc</attribute> -->
+ <!-- <attribute name="default_order">create_date desc</attribute> -->
</tree>
<field name="json_popover" position="after">
<field name="date_done" optional="hide"/>
@@ -20,9 +20,11 @@
<field name="sj_return_date" optional="hide"/>
<field name="date_reserved" optional="hide"/>
<field name="state_reserve" optional="hide"/>
- <field name="state_packing" widget="badge" decoration-success="state_packing == 'packing_done'" decoration-danger="state_packing == 'not_packing'" optional="hide"/>
+ <field name="state_packing" widget="badge" decoration-success="state_packing == 'packing_done'"
+ decoration-danger="state_packing == 'not_packing'" optional="hide"/>
<field name="final_seq"/>
- <field name="state_approve_md" widget="badge" decoration-success="state_approve_md == 'done'" decoration-warning="state_approve_md == 'pending'" optional="hide"/>
+ <field name="state_approve_md" widget="badge" decoration-success="state_approve_md == 'done'"
+ decoration-warning="state_approve_md == 'pending'" optional="hide"/>
<!-- <field name="countdown_hours" optional="hide"/>
<field name="countdown_ready_to_ship" /> -->
</field>
@@ -50,11 +52,11 @@
type="object"
attrs="{'invisible': ['|', ('state', 'in', ['done']), ('approval_receipt_status', '=', 'pengajuan1')]}"
/>
-<!-- <button name="ask_return_approval"-->
-<!-- string="Ask Return/Acc"-->
-<!-- type="object"-->
-<!-- attrs="{'invisible': [('state', 'in', ['draft', 'cancel', 'assigned'])]}"-->
-<!-- />-->
+ <!-- <button name="ask_return_approval"-->
+ <!-- string="Ask Return/Acc"-->
+ <!-- type="object"-->
+ <!-- attrs="{'invisible': [('state', 'in', ['draft', 'cancel', 'assigned'])]}"-->
+ <!-- />-->
<button name="action_create_invoice_from_mr"
string="Create Bill"
type="object"
@@ -64,12 +66,12 @@
string="Biteship"
type="object"
/>
- <!-- <button name="action_sync_biteship_tracking"
- type="object"
- string="Lacak dari Biteship"
- class="btn-primary"
- attrs="{'invisible': [('biteship_id', '=', False)]}"
- /> -->
+ <!-- <button name="action_sync_biteship_tracking"
+ type="object"
+ string="Lacak dari Biteship"
+ class="btn-primary"
+ attrs="{'invisible': [('biteship_id', '=', False)]}"
+ /> -->
<button name="track_envio_shipment"
string="Tracking Envio"
type="object"
@@ -97,6 +99,11 @@
attrs="{'invisible': [('state_approve_md', 'not in', ['waiting'])]}"
/>
</button>
+ <xpath expr="//field[@name='move_ids_without_package']//tree//field[@name='product_id']"
+ position="after">
+ <field name="product_image_128" widget="image"
+ style="height:128px;width:128px;" readonly="1"/>
+ </xpath>
<field name="backorder_id" position="after">
<field name="select_shipping_option_so"/>
<field name="shipping_method_so_id"/>
@@ -105,7 +112,8 @@
<field name="count_line_detail"/>
<field name="dokumen_tanda_terima"/>
<field name="dokumen_pengiriman"/>
- <field name="quantity_koli" attrs="{'invisible': [('location_dest_id', '!=', 60)], 'required': [('location_dest_id', '=', 60)]}"/>
+ <field name="quantity_koli"
+ attrs="{'invisible': [('location_dest_id', '!=', 60)], 'required': [('location_dest_id', '=', 60)]}"/>
<field name="total_mapping_koli" attrs="{'invisible': [('location_id', '!=', 60)]}"/>
<field name="total_koli_display" readonly="1" attrs="{'invisible': [('location_id', '!=', 60)]}"/>
<field name="linked_out_picking_id" readonly="1" attrs="{'invisible': [('location_id', '=', 60)]}"/>
@@ -133,7 +141,7 @@
<attribute name="readonly">1</attribute>
</field>
<field name="origin" position="after">
-<!-- <field name="show_state_approve_md" invisible="1" optional="hide"/>-->
+ <!-- <field name="show_state_approve_md" invisible="1" optional="hide"/>-->
<field name="state_approve_md" widget="badge"/>
<field name="purchase_id"/>
<field name="sale_order"/>
@@ -141,7 +149,8 @@
<field name="date_doc_kirim" attrs="{'readonly':[('invoice_status', '=', 'invoiced')]}"/>
<field name="summary_qty_operation"/>
<field name="count_line_operation"/>
- <field name="linked_manual_bu_out" attrs="{'invisible': [('location_id', '=', 60)]}" domain="[('picking_type_code', '=', 'outgoing'),('state', 'not in', ['done','cancel']), ('group_id', '=', group_id)]"/>
+ <field name="linked_manual_bu_out" attrs="{'invisible': [('location_id', '=', 60)]}"
+ domain="[('picking_type_code', '=', 'outgoing'),('state', 'not in', ['done','cancel']), ('group_id', '=', group_id)]"/>
<field name="account_id"
attrs="{
'readonly': [['state', 'in', ['done', 'cancel']]],
@@ -189,29 +198,35 @@
</group>
</group>
</page>
- <page string="Delivery" name="delivery_order" attrs="{'invisible': [('location_dest_id', '=', 60)]}">
+ <page string="Delivery" name="delivery_order"
+ attrs="{'invisible': [('location_dest_id', '=', 60)]}">
<group>
<group>
<field name="notee"/>
<field name="note_logistic"/>
<field name="note_info"/>
- <field name="responsible" />
- <field name="carrier_id" attrs="{'invisible': [('select_shipping_option_so', '=', 'biteship')]}" />
+ <field name="responsible"/>
+ <field name="carrier_id"
+ attrs="{'invisible': [('select_shipping_option_so', '=', 'biteship')]}"/>
<field name="biteship_id" invisible="1"/>
<field name="out_code" attrs="{'invisible': [['out_code', '=', False]]}"/>
<field name="picking_code" attrs="{'invisible': [['picking_code', '=', False]]}"/>
- <field name="picking_code" string="Picking code (akan digenerate ketika sudah di-validate)" attrs="{'invisible': [['picking_code', '!=', False]]}"/>
- <field name="driver_departure_date" attrs="{'readonly':[('invoice_status', '=', 'invoiced')]}"/>
+ <field name="picking_code"
+ string="Picking code (akan digenerate ketika sudah di-validate)"
+ attrs="{'invisible': [['picking_code', '!=', False]]}"/>
+ <field name="driver_departure_date"
+ attrs="{'readonly':[('invoice_status', '=', 'invoiced')]}"/>
<field name="driver_arrival_date"/>
- <field name="delivery_tracking_no" attrs="{'invisible': [('select_shipping_option_so', '=', 'biteship')]}"/>
+ <field name="delivery_tracking_no"
+ attrs="{'invisible': [('select_shipping_option_so', '=', 'biteship')]}"/>
<field name="driver_id"/>
<field name='sj_return_date'/>
- <field name="sj_documentation" widget="image" />
- <field name="paket_documentation" widget="image" />
+ <field name="sj_documentation" widget="image"/>
+ <field name="paket_documentation" widget="image"/>
</group>
<!-- Biteship Group -->
<group attrs="{'invisible': [('select_shipping_option_so', '!=', 'biteship')]}">
- <field name="delivery_tracking_no" />
+ <field name="delivery_tracking_no"/>
<field name="shipping_method_so_id"/>
<field name="shipping_option_so_id"/>
<field name="biteship_shipping_price" readonly="1"/>
@@ -220,7 +235,8 @@
<field name="biteship_driver_name" readonly="1"/>
<field name="biteship_driver_phone" readonly="1"/>
<field name="biteship_driver_plate_number" readonly="1"/>
- <button name="action_open_biteship_tracking" string="Visit Biteship Tracking" type="object"/>
+ <button name="action_open_biteship_tracking" string="Visit Biteship Tracking"
+ type="object"/>
</group>
<group attrs="{'invisible': [('carrier_id', '!=', 151)]}">
@@ -261,23 +277,27 @@
</group>
</group>
</page>
- <page string="Check Product" name="check_product" attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}">
+ <page string="Check Product" name="check_product"
+ attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}">
<field name="check_product_lines"/>
</page>
- <page string="Barcode Product" name="barcode_product" attrs="{'invisible': [('picking_type_code', '!=', 'incoming')]}">
+ <page string="Barcode Product" name="barcode_product"
+ attrs="{'invisible': [('picking_type_code', '!=', 'incoming')]}">
<field name="barcode_product_lines"/>
</page>
<page string="Check Koli" name="check_koli" attrs="{'invisible': [('location_dest_id', '!=', 60)]}">
<field name="check_koli_lines"/>
</page>
- <page string="Mapping Koli" name="konfirm_koli" attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}">
+ <page string="Mapping Koli" name="konfirm_koli"
+ attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}">
<field name="konfirm_koli_lines"/>
</page>
- <page string="Konfirm Koli" name="scan_koli" attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}">
+ <page string="Konfirm Koli" name="scan_koli"
+ attrs="{'invisible': [('picking_type_code', '!=', 'outgoing')]}">
<field name="scan_koli_lines"/>
</page>
</page>
-
+
</field>
</record>
@@ -287,18 +307,20 @@
<field name="arch" type="xml">
<tree editable="bottom">
<field name="code_koli"/>
- <field name="koli_id" options="{'no_create': True}" domain="[('state', '=', 'not_delivered')]"/>
+ <field name="koli_id" options="{'no_create': True}" domain="[('state', '=', 'not_delivered')]"/>
<field name="scan_koli_progress"/>
</tree>
</field>
</record>
+
<record id="konfirm_koli_tree" model="ir.ui.view">
<field name="name">konfirm.koli.tree</field>
<field name="model">konfirm.koli</field>
<field name="arch" type="xml">
<tree editable="bottom">
- <field name="pick_id" options="{'no_create': True}" required="1" domain="[('picking_type_code', '=', 'internal'), ('group_id', '=', parent.group_id), ('linked_manual_bu_out', '=', parent.id)]"/>
+ <field name="pick_id" options="{'no_create': True}" required="1"
+ domain="[('picking_type_code', '=', 'internal'), ('group_id', '=', parent.group_id), ('linked_manual_bu_out', '=', parent.id)]"/>
</tree>
</field>
</record>
@@ -307,7 +329,7 @@
<field name="name">check.koli.tree</field>
<field name="model">check.koli</field>
<field name="arch" type="xml">
- <tree editable="bottom">
+ <tree editable="bottom">
<field name="koli"/>
<field name="reserved_id"/>
<field name="check_koli_progress"/>
@@ -344,12 +366,14 @@
<field name="model">stock.move.line</field>
<field name="inherit_id" ref="stock.view_stock_move_line_detailed_operation_tree"/>
<field name="arch" type="xml">
- <tree editable="bottom" decoration-muted="(state == 'done' and is_locked == True)" decoration-danger="qty_done&gt;product_uom_qty and state!='done' and parent.picking_type_code != 'incoming'" decoration-success="qty_done==product_uom_qty and state!='done' and not result_package_id">
+ <tree editable="bottom" decoration-muted="(state == 'done' and is_locked == True)"
+ decoration-danger="qty_done&gt;product_uom_qty and state!='done' and parent.picking_type_code != 'incoming'"
+ decoration-success="qty_done==product_uom_qty and state!='done' and not result_package_id">
<field name="note" placeholder="Add a note here"/>
</tree>
</field>
</record>
-
+
<record id="view_picking_internal_search_inherit" model="ir.ui.view">
<field name="name">stock.picking.internal.search.inherit</field>
@@ -382,7 +406,7 @@
</form>
</field>
</record>
-
+
<record id="action_warning_modal_wizard" model="ir.actions.act_window">
<field name="name">Peringatan Koli</field>
<field name="res_model">warning.modal.wizard</field>