1、功能刀具拆解单优化;2、完成 需求坯料序列号生成规则优化2;
This commit is contained in:
@@ -675,7 +675,6 @@ class ReStockMove(models.Model):
|
||||
self.next_serial = self._get_tool_next_serial(self.company_id, self.product_id, self.origin)
|
||||
else:
|
||||
self.next_serial = self.env['stock.lot']._get_next_serial(self.company_id, self.product_id)
|
||||
# self.action_assign_serial_show_details()
|
||||
elif self.product_id.tracking == "lot":
|
||||
self._put_tool_lot(self.company_id, self.product_id, self.origin)
|
||||
|
||||
@@ -702,6 +701,23 @@ class ReStockMove(models.Model):
|
||||
),
|
||||
}
|
||||
|
||||
def put_move_line(self):
|
||||
"""
|
||||
确认订单时,自动分配序列号
|
||||
"""
|
||||
if self.product_id.tracking == "serial":
|
||||
if self.product_id.categ_id.name == '刀具':
|
||||
self.next_serial = self._get_tool_next_serial(self.company_id, self.product_id, self.origin)
|
||||
else:
|
||||
self.next_serial = self.env['stock.lot']._get_next_serial(self.company_id, self.product_id)
|
||||
self._generate_serial_numbers()
|
||||
for item in self.move_line_nosuggest_ids:
|
||||
if item.lot_name:
|
||||
lot_name = item.lot_name
|
||||
if item.product_id.categ_id.name == '坯料':
|
||||
lot_name = lot_name.split('[', 1)[0]
|
||||
item.lot_qr_code = self.compute_lot_qr_code(lot_name)
|
||||
|
||||
def _put_tool_lot(self, company, product, origin):
|
||||
if product.tracking == "lot" and self.product_id.categ_id.name == '刀具':
|
||||
if not self.move_line_nosuggest_ids:
|
||||
|
||||
Reference in New Issue
Block a user