@@ -165,36 +171,55 @@
+ />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -410,5 +435,25 @@
+
+
+ 工单
+ ir.actions.act_window
+ mrp.workorder
+ tree,kanban,form
+
+
+ [('schedule_state', '=', '已排')]
+
+
+
+
+
diff --git a/sf_maintenance/views/production_line_view.xml b/sf_manufacturing/views/production_line_view.xml
similarity index 100%
rename from sf_maintenance/views/production_line_view.xml
rename to sf_manufacturing/views/production_line_view.xml
diff --git a/sf_mrs_connect/models/sync_common.py b/sf_mrs_connect/models/sync_common.py
index 4926726e..8e8b7bbb 100644
--- a/sf_mrs_connect/models/sync_common.py
+++ b/sf_mrs_connect/models/sync_common.py
@@ -1771,7 +1771,7 @@ class SyncFunctionalFixture(models.Model):
self.env['sf.functional.fixture'].create({
"name": item['name'],
"code": item['code'],
- "functional_fixture_type_id": self.env['sf.functional.fixture.type'].search(
+ "type_id": self.env['sf.functional.fixture.type'].search(
[("code", '=', item['functional_fixture_type_code'])]).id,
"zero_chuck_model_ids": self._get_fixture_model_ids(item['zero_chuck_model_codes']),
"transfer_tray_model_ids": self._get_fixture_model_ids(
@@ -1785,7 +1785,7 @@ class SyncFunctionalFixture(models.Model):
else:
functional_fixture.write({
"name": item['name'],
- "functional_fixture_type_id": self.env['sf.functional.fixture.type'].search(
+ "type_id": self.env['sf.functional.fixture.type'].search(
[("code", '=', item['functional_fixture_type_code'])]).id,
"zero_chuck_model_ids": self._get_fixture_model_ids(item['zero_chuck_model_codes']),
"transfer_tray_model_ids": self._get_fixture_model_ids(
@@ -1820,7 +1820,7 @@ class SyncFunctionalFixture(models.Model):
self.env['sf.functional.fixture'].create({
"name": item['name'],
"code": item['code'],
- "functional_fixture_type_id": self.env['sf.functional.fixture.type'].search(
+ "type_id": self.env['sf.functional.fixture.type'].search(
[("code", '=', item['functional_fixture_type_code'])]).id,
"zero_chuck_model_ids": self._get_fixture_model_ids(item['zero_chuck_model_codes']),
"transfer_tray_model_ids": self._get_fixture_model_ids(
@@ -1834,7 +1834,7 @@ class SyncFunctionalFixture(models.Model):
else:
functional_fixture.write({
"name": item['name'],
- "functional_fixture_type_id": self.env['sf.functional.fixture.type'].search(
+ "type_id": self.env['sf.functional.fixture.type'].search(
[("code", '=', item['functional_fixture_type_code'])]).id,
"zero_chuck_model_ids": self._get_fixture_model_ids(item['zero_chuck_model_codes']),
"transfer_tray_model_ids": self._get_fixture_model_ids(
diff --git a/sf_plan_management/__manifest__.py b/sf_plan_management/__manifest__.py
index 44be0987..d4ec406b 100644
--- a/sf_plan_management/__manifest__.py
+++ b/sf_plan_management/__manifest__.py
@@ -10,11 +10,11 @@
""",
'category': 'sf',
'website': 'https://www.sf.jikimo.com',
- 'depends': ['sf_maintenance'],
+ 'depends': ['sf_manufacturing'],
'data': [
'security/ir.model.access.csv',
# 'security/ir.model.access.csv',
- 'views/paln_base_view.xml',
+ 'views/plan_base_view.xml',
'views/menu_view.xml',
],
'demo': [
diff --git a/sf_plan_management/models/base.py b/sf_plan_management/models/base.py
index 1a8d1e27..57df9566 100644
--- a/sf_plan_management/models/base.py
+++ b/sf_plan_management/models/base.py
@@ -19,7 +19,7 @@ class ProcedureEquipmentResourceSetting(models.Model):
working_procedure = fields.Char(string='工序', readonly=True)
production_capacity = fields.Float(string='产能', required=True, digits=(4, 1))
working_calendar_id = fields.Many2one('sf.work.log.setting', string='工作日历')
- working_shift = fields.Char(string='班次', readonly=True, compute='_onchange_working_calendar_id')
+ working_shift_id = fields.Many2many('sf.working.shift', string='班次', readonly=True, compute='_onchange_working_calendar_id')
create_time = fields.Datetime(string='新增时间', default=lambda self: fields.Datetime.now(), readonly=True)
status = fields.Selection([('正常', '正常'), ('1', '故障停机'), ('2', '计划停机')],
string='设备状态',
@@ -49,7 +49,7 @@ class ProcedureEquipmentResourceSetting(models.Model):
@api.depends('working_calendar_id')
def _onchange_working_calendar_id(self):
for record in self:
- record.working_shift = record.working_calendar_id.working_shift
+ record.working_shift_id = record.working_calendar_id.working_shift_id
diff --git a/sf_plan_management/models/calendar_base.py b/sf_plan_management/models/calendar_base.py
index 0bc1ba56..6304d2e1 100644
--- a/sf_plan_management/models/calendar_base.py
+++ b/sf_plan_management/models/calendar_base.py
@@ -1,3 +1,5 @@
+from datetime import datetime, timedelta, date
+
from odoo import models, fields, api
import re
@@ -45,29 +47,21 @@ class WorkLogSetting(models.Model):
end_time_M = fields.Selection(time_M_or_S_selection(), '分', required=True)
duration = fields.Char(string='时长', readonly=True, compute='_compute_duration')
- day_off = fields.Char(string='休息日', required=True)
+ day_off_id = fields.Many2many('sf.day.off', string='休息日', required=True)
- user_defined_working_shift_status = fields.Boolean(string='自定义班次', default=False)
- working_shift = fields.Char(string='班次')
- working_shift_char = fields.Char(string='班次', readonly=True, compute='_compute_working_shift_time')
- working_shift_select = fields.Selection([('早班00:00-08:00', '早班00:00-08:00'),
- ('白班08:00-16:00', '白班08:00-16:00'),
- ('晚班16:00-24:00', '晚班16:00-24:00'),
- ('长白班08:00-20:00', '长白班08:00-20:00'),
- ('长晚班20:00-08:00', '长晚班20:00-08:00')], string='班次')
- working_shift_start_time_H = fields.Selection(time_H_selection(), '班次开始时间:时',
- attr={'required': [('user_defined_working_shift_status', '=', 'True')]})
- working_shift_start_time_M = fields.Selection(time_M_or_S_selection(), '分',
- attr={'required': [('user_defined_working_shift_status', '=', 'True')]})
- working_shift_end_time_H = fields.Selection(time_H_selection(), '班次结束时间:时',
- attr={'required': [('user_defined_working_shift_status', '=', 'True')]})
- working_shift_end_time_M = fields.Selection(time_M_or_S_selection(), '分',
- attr={'required': [('user_defined_working_shift_status', '=', 'True')]})
+ working_shift_id = fields.Many2many('sf.working.shift', string='班次')
status = fields.Boolean(string='状态', default=True)
update_person = fields.Char(string='更新人', default=lambda self: self.env.user.name)
update_time = fields.Datetime(string='更新时间', default=lambda self: fields.Datetime.now())
+ setting_to_calendar_ids = fields.One2many('sf.work.schedule.calendar', 'name_id', '工作日历')
+
+ # @api.model
+ # def create(self, vals):
+ # vals['setting_to_calendar_ids'] = [(4, child.id)]
+ # return super(WorkLogSetting, self).create(vals)
+
@api.depends('start_time_H', 'start_time_M')
def _compute_start_time(self):
"""
@@ -86,27 +80,7 @@ class WorkLogSetting(models.Model):
for record in self:
record.end_time = f"{record.end_time_H}:{record.end_time_M}:00"
- @api.onchange('working_shift_char', 'working_shift_select')
- def _onchange_working_shift(self):
- """
- 对班次是否手动输入是进行不同的展示
- :return:
- """
- for record in self:
- if record.working_shift_select:
- record.working_shift = record.working_shift_select
- else:
- record.working_shift = record.working_shift_char
-
- @api.depends(
- 'working_shift_start_time_H', 'working_shift_start_time_M',
- 'working_shift_end_time_H', 'working_shift_end_time_M')
- def _compute_working_shift_time(self):
- start_time = f"{self.working_shift_start_time_H}:{self.working_shift_start_time_M}:00"
- end_time = f"{self.working_shift_end_time_H}:{self.working_shift_end_time_M}:00"
- self.working_shift_char = f"自定义班次{start_time}-{end_time}"
-
- @api.depends('start_time_H', 'start_time_M', 'end_time_H', 'end_time_M')
+ @api.depends('start_time_H', 'start_time_M', 'end_time_H', 'end_time_M')
def _compute_duration(self):
"""
根据日开始时间和日结束时间计算每日工作时长
@@ -119,6 +93,160 @@ class WorkLogSetting(models.Model):
end_m = float(record.end_time_M)
# 日开始时间小于日结束时间
if st_h < end_h:
- record.duration = str(round(end_h-st_h+(end_m-st_m)/60, 2))
+ record.duration = str(round(end_h - st_h + (end_m - st_m) / 60, 2))
else:
- record.duration = str(round(end_h-st_h+(end_m-st_m)/60+24, 2))
+ record.duration = str(round(end_h - st_h + (end_m - st_m) / 60 + 24, 2))
+
+ # @api.onchange('day_off_id')
+ # def _onchange_day_off_id(self):
+ # # 先删除之前创建的工作日历事件记录
+ # self.env['sf.work.schedule.calendar'].search([('calendar_code', '=', self.code)]).unlink()
+ #
+ # # 获取当年的一月一号的日期
+ # year = fields.Datetime.now().year # 2023
+ # first_day = datetime(year, 1, 1).date() # 2023-01-01
+ # day_of_week = first_day.strftime("%A") # 星期日
+ #
+ # # 根据day_of_week,将其设置为起始0,循环周一到周日,按循环顺序设置为0-6
+ # # 列:{'星期日': 0, '星期一': 1, '星期二': 2, '星期三': 3, '星期四': 4, '星期五': 5, '星期六': 6}
+ # desc = {}
+ # desc_weekdays = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日']
+ # status = False
+ # ints = 0
+ # while len(desc) < 7:
+ # if len(desc) != 0:
+ # for week in desc_weekdays:
+ # if len(desc) < 7:
+ # desc.update({week: ints})
+ # ints += 1
+ # else:
+ # for week in desc_weekdays:
+ # if status:
+ # desc.update({week: ints})
+ # ints += 1
+ # if day_of_week == week:
+ # desc.update({week: ints})
+ # status = True
+ # ints += 1
+ #
+ # # 创建工作日历的休息日事件
+ # day_off_ids = self.day_off_id.mapped('name')
+ # record = self.env['sf.work.log.setting'].search([('code', '=', self.code)])
+ # # record.setting_to_calendar_ids.unlink()
+ # # self.env.cr.commit()
+ # for week in day_off_ids:
+ # num = desc[week]
+ # while num <= 30:
+ # target_date = first_day + timedelta(days=num)
+ # num += 7
+ # self.env['sf.work.schedule.calendar'].create({'name': '休息日',
+ # 'name_id': record.id,
+ # 'calendar_code': self.code,
+ # 'date_time': target_date})
+
+ @api.model
+ def create(self, vals):
+ """
+ 创建记录时,生成工作日历
+ """
+ record = super(WorkLogSetting, self).create(vals)
+ record.generate_work_calendar()
+ return record
+
+ def write(self, vals):
+ """
+ 更新记录时,生成工作日历
+ """
+ # 先删除之前创建的工作日历事件记录
+ self.env['sf.work.schedule.calendar'].search([('calendar_code', '=', self.code)]).unlink()
+ result = super(WorkLogSetting, self).write(vals)
+ self.generate_work_calendar()
+ return result
+
+ def generate_work_calendar(self):
+ """
+ 生成工作日历
+ """
+ self.ensure_one()
+ # start_date = date.today() # 开始日期
+ # end_date = start_date + timedelta(days=365) # 结束日期
+ # 获取本年第一天和最后一天
+ start_date = datetime.now().replace(month=1, day=1).date()
+ end_date = datetime.now().replace(month=12, day=31).date()
+ # 休息日列表
+ rest_days = self.day_off_id.mapped('name')
+ for single_date in self.daterange(start_date, end_date):
+ is_workday = single_date.strftime("%A")
+ if is_workday in rest_days:
+ print('is_workday in rest_days', is_workday)
+ self.env['sf.work.schedule.calendar'].create({
+ 'name': '休息日',
+ 'name_id': self.id,
+ 'calendar_code': self.code,
+ 'date_time': single_date})
+ @staticmethod
+ def daterange(start_date, end_date):
+ """
+ 生成日期范围
+ """
+ # 生成日期范围
+ for n in range(int((end_date - start_date).days)):
+ yield start_date + timedelta(n)
+
+
+class WorkingShift(models.Model):
+ _name = 'sf.working.shift'
+ _description = '班次'
+
+ def _get_code(self):
+ """
+ 自动生成编码
+ :return:
+ """
+ fixture_material = self.env['sf.working.shift'].sudo().search(
+ [('code', '!=', '')],
+ limit=1,
+ order="id desc")
+ if not fixture_material:
+ num = "%03d" % 1
+ else:
+ m = int(fixture_material.code) + 1
+ num = "%03d" % m
+ return num
+
+ code = fields.Char('编码', default=_get_code, readonly=True)
+ name = fields.Char('名称', required=True)
+ start_time = fields.Datetime('班次开始时间')
+ end_time = fields.Datetime('班次结束时间')
+ remark = fields.Char('备注')
+
+
+class DayOff(models.Model):
+ _name = 'sf.day.off'
+ _description = '休息日'
+
+ name = fields.Selection([
+ ('星期一', '星期一'),
+ ('星期二', '星期二'),
+ ('星期三', '星期三'),
+ ('星期四', '星期四'),
+ ('星期五', '星期五'),
+ ('星期六', '星期六'),
+ ('星期日', '星期日')], '休息日名称')
+
+
+class WorkScheduleCalendar(models.Model):
+ _name = 'sf.work.schedule.calendar'
+ _description = '工作日历'
+
+ name = fields.Selection([('休息日', '休息日'), ('计划停机', '计划停机'), ('工作日', '工作日')], '日历事件名称')
+ date_time = fields.Date('休息时间')
+ name_id = fields.Many2one('sf.work.log.setting', '工作日历名称')
+ calendar_code = fields.Char('工作日历编码')
+
+ day_off_id = fields.Many2many('sf.day.off', string='休息日')
+ scheduled_outage = fields.Char('计划停机')
+ monthly_rest_days = fields.Char('月休息天数', readonly=True)
+ annual_rest_days = fields.Char('年休息天数', readonly=True)
+ monthly_planned_downtime = fields.Char('月计划停机时长', readonly=True)
+ annual_planned_downtime = fields.Char('年计划停机时长', readonly=True)
diff --git a/sf_plan_management/security/ir.model.access.csv b/sf_plan_management/security/ir.model.access.csv
index 98cf2ae7..45b4c99b 100644
--- a/sf_plan_management/security/ir.model.access.csv
+++ b/sf_plan_management/security/ir.model.access.csv
@@ -2,6 +2,10 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_sf_work_log_setting,sf.work.log.setting,model_sf_work_log_setting,base.group_user,1,1,1,1
access_sf_procedure_equipment_resource_setting,sf.procedure.equipment.resource.setting,model_sf_procedure_equipment_resource_setting,base.group_user,1,1,1,1
+access_sf_day_off,sf.day.off,model_sf_day_off,base.group_user,1,1,1,1
+access_sf_working_shift,sf.working.shift,model_sf_working_shift,base.group_user,1,1,1,1
+access_sf_work_schedule_calendar,sf.work.schedule.calendar,model_sf_work_schedule_calendar,base.group_user,1,1,1,1
+
diff --git a/sf_plan_management/views/menu_view.xml b/sf_plan_management/views/menu_view.xml
index 2bf4569d..793f381d 100644
--- a/sf_plan_management/views/menu_view.xml
+++ b/sf_plan_management/views/menu_view.xml
@@ -25,4 +25,25 @@
action="sf_procedure_equipment_resource_setting_act"
sequence="10"
/>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sf_plan_management/views/paln_base_view.xml b/sf_plan_management/views/plan_base_view.xml
similarity index 55%
rename from sf_plan_management/views/paln_base_view.xml
rename to sf_plan_management/views/plan_base_view.xml
index 645aa45d..16e25874 100644
--- a/sf_plan_management/views/paln_base_view.xml
+++ b/sf_plan_management/views/plan_base_view.xml
@@ -1,6 +1,6 @@
-
+
工作日历设置
sf.work.log.setting
@@ -11,11 +11,12 @@
-
-
+
+
+
@@ -35,29 +36,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -80,13 +59,14 @@
-
-
-
+
+
@@ -100,7 +80,138 @@
-
+
+
+ 休息日
+ sf.day.off
+
+
+
+
+
+
+
+
+ 休息日
+ sf.day.off
+ tree,form
+
+
+
+
+
+ 班次
+ sf.working.shift
+
+
+
+
+
+
+
+
+
+
+
+
+ 班次
+ sf.working.shift
+
+
+
+
+
+
+ 班次
+ sf.working.shift
+ tree,form
+
+
+
+
+
+ 工作日历
+ sf.work.schedule.calendar
+
+
+
+
+
+
+
+
+
+
+ 工作日历
+ sf.work.schedule.calendar
+
+
+
+
+
+
+ 工作日历
+ sf.work.schedule.calendar
+
+
+
+
+
+
+
+
+
+
+ 工作日历
+ sf.work.schedule.calendar
+
+
+
+
+
+
+
+
+ 工作日历
+ sf.work.schedule.calendar
+ calendar,search,tree,form
+
+
+
+
产线设备资源设置
sf.procedure.equipment.resource.setting
@@ -114,7 +225,7 @@
-
+
@@ -161,7 +272,7 @@
-
+
@@ -182,7 +293,7 @@
-
+
diff --git a/sf_warehouse/__manifest__.py b/sf_warehouse/__manifest__.py
index fb0a512f..841b72c6 100644
--- a/sf_warehouse/__manifest__.py
+++ b/sf_warehouse/__manifest__.py
@@ -23,7 +23,11 @@
'web.assets_qweb': [
],
'web.assets_backend':[
- 'sf_warehouse/static/src/kanban_color_change.scss'
+ # 'sf_warehouse/static/src/js/vanilla-masker.min.js',
+ 'sf_warehouse/static/src/css/kanban_color_change.scss',
+ 'sf_warehouse/static/src/js/custom_kanban_controller.js',
+ 'sf_warehouse/static/src/xml/custom_kanban_controller.xml',
+
]
diff --git a/sf_warehouse/models/model.py b/sf_warehouse/models/model.py
index 4990d233..af4e185a 100644
--- a/sf_warehouse/models/model.py
+++ b/sf_warehouse/models/model.py
@@ -10,22 +10,12 @@ class SfLocation(models.Model):
name = fields.Char('Location Name', required=True, size=20)
barcode = fields.Char('Barcode', copy=False, required=True, size=15)
- # 仓库类别(selection:仓库、库区、库位、货位)
+ # 仓库类别(selection:库区、库位、货位)
location_type = fields.Selection([
- ('仓库', '仓库'),
('库区', '库区'),
('货架', '货架'),
('货位', '货位')
], string='仓库类别')
- # 仓库类型(分类:成品库、坯料库、原材料库、刀具库、线边料库、线边刀库)
- location_category = fields.Selection([
- ('成品库', '成品库'),
- ('坯料库', '坯料库'),
- ('原材料库', '原材料库'),
- ('刀具库', '刀具库'),
- ('线边料库', '线边料库'),
- ('线边刀库', '线边刀库')
- ], string='仓库类型')
# 库区类型(selection:拣货区、存货区、收货区、退货区、次品区)
area_type = fields.Selection([
('拣货区', '拣货区'),
@@ -34,6 +24,13 @@ class SfLocation(models.Model):
('退货区', '退货区'),
('次品区', '次品区')
], string='库区类型')
+ # 存储类型(selection:库区、货架)
+ storage_type = fields.Selection([
+ ('库区', '库区'),
+ ('货架', '货架')
+ ], string='存储类型')
+ # 产品类别 (关联:product.category)
+ product_type = fields.Many2many('product.category', string='产品类别')
# 货架独有字段:通道、方向、货架高度(m)、货架层数、层数容量
channel = fields.Char(string='通道', required=True)
direction = fields.Selection([
@@ -64,6 +61,27 @@ class SfLocation(models.Model):
hide_shelf = fields.Boolean(compute='_compute_hide_what', string='隐藏货架')
hide_location = fields.Boolean(compute='_compute_hide_what', string='隐藏货位')
+ @api.model
+ def create(self, vals):
+ """
+ 重写create方法,添加自定义的约束
+ """
+ print('create', vals)
+ if vals.get('location_id'):
+ location = self.env['stock.location'].browse(vals.get('location_id'))
+ if location.storage_type == '库区':
+ raise UserError('库区不能作为父级仓库')
+ return super().create(vals)
+
+ @api.onchange('location_id')
+ def _onchange_location_id(self):
+ """
+ 重写onchange方法,添加自定义的约束
+ """
+ if self.location_id:
+ if self.location_id.storage_type == '库区':
+ raise UserError('库区不能作为父级仓库')
+
# @api.constrains('shelf_height')
# def _check_shelf_height(self):
# for record in self:
@@ -84,6 +102,9 @@ class SfLocation(models.Model):
@api.depends('product_sn_id')
def _compute_product_id(self):
+ """
+ 根据产品序列号,获取产品
+ """
for record in self:
if record.product_sn_id:
record.product_id = record.product_sn_id.product_id
@@ -153,6 +174,9 @@ class SfLocation(models.Model):
# 生成货位
def create_location(self):
+ """
+ 当仓库类型为货架时,自动生成其下面的货位,数量为货架层数*层数容量
+ """
if self.location_type == '货架':
for i in range(self.shelf_layer):
for j in range(self.layer_capacity):
@@ -165,8 +189,12 @@ class SfLocation(models.Model):
})
def generate_barcode(self, i, j):
+ """
+ 生成货位条码
+ """
# 这里是你生成barcode的代码
- area_type_barcode = self.location_id.barcode
+ # area_type_barcode = self.location_id.barcode
+ area_type_barcode = self.barcode
i_str = str(i + 1).zfill(3) # 确保是两位数,如果不足两位,左侧补0
j_str = str(j + 1).zfill(3) # 确保是两位数,如果不足两位,左侧补0
return area_type_barcode + self.channel + self.direction + '-' + self.barcode + '-' + i_str + '-' + j_str
diff --git a/sf_warehouse/static/src/css/kanban_color_change.scss b/sf_warehouse/static/src/css/kanban_color_change.scss
new file mode 100644
index 00000000..ddb39767
--- /dev/null
+++ b/sf_warehouse/static/src/css/kanban_color_change.scss
@@ -0,0 +1,25 @@
+.oe_kanban_card.kanban_color_1 {
+ background-color: #73b9a2 !important;
+}
+
+.oe_kanban_card.kanban_color_2 {
+ background-color: #ac6767 !important;
+}
+
+.oe_kanban_card.kanban_color_3 {
+ background-color: #77787b !important;
+}
+
+.color-guide {
+ border: 1px solid #ccc;
+ background-color: #f9f9f9;
+ padding: 10px;
+}
+
+.color-guide-item {
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ margin-right: 10px;
+ border-radius: 50%;
+}
diff --git a/sf_warehouse/static/src/js/custom_kanban_controller.js b/sf_warehouse/static/src/js/custom_kanban_controller.js
new file mode 100644
index 00000000..7b9d01fb
--- /dev/null
+++ b/sf_warehouse/static/src/js/custom_kanban_controller.js
@@ -0,0 +1,21 @@
+/** @odoo-module */
+
+import { KanbanController } from "@web/views/kanban/kanban_controller";
+import { kanbanView } from "@web/views/kanban/kanban_view";
+import { registry } from "@web/core/registry";
+
+// the controller usually contains the Layout and the renderer.
+class CustomKanbanController extends KanbanController {
+ // Your logic here, override or insert new methods...
+ // if you override setup(), don't forget to call super.setup()
+}
+
+CustomKanbanController.template = "sf_warehouse.CustomKanbanView";
+
+export const customKanbanView = {
+ ...kanbanView, // contains the default Renderer/Controller/Model
+ Controller: CustomKanbanController,
+};
+
+// Register it to the views registry
+registry.category("views").add("custom_kanban", customKanbanView);
\ No newline at end of file
diff --git a/sf_warehouse/static/src/kanban_color_change.scss b/sf_warehouse/static/src/kanban_color_change.scss
deleted file mode 100644
index eca158e1..00000000
--- a/sf_warehouse/static/src/kanban_color_change.scss
+++ /dev/null
@@ -1,11 +0,0 @@
-.oe_kanban_card.kanban_color_1 {
- background-color: red !important;
-}
-
-.oe_kanban_card.kanban_color_2 {
- background-color: blue !important;
-}
-
-.oe_kanban_card.kanban_color_3 {
- background-color: green !important;
-}
diff --git a/sf_warehouse/static/src/xml/custom_kanban_controller.xml b/sf_warehouse/static/src/xml/custom_kanban_controller.xml
new file mode 100644
index 00000000..d5b426b8
--- /dev/null
+++ b/sf_warehouse/static/src/xml/custom_kanban_controller.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+ Hello world !
+
+
+
+
+
\ No newline at end of file
diff --git a/sf_warehouse/views/view.xml b/sf_warehouse/views/view.xml
index f5a41d43..6481fa84 100644
--- a/sf_warehouse/views/view.xml
+++ b/sf_warehouse/views/view.xml
@@ -30,11 +30,13 @@
+
+
-
-
+
+
@@ -53,7 +55,13 @@
-
+
+
+
+
+
+
+
@@ -74,7 +82,7 @@
example.kanban
stock.location
-
+