Files
stock-logistics-warehouse/stock_location_zone/models/stock_picking_zone.py
Jacques-Etienne Baudoux 8144f4302d [ADD] stock_location_zone
2021-02-10 21:42:11 +07:00

26 lines
750 B
Python

# Copyright 2017 Syvain Van Hoof (Okia sprl) <sylvainvh@okia.be>
# Copyright 2017-2019 Jacques-Etienne Baudoux (BCIM sprl) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class PickingZone(models.Model):
_name = 'stock.picking.zone'
name = fields.Char('Name', required=True, translate=True)
code = fields.Char('Code', required=True)
pick_type_id = fields.Many2one(
'stock.picking.type',
string='Pick Type',
help="Picking type for operations from this location",
)
_sql_constraints = [
(
'unique_picking_zone',
'unique (code)',
'The picking zone code must be unique',
)
]