Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/优化货架货位-新增打印条码
This commit is contained in:
@@ -227,6 +227,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)
|
||||
|
||||
# 货位
|
||||
@@ -335,6 +336,7 @@ class ShelfLocation(models.Model):
|
||||
_name = 'sf.shelf.location'
|
||||
_inherit = ['printing.utils']
|
||||
_description = '货位'
|
||||
_rec_name = 'barcode'
|
||||
_order = 'id asc, create_date asc'
|
||||
|
||||
# current_location_id = fields.Many2one('sf.shelf.location', string='当前位置')
|
||||
@@ -344,6 +346,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):
|
||||
@@ -529,6 +532,12 @@ class Sf_stock_move_line(models.Model):
|
||||
there_is_no_sn = fields.Boolean('是否有序列号', default=False)
|
||||
|
||||
rfid = fields.Char('Rfid', readonly=True)
|
||||
rfid_barcode = fields.Char('Rfid', compute='_compute_rfid')
|
||||
|
||||
@api.depends('lot_id')
|
||||
def _compute_rfid(self):
|
||||
for item in self:
|
||||
item.rfid_barcode = item.lot_id.rfid
|
||||
|
||||
def action_revert_inventory(self):
|
||||
# 检查用户是否有执行操作的权限
|
||||
@@ -949,15 +958,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):
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<field name="destination_location_id" domain="[('location_id', '=', location_dest_id_value), '|',
|
||||
('location_status', '=', '空闲'), ('product_id', '=', current_product_id), ('product_sn_id',
|
||||
'=', there_is_no_sn)]"/>
|
||||
|
||||
<field name="rfid_barcode" string="Rfid"/>
|
||||
|
||||
<!-- <field name="location_dest_id_product_type"/> -->
|
||||
<!-- <field name="location_dest_id"/> -->
|
||||
|
||||
Reference in New Issue
Block a user