diff --git a/sf_base/models/base.py b/sf_base/models/base.py index bb225b9b..ef7a89fb 100644 --- a/sf_base/models/base.py +++ b/sf_base/models/base.py @@ -256,7 +256,7 @@ class MachineToolType(models.Model): name = fields.Char('名称') brand_id = fields.Many2one('sf.machine.brand', string='品牌') knife_type = fields.Selection( - [("BT40", "BT40"), ("BT30", "BT30")], + [("BT40", "BT40"), ("BT30", "BT30"), ("BT50", "BT50")], default="", string="刀把类型") number_of_knife_library = fields.Integer('刀库数量') rotate_speed = fields.Integer('转速') @@ -308,6 +308,13 @@ class MachineToolType(models.Model): active = fields.Boolean('有效', default=True) code = fields.Char('编码') + def _get_ids(self, machine_tool_type_code): + machine_tool_type_ids = [] + for item in machine_tool_type_code: + machine_tool_type = self.search([('code', '=', item)]) + machine_tool_type_ids.append(machine_tool_type.id) + return [(6, 0, machine_tool_type_ids)] + class MachineToolCategory(models.Model): _name = 'sf.machine_tool.category' diff --git a/sf_base/models/fixture.py b/sf_base/models/fixture.py index db22b8d6..727f58bc 100644 --- a/sf_base/models/fixture.py +++ b/sf_base/models/fixture.py @@ -53,5 +53,10 @@ class FixtureModel(models.Model): screw_size = fields.Integer(string="螺牙大小[mm]", size=6) active = fields.Boolean('有效', default=True) + # @api.model + # def create(self, vals): + # obj = super(FixtureModel, self).create(vals) + # return obj + diff --git a/sf_base/static/src/scss/test.scss b/sf_base/static/src/scss/test.scss index 3abd10e1..faef4815 100644 --- a/sf_base/static/src/scss/test.scss +++ b/sf_base/static/src/scss/test.scss @@ -8,27 +8,34 @@ white-space: nowrap; } -div:has(.o_required_modifier)>label::before { +div:has(.o_required_modifier) > label::before { content: '*' !important; color: red !important; padding: 0 4px !important; vertical-align: top !important; font-size: 1.5rem !important; - } -.my-image div { - width: 100px !important; - height: 130px !important; } + +.my-image div { + width: 110px !important; + height: 110px !important; +} + .add_flex { + padding: 5px 0; display: flex; flex-direction: column; + justify-content: space-between; } + .maintenance_name { font-weight: bold; } + .o_kanban_renderer .o_kanban_record .o_kanban_record_has_image_fill .o_kanban_image_fill_left { - flex:unset !important; + flex: unset !important; } + .o_kanban_renderer .o_kanban_record .o_kanban_record_bottom { margin-top: 5px; display: inline !important; @@ -36,4 +43,80 @@ div:has(.o_required_modifier)>label::before { td.o_required_modifier { display: table-cell !important; +} + +.show_state { + display: flex; + flex-direction: column; + position: absolute; + top: 0; + bottom: 0; + right: 8px; + margin: auto; + height: 34px; +} + +.show_state > div { + width: 12px; + height: 12px; + border: 1px solid #000 +} + +.show_state > div:nth-child(2) { + border-top: none; + border-bottom: none; +} + +.oe_kanban_card.kanban_color_2 { + background-color: #FF4343 !important; + color: #fff; +} + +.oe_kanban_card.kanban_color_1 { + background-color: #27FEA9 !important; + opacity: 0.7; + color: #fff; +} + +.oe_kanban_card.kanban_color_3 { + background-color: rgb(255, 150, 0) !important; + color: #fff; +} + +.my-image img { + width: 100%; + height: 100%; +} + +.color_1 { + background-color: #27FEA9; +} + +.color_2 { + background-color: #FF4343; +} + +.color_3 { + background-color: rgb(255, 150, 0); +} + +.font_color_1 { + color: rgb(0, 183, 0); +} + +.font_color_2 { + color: #FF4343; +} + +.font_color_3 { + color: rgb(255, 150, 0); +} + +.o_kanban_card_header_title { + font-size: 15px; +} + +.o_kanban_record_bottom { + font-family: '华文中宋'; + //font-weight: bold; } \ No newline at end of file diff --git a/sf_base/views/base_view.xml b/sf_base/views/base_view.xml index 88a2dd86..cdff5a4b 100644 --- a/sf_base/views/base_view.xml +++ b/sf_base/views/base_view.xml @@ -30,6 +30,7 @@ + @@ -41,16 +42,16 @@
-

- +

+
- +

- +

-