Accept Merge Request #1924: (feature/制造功能优化 -> develop)
Merge Request: 修正问题 Created By: @马广威 Accepted By: @马广威 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1924?initial=true
This commit is contained in:
@@ -151,7 +151,7 @@ class QualityCheck(models.Model):
|
|||||||
if record.picking_id:
|
if record.picking_id:
|
||||||
total_qty = 0
|
total_qty = 0
|
||||||
for move in record.picking_id.move_ids_without_package:
|
for move in record.picking_id.move_ids_without_package:
|
||||||
total_qty += move.product_uom_qty
|
total_qty += int(move.product_uom_qty)
|
||||||
record.total_qty = total_qty if total_qty > 0 else ''
|
record.total_qty = total_qty if total_qty > 0 else ''
|
||||||
else:
|
else:
|
||||||
record.total_qty = ''
|
record.total_qty = ''
|
||||||
@@ -373,9 +373,9 @@ class QualityCheck(models.Model):
|
|||||||
raise UserError(_('请先输入检验数'))
|
raise UserError(_('请先输入检验数'))
|
||||||
if not record.total_qty:
|
if not record.total_qty:
|
||||||
raise UserError(_('总数量不能为空'))
|
raise UserError(_('总数量不能为空'))
|
||||||
if record.check_qty <= float(record.total_qty):
|
if record.check_qty >= int(record.total_qty):
|
||||||
raise UserError(_('检验数不可超过总数量'))
|
raise UserError(_('检验数不可超过总数量'))
|
||||||
if record.column_nums >= record.check_qty:
|
if record.column_nums <= record.check_qty:
|
||||||
raise UserError(_('测量件数不可超过检验数'))
|
raise UserError(_('测量件数不可超过检验数'))
|
||||||
|
|
||||||
def do_cancel_publish(self):
|
def do_cancel_publish(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user