[IMP] stock,delivery: quick access to operations
This commit add a quick access to all the move lines of a picking type (only transfers picking type) ready to be processed from the Inventory dashboard Task : 2411102 Part-of: odoo/odoo#63291
This commit is contained in:
@@ -31,6 +31,8 @@ class StockMoveLine(models.Model):
|
||||
_inherit = 'stock.move.line'
|
||||
|
||||
sale_price = fields.Float(compute='_compute_sale_price')
|
||||
destination_country_code = fields.Char(related='picking_id.destination_country_code')
|
||||
carrier_id = fields.Many2one(related='picking_id.carrier_id')
|
||||
|
||||
@api.depends('qty_done', 'product_uom_id', 'product_id', 'move_id.sale_line_id', 'move_id.sale_line_id.price_reduce_taxinc', 'move_id.sale_line_id.product_uom')
|
||||
def _compute_sale_price(self):
|
||||
|
||||
@@ -259,6 +259,18 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_tree_detailed_delivery" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.tree.detailed</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_move_line_tree_detailed"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='picking_partner_id']" position="after">
|
||||
<field name="destination_country_code" optional="hide"/>
|
||||
<field name="carrier_id" optional="hide"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_quant_package_weight_form" model="ir.ui.view">
|
||||
<field name="name">stock.quant.package.weight.form</field>
|
||||
<field name="model">stock.quant.package</field>
|
||||
|
||||
@@ -70,12 +70,12 @@
|
||||
'views/product_strategy_views.xml',
|
||||
'views/product_views.xml',
|
||||
'views/stock_production_lot_views.xml',
|
||||
'views/stock_picking_views.xml',
|
||||
'views/stock_scrap_views.xml',
|
||||
'views/stock_quant_views.xml',
|
||||
'views/stock_location_views.xml',
|
||||
'views/stock_warehouse_views.xml',
|
||||
'views/stock_move_line_views.xml',
|
||||
'views/stock_picking_views.xml',
|
||||
'views/stock_move_views.xml',
|
||||
'views/stock_orderpoint_views.xml',
|
||||
'views/stock_storage_category_views.xml',
|
||||
|
||||
@@ -57,6 +57,8 @@ class StockMoveLine(models.Model):
|
||||
location_id = fields.Many2one('stock.location', 'From', domain="[('usage', '!=', 'view')]", check_company=True, required=True)
|
||||
location_dest_id = fields.Many2one('stock.location', 'To', domain="[('usage', '!=', 'view')]", check_company=True, required=True)
|
||||
lots_visible = fields.Boolean(compute='_compute_lots_visible')
|
||||
picking_type_id = fields.Many2one(related='picking_id.picking_type_id', readonly=True)
|
||||
picking_partner_id = fields.Many2one(related='picking_id.partner_id', readonly=True)
|
||||
picking_code = fields.Selection(related='picking_id.picking_type_id.code', readonly=True)
|
||||
picking_type_id = fields.Many2one(
|
||||
'stock.picking.type', 'Operation type', compute='_compute_picking_type_id')
|
||||
|
||||
@@ -19,6 +19,28 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_move_line_tree_detailed" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.tree.detailed</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="priority">25</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Move Lines" create="0" default_order="date">
|
||||
<field name="date" optional="hide"/>
|
||||
<field name="picking_id"/>
|
||||
<field name="picking_partner_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="lot_id" groups="stock.group_production_lot" optional="hide"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" />
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" />
|
||||
<field name="package_id" groups="stock.group_tracking_lot"/>
|
||||
<field name="qty_done" string="Quantity Done" optional="hide"/>
|
||||
<field name="product_uom_id" options="{'no_open': True, 'no_create': True}" optional="hide" string="Unit of Measure" groups="uom.group_uom"/>
|
||||
<field name="company_id" groups="base.group_multi_company" force_save="1" optional="hide"/>
|
||||
<field name="state" widget='badge' decoration-success="state == 'done'" decoration-info="state not in ('done', 'cancel')"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_form" model="ir.ui.view">
|
||||
<field name="name">stock.move.line.form</field>
|
||||
<field name="model">stock.move.line</field>
|
||||
@@ -97,6 +119,8 @@
|
||||
<filter string="Product" name="groupby_product_id" domain="[]" context="{'group_by': 'product_id'}"/>
|
||||
<filter string="Status" name="by_state" domain="[]" context="{'group_by': 'state'}"/>
|
||||
<filter string="Date" name="by_date" domain="[]" context="{'group_by': 'date'}"/>
|
||||
<filter string="Transfers" name="by_picking" domain="[]" context="{'group_by': 'picking_id'}"/>
|
||||
<filter string="Location" name="by_location" domain="[]" context="{'group_by': 'location_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -147,8 +171,8 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
action="stock_move_line_action"
|
||||
id="stock_move_line_menu"
|
||||
<menuitem
|
||||
action="stock_move_line_action"
|
||||
id="stock_move_line_menu"
|
||||
parent="stock.menu_warehouse_report" sequence="150"/>
|
||||
</odoo>
|
||||
|
||||
@@ -646,6 +646,27 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_get_picking_type_operations" model="ir.actions.act_window">
|
||||
<field name="name">Operations</field>
|
||||
<field name="res_model">stock.move.line</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('stock.view_move_line_tree_detailed')})]"/>
|
||||
<field name="domain">[('picking_type_id', '=', active_id), ('picking_id', '!=', False)]</field>
|
||||
<field name="context">{
|
||||
'search_default_todo': '1',
|
||||
}</field>
|
||||
<field name="search_view_id" ref="stock_move_line_view_search"/>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No operations found. Let's create a tranfer !
|
||||
</p>
|
||||
<p>
|
||||
Transfers allow you to move products from one location to another.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_picking_form" model="ir.actions.act_window">
|
||||
<field name="name">New Transfer</field>
|
||||
<field name="res_model">stock.picking</field>
|
||||
@@ -764,6 +785,9 @@
|
||||
<div role="menuitem">
|
||||
<a name="get_action_picking_tree_waiting" type="object">Waiting</a>
|
||||
</div>
|
||||
<div role="menuitem">
|
||||
<a name="%(action_get_picking_type_operations)d" type="action">Operations</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 o_kanban_card_manage_section o_kanban_manage_new">
|
||||
<div role="menuitem" class="o_kanban_card_manage_title">
|
||||
|
||||
Reference in New Issue
Block a user