mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-25 12:12:04 +02:00
19 lines
566 B
Python
19 lines
566 B
Python
# Copyright (C) 2019 Sunflower IT <sunflowerweb.nl>
|
|
# License GNU Affero General Public License <http://www.gnu.org/licenses/>.
|
|
|
|
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()
|