Merge branch refs/heads/develop into refs/heads/release/release_2.1

This commit is contained in:
禹翔辉
2024-07-25 15:25:07 +08:00
199 changed files with 16677 additions and 1231 deletions

View File

@@ -418,19 +418,19 @@ class ShelfLocation(models.Model):
host = printer_config.printer_id.ip_address
port = printer_config.printer_id.port
self.print_qr_code(barcode, host, port)
# 获取当前wizard的视图ID或其他标识信息
view_id = self.env.context.get('view_id')
# 构造返回wizard页面的action字典
action = {
'type': 'ir.actions.act_window',
'name': '返回 Wizard',
'res_model': 'sf.shelf', # 替换为你的wizard模型名称
'view_mode': 'form',
'view_id': view_id, # 如果需要基于特定的视图返回
'target': 'new', # 如果需要在新的窗口或标签页打开
'res_id': self.shelf_id, # 如果你想要返回当前记录的视图
}
return action
# # 获取当前wizard的视图ID或其他标识信息
# view_id = self.env.context.get('view_id')
# # 构造返回wizard页面的action字典
# action = {
# 'type': 'ir.actions.act_window',
# 'name': '返回 Wizard',
# 'res_model': 'sf.shelf', # 替换为你的wizard模型名称
# 'view_mode': 'form',
# 'view_id': view_id, # 如果需要基于特定的视图返回
# 'target': 'new', # 如果需要在新的窗口或标签页打开
# 'res_id': self.shelf_id, # 如果你想要返回当前记录的视图
# }
# return action
# # 仓库类别selection库区、库位、货位
# location_type = fields.Selection([

View File

@@ -102,11 +102,11 @@
attrs="{'invisible': ['|', '|', '|', ('picking_type_code', '=', 'incoming'), ('immediate_transfer', '=', True), '&', ('state', '!=', 'assigned'), ('move_type', '!=', 'one'), '&', ('state', 'not in', ('assigned', 'confirmed')), ('move_type', '=', 'one')]}"
data-hotkey="w"/>
</xpath>
<xpath expr="//form//header//button[@name='button_scrap']" position="replace">
<button name="button_scrap" groups="sf_base.group_sf_stock_user" type="object" string="报废"
attrs="{'invisible': ['|', '&amp;', ('picking_type_code', '=', 'incoming'), ('state', '!=', 'done'), '&amp;', ('picking_type_code', '=', 'outgoing'), ('state', '=', 'done')]}"
data-hotkey="y"/>
</xpath>
<!-- <xpath expr="//form//header//button[@name='button_scrap']" position="replace">-->
<!-- <button name="button_scrap" groups="sf_base.group_sf_stock_user" type="object" string="报废"-->
<!-- attrs="{'invisible': ['|', '&amp;', ('picking_type_code', '=', 'incoming'), ('state', '!=', 'done'), '&amp;', ('picking_type_code', '=', 'outgoing'), ('state', '=', 'done')]}"-->
<!-- data-hotkey="y"/>-->
<!-- </xpath>-->
<xpath expr="//form//header//button[@name='action_assign']" position="replace">
<button name="action_assign" attrs="{'invisible': [('show_check_availability', '=', False)]}"
string="检查可用量" type="object" class="oe_highlight"