diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-09-08 10:18:48 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-09-08 10:18:48 +0000 |
| commit | 59f5cc5ffdfccbcbeaacc150457c57625344f49b (patch) | |
| tree | 7d15f5821cfca5344c3b1d49dc0a959846daeab6 | |
| parent | 17f73fbe0662b07eb85004bfb8f6546eeb61c743 (diff) | |
| parent | f2adf9ad9ed7491a6ad5422d1236761e7d42c82f (diff) | |
Merged in image_stock_move (pull request #404)
Image stock move
| -rw-r--r-- | indoteknik_custom/models/stock_move.py | 5 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_move_line.xml | 9 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_picking.xml | 105 |
3 files changed, 76 insertions, 43 deletions
diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py index 90ab30a4..24d405a6 100644 --- a/indoteknik_custom/models/stock_move.py +++ b/indoteknik_custom/models/stock_move.py @@ -1,6 +1,9 @@ from odoo import fields, models, api from odoo.tools.misc import format_date, OrderedSet from odoo.exceptions import UserError +import logging + +_logger = logging.getLogger(__name__) class StockMove(models.Model): _inherit = 'stock.move' @@ -15,7 +18,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 = fields.Binary(related="product_id.image_128", string="Product Image", readonly = True) # @api.model_create_multi # def create(self, vals_list): # moves = super(StockMove, self).create(vals_list) diff --git a/indoteknik_custom/views/stock_move_line.xml b/indoteknik_custom/views/stock_move_line.xml index 757d2522..94c0bf53 100644 --- a/indoteknik_custom/views/stock_move_line.xml +++ b/indoteknik_custom/views/stock_move_line.xml @@ -3,18 +3,19 @@ <record id="stock_move_line_form_view_inherited" model="ir.ui.view"> <field name="name">Stock Move Line</field> <field name="model">stock.move.line</field> - <field name="inherit_id" ref="stock.view_move_line_form" /> + <field name="inherit_id" ref="stock.view_move_line_form"/> + <field name="priority" eval="100"/> <field name="arch" type="xml"> - <field name="qty_done" position="after"> + <xpath expr="(//form//group[.//field[@name='qty_done']])[last()]" position="inside"> <field name="manufacture"/> - </field> + </xpath> </field> </record> <record id="stock_move_line_tree_view_inherited" model="ir.ui.view"> <field name="name">Stock Move Line</field> <field name="model">stock.move.line</field> - <field name="inherit_id" ref="stock.view_move_line_tree" /> + <field name="inherit_id" ref="stock.view_move_line_tree"/> <field name="arch" type="xml"> <field name="product_id" position="after"> <field name="manufacture"/> diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml index b3f0ce9f..fc8be790 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_uom']" + position="after"> + <field name="product_image" 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)]}"/> @@ -132,8 +140,13 @@ <field name="scheduled_date" position="attributes"> <attribute name="readonly">1</attribute> </field> + <xpath expr="//field[@name='move_ids_without_package']/form/group/field[@name='description_picking']" + position="after"> + <field name="product_image" widget="image" string="Product Image"/> + </xpath> + <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 +154,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 +203,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 +240,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 +282,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 +312,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 +334,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 +371,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>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>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 +411,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> |
