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

Merge Request: 三次元检测z计算修改

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/951?initial=true
This commit is contained in:
马广威
2024-04-17 17:03:38 +08:00
committed by Coding
2 changed files with 22 additions and 6 deletions

View File

@@ -226,6 +226,7 @@ class SfShelf(models.Model):
_order = 'create_date desc'
name = fields.Char('货架名称', required=True, size=20)
active = fields.Boolean("有效", default=True)
barcode = fields.Char('编码', copy=False, size=15, required=True)
# 货位
location_ids = fields.One2many('sf.shelf.location', 'shelf_id', string='货位')
@@ -304,6 +305,7 @@ class SfShelf(models.Model):
class ShelfLocation(models.Model):
_name = 'sf.shelf.location'
_description = '货位'
_rec_name = 'barcode'
_order = 'id asc, create_date asc'
# current_location_id = fields.Many2one('sf.shelf.location', string='当前位置')
@@ -313,6 +315,7 @@ class ShelfLocation(models.Model):
destination_move_ids = fields.One2many('stock.move.line', 'destination_location_id', '目标位置调拨单')
storage_time = fields.Datetime('入库时间', compute='_compute_location_status')
production_id = fields.Many2one('mrp.production', string='制造订单')
active = fields.Boolean("有效", default=True)
@api.depends('location_status')
def _compute_location_status(self):
@@ -865,15 +868,27 @@ class SfProcurementGroup(models.Model):
return res
# class SfPickingType(models.Model):
# _inherit = 'stock.picking.type'
#
# def _default_show_operations(self):
# return self.user_has_groups('stock.group_production_lot,'
# 'stock.group_stock_multi_locations,'
# 'stock.group_tracking_lot',
# 'sf_warehouse.group_sf_stock_user',
# 'sf_warehouse.group_sf_stock_manager')
class SfPickingType(models.Model):
_inherit = 'stock.picking.type'
def _default_show_operations(self):
return self.user_has_groups('stock.group_production_lot,'
'stock.group_stock_multi_locations,'
'stock.group_tracking_lot',
'sf_warehouse.group_sf_stock_user',
'sf_warehouse.group_sf_stock_manager')
return self.user_has_groups(
'stock.group_production_lot,'
'stock.group_stock_multi_locations,'
'stock.group_tracking_lot,'
'sf_warehouse.group_sf_stock_user,'
'sf_warehouse.group_sf_stock_manager'
)
class CustomStockMove(models.Model):