diff --git a/addons/stock/models/res_config_settings.py b/addons/stock/models/res_config_settings.py
index 7ee5d5e5842..cc1de7808c3 100644
--- a/addons/stock/models/res_config_settings.py
+++ b/addons/stock/models/res_config_settings.py
@@ -46,7 +46,6 @@ class ResConfigSettings(models.TransientModel):
annual_inventory_month = fields.Selection(related='company_id.annual_inventory_month', readonly=False)
annual_inventory_day = fields.Integer(related='company_id.annual_inventory_day', readonly=False)
group_stock_reception_report = fields.Boolean("Reception Report", implied_group='stock.group_reception_report')
- group_stock_auto_reception_report = fields.Boolean("Show Reception Report at Validation", implied_group='stock.group_auto_reception_report')
@api.onchange('group_stock_multi_locations')
def _onchange_group_stock_multi_locations(self):
diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py
index 45680903881..52cd72942af 100644
--- a/addons/stock/models/stock_picking.py
+++ b/addons/stock/models/stock_picking.py
@@ -72,6 +72,9 @@ class PickingType(models.Model):
help="How products in transfers of this operation type should be reserved.")
reservation_days_before = fields.Integer('Days', help="Maximum number of days before scheduled date that products should be reserved.")
reservation_days_before_priority = fields.Integer('Days when starred', help="Maximum number of days before scheduled date that priority picking products should be reserved.")
+ auto_show_reception_report = fields.Boolean(
+ "Show Reception Report at Validation",
+ help="If this checkbox is ticked, Odoo will automatically show the reception report (if there are moves to allocate to) when validating a picking.")
count_picking_draft = fields.Integer(compute='_compute_picking_count')
count_picking_ready = fields.Integer(compute='_compute_picking_count')
@@ -978,8 +981,7 @@ class Picking(models.Model):
pickings_to_backorder.with_context(cancel_backorder=False)._action_done()
if self.user_has_groups('stock.group_reception_report') \
- and self.user_has_groups('stock.group_auto_reception_report') \
- and self.filtered(lambda p: p.picking_type_id.code != 'outgoing'):
+ and self.picking_type_id.auto_show_reception_report:
lines = self.move_ids.filtered(lambda m: m.product_id.type == 'product' and m.state != 'cancel' and m.quantity_done and not m.move_dest_ids)
if lines:
# don't show reception report if all already assigned/nothing to assign
diff --git a/addons/stock/security/stock_security.xml b/addons/stock/security/stock_security.xml
index 5bc1f91aa1c..4aaf7d14416 100644
--- a/addons/stock/security/stock_security.xml
+++ b/addons/stock/security/stock_security.xml
@@ -74,10 +74,6 @@
-
- Display Reception Report at Validation
-
- Use wave pickings
diff --git a/addons/stock/views/res_config_settings_views.xml b/addons/stock/views/res_config_settings_views.xml
index 06c5943003f..afce5fce190 100644
--- a/addons/stock/views/res_config_settings_views.xml
+++ b/addons/stock/views/res_config_settings_views.xml
@@ -95,15 +95,6 @@
View and allocate received quantities.
-
-
-
-
-
- Automatically open reception report when a receipt is validated.
-