diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-06 11:29:08 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-09-06 11:29:08 +0700 |
| commit | 4bd34e21d8d4dc3b2f688e181fb05c6359ac1f43 (patch) | |
| tree | 453d951d04ff77f0301ad5c5734fbdbd8330dceb | |
| parent | bd7479d645e90509c72a36b2dd9bcf9e6964bcae (diff) | |
<miqdad> fix manufacture in stock move line & done
| -rw-r--r-- | indoteknik_custom/models/stock_move.py | 3 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_move_line.xml | 9 | ||||
| -rw-r--r-- | indoteknik_custom/views/stock_picking.xml | 7 |
3 files changed, 12 insertions, 7 deletions
diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py index 9ec36fcd..24d405a6 100644 --- a/indoteknik_custom/models/stock_move.py +++ b/indoteknik_custom/models/stock_move.py @@ -18,8 +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.Image('Product Image', related='product_id.image_1920') - + 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 c8aa6454..50c5f261 100644 --- a/indoteknik_custom/views/stock_picking.xml +++ b/indoteknik_custom/views/stock_picking.xml @@ -99,7 +99,7 @@ attrs="{'invisible': [('state_approve_md', 'not in', ['waiting'])]}" /> </button> - <xpath expr="//field[@name='move_ids_without_package']//tree//field[@name='product_id']" + <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"/> @@ -140,6 +140,11 @@ <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="state_approve_md" widget="badge"/> |
