This commit is contained in:
jinling.yang
2024-01-30 11:43:39 +08:00
3 changed files with 7 additions and 1 deletions

View File

@@ -292,6 +292,10 @@ class ShelfLocation(models.Model):
def action_location_status_disable(self): def action_location_status_disable(self):
self.location_status = '禁用' self.location_status = '禁用'
# 修改货位状态为空闲
def action_location_status_enable(self):
self.location_status = '空闲'
@api.onchange('shelf_location_id') @api.onchange('shelf_location_id')
def _onchange_shelf_location_id(self): def _onchange_shelf_location_id(self):
""" """

View File

@@ -52,7 +52,7 @@
} }
.green { .green {
background-color: #27FEA9 !important; background-color: #fff !important;
border: 1px solid #ccc; border: 1px solid #ccc;
} }

View File

@@ -60,6 +60,8 @@
attrs="{'invisible': [('hide_shelf', '=', False)]}"/> attrs="{'invisible': [('hide_shelf', '=', False)]}"/>
<button string="禁用货位" name="action_location_status_disable" type="object" class="oe_highlight" <button string="禁用货位" name="action_location_status_disable" type="object" class="oe_highlight"
attrs="{'invisible': ['|', ('hide_shelf', '=', True), ('location_status', '!=', '空闲')]}"/> attrs="{'invisible': ['|', ('hide_shelf', '=', True), ('location_status', '!=', '空闲')]}"/>
<button string="启用货位" name="action_location_status_enable" type="object" class="oe_highlight"
attrs="{'invisible': ['|', ('hide_shelf', '=', True), ('location_status', '!=', '禁用')]}"/>
<!-- <button name="%(shelf_location_kanban_action_id)d"--> <!-- <button name="%(shelf_location_kanban_action_id)d"-->
<!-- type="action"--> <!-- type="action"-->