Accept Merge Request #793: (feature/制造代码优化 -> develop)

Merge Request: 优化货位颜色及启用货位

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/793
This commit is contained in:
马广威
2024-01-30 09:49:25 +08:00
committed by Coding
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):
self.location_status = '禁用'
# 修改货位状态为空闲
def action_location_status_enable(self):
self.location_status = '空闲'
@api.onchange('shelf_location_id')
def _onchange_shelf_location_id(self):
"""

View File

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

View File

@@ -60,6 +60,8 @@
attrs="{'invisible': [('hide_shelf', '=', False)]}"/>
<button string="禁用货位" name="action_location_status_disable" type="object" class="oe_highlight"
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"-->
<!-- type="action"-->