From 72a0fb674022824d0ee49dba71d031d2e1282b27 Mon Sep 17 00:00:00 2001 From: svs-odoo Date: Thu, 10 Oct 2019 09:58:22 +0000 Subject: [PATCH] [REM] stock: remove stock_picking_responsible.py As the responsible can be assigned directly in the list view, the assign responsible wizard is now useless. The Country will not forget what you did for us wizard, thank you. closes odoo/odoo#38365 Signed-off-by: Simon Lejeune (sle) --- addons/stock/wizard/__init__.py | 1 - .../stock/wizard/stock_picking_responsible.py | 26 ------------------- 2 files changed, 27 deletions(-) delete mode 100644 addons/stock/wizard/stock_picking_responsible.py diff --git a/addons/stock/wizard/__init__.py b/addons/stock/wizard/__init__.py index 2a31ee00bf0..785ecff3954 100644 --- a/addons/stock/wizard/__init__.py +++ b/addons/stock/wizard/__init__.py @@ -14,4 +14,3 @@ from . import stock_warn_insufficient_qty from . import product_replenish from . import stock_track_confirmation from . import stock_package_destination -from . import stock_picking_responsible # TODO: Remove this import in 13.1 diff --git a/addons/stock/wizard/stock_picking_responsible.py b/addons/stock/wizard/stock_picking_responsible.py deleted file mode 100644 index 8855d6d4b45..00000000000 --- a/addons/stock/wizard/stock_picking_responsible.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# Part of Odoo. See LICENSE file for full copyright and licensing details. - -from odoo import _, fields, models -from odoo.exceptions import UserError - - -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -# TODO: REMOVE THIS FILE IN 13.1 ! -# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -class StockPickingResponsible(models.TransientModel): - _name = 'stock.picking.responsible' - _description = 'Assign Responsible' - - user_id = fields.Many2one( - 'res.users', 'Responsible', - domain=lambda self: [('groups_id', 'in', self.env.ref('stock.group_stock_user').id)], - default=lambda self: self.env.user) - - def assign_responsible(self): - self.ensure_one() - pickings = self.env['stock.picking'].browse(self.env.context.get('active_ids')) - restricted_companies = pickings.company_id - self.user_id.company_ids - if restricted_companies: - raise UserError(_('%s has a restricted access to %s') % (self.user_id.name, restricted_companies.mapped('name'))) - pickings.write({'user_id': self.user_id.id})