[IMP] stock_picking_batch: add batch transfer column
In the "Reporting -> Product Moves" view, add an optional "Batch Transfer" column (default: show). Task: 2654703-2-3 Part-of: odoo/odoo#84056
This commit is contained in:
@@ -11,7 +11,7 @@ from odoo.tools.float_utils import float_compare
|
||||
class StockMoveLine(models.Model):
|
||||
_inherit = "stock.move.line"
|
||||
|
||||
batch_id = fields.Many2one(related='picking_id.batch_id')
|
||||
batch_id = fields.Many2one(related='picking_id.batch_id', store=True)
|
||||
|
||||
def action_open_add_to_wave(self):
|
||||
# This action can be called from the move line list view or from the 'Add to wave' wizard
|
||||
|
||||
@@ -289,5 +289,24 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_tree_inherit_stock_picking_batch" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.tree.stock_picking_batch</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_move_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='state']" position="after">
|
||||
<field name="batch_id" optional="show"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="stock_move_line_view_search_inherit_stock_picking_batch" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.search.stock_picking_batch</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.stock_move_line_view_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='groupby']" position="inside">
|
||||
<filter string="Batch Transfer" name="by_batch_id" context="{'group_by': 'batch_id'}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user