# Copyright (C) 2019 Sunflower IT # License GNU Affero General Public License . from odoo import fields, models class StockPicking(models.Model): _name = "stock.picking" _inherit = ["stock.picking", "res.brand.mixin"] brand_id = fields.Many2one( help="Brand to use for this picking.", ) def _is_brand_required(self): self.ensure_one() if self.picking_type_id.code in ("internal", "mrp_operation"): return False return super()._is_brand_required()