Merge branch 'develop' into feature/修改看板样式

# Conflicts:
#	sf_warehouse/__manifest__.py
#	sf_warehouse/static/src/kanban_color_change.scss
#	sf_warehouse/views/view.xml
This commit is contained in:
WEB许何哲\xuhez
2023-07-11 16:05:53 +08:00
17 changed files with 594 additions and 242 deletions

View File

@@ -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%;
}

View File

@@ -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);

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<t t-name="sf_warehouse.CustomKanbanView" t-inherit="web.KanbanView" owl="1">
<!-- <xpath expr="//Layout" position="before"> -->
<!-- <div> -->
<!-- Hello world ! -->
<!-- </div> -->
<!-- </xpath> -->
<xpath expr="//t[@t-component='props.Renderer']" position="before">
<div>
Hello world !
</div>
</xpath>
</t>
</templates>