# -*- coding: utf-8 -*- from odoo import fields, models class AgvSetting(models.Model): _name = 'sf.agv.site' _description = 'agv站点' number = fields.Integer('序号') name = fields.Char('位置编号') owning_region = fields.Char('所属区域') state = fields.Selection([ ('占用', '占用'), ('空闲', '空闲')], string='状态') divide_the_work = fields.Char('主要分工') class AgvTaskRoute(models.Model): _name = 'sf.agv.task.route' _description = 'agv任务路线' name = fields.Char('名称') type = fields.Selection([ ('F01', '搬运'), ], string='类型', default="F01") start_site_id = fields.Many2one('sf.agv.site', '起点接驳站位置编号') end_site_id = fields.Many2one('sf.agv.site', '终点接驳站位置编号') destination_production_line_id = fields.Many2one('sf.production.line', '目的生产线') priority = fields.Selection([ ('0', '正常'), ('1', '低'), ('2', '中'), ('3', '高'), ('4', '紧急'), ], string='优先级', default='0') active = fields.Boolean('有效', default=True)