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:
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
.green {
|
||||
background-color: #27FEA9 !important;
|
||||
background-color: #fff !important;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
|
||||
@@ -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"-->
|
||||
|
||||
Reference in New Issue
Block a user