summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-07-10 14:49:41 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-07-10 14:49:41 +0700
commit3d1a669929bd9201878e433e047753851ed07091 (patch)
tree9afd37dcb8bc34652d933a6606981ddfacf24993
parent7e94d67390f87683982d8c62b862812a8971950d (diff)
change request stock picking
-rw-r--r--indoteknik_custom/models/stock_move.py1
-rw-r--r--indoteknik_custom/models/stock_picking.py7
-rw-r--r--indoteknik_custom/views/stock_picking.xml22
3 files changed, 30 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_move.py b/indoteknik_custom/models/stock_move.py
index 9c991be3..fe46bf65 100644
--- a/indoteknik_custom/models/stock_move.py
+++ b/indoteknik_custom/models/stock_move.py
@@ -73,4 +73,5 @@ class StockMoveLine(models.Model):
_inherit = 'stock.move.line'
line_no = fields.Integer('No', default=0)
+ note = fields.Char('Note')
manufacture = fields.Many2one('x_manufactures', string="Brands", related="product_id.x_manufacture", store=True)
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 2dd69e01..308e6d93 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -89,6 +89,13 @@ class StockPicking(models.Model):
sale_order = fields.Char(string='Matches SO', copy=False)
printed_sj = fields.Boolean('Printed Surat Jalan', help='flag which is internal use or not')
+ def reset_status_printed(self):
+ for rec in self:
+ rec.status_printed = 'not_printed'
+ rec.printed_sj = False
+ rec.date_printed_list = False
+ rec.date_printed_sj = False
+
@api.onchange('carrier_id')
def constrains_carrier_id(self):
if self.carrier_id:
diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml
index 3c7f027e..7567dda2 100644
--- a/indoteknik_custom/views/stock_picking.xml
+++ b/indoteknik_custom/views/stock_picking.xml
@@ -55,6 +55,16 @@
<field name="summary_qty_detail"/>
<field name="count_line_detail"/>
</field>
+ <field name="weight_uom_name" position="after">
+ <group>
+ <group>
+ <button name="reset_status_printed"
+ string="Reset Status Printed"
+ type="object"
+ />
+ </group>
+ </group>
+ </field>
<field name="partner_id" position="after">
<field name="real_shipping_id"/>
</field>
@@ -123,6 +133,18 @@
</field>
</record>
+ <record id="view_stock_move_line_detailed_operation_tree_inherit" model="ir.ui.view">
+ <field name="name">stock.move.line.operations.tree.inherit</field>
+ <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">
+ <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>
<field name="model">stock.picking</field>