质量模块和库存扫码

This commit is contained in:
qihao.gong@jikimo.com
2023-07-24 11:42:15 +08:00
parent 8d024ad625
commit 3c89404543
228 changed files with 142596 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from odoo import api, fields, models
class StockBackorderConfirmation(models.TransientModel):
_inherit = 'stock.backorder.confirmation'
empty_move_count = fields.Integer(compute="_compute_not_fully_processed_move_count")
partial_move_count = fields.Integer(compute="_compute_not_fully_processed_move_count")
@api.depends('pick_ids')
def _compute_not_fully_processed_move_count(self):
for backorder in self:
moves = backorder.pick_ids.move_ids
backorder.empty_move_count = len(moves.filtered(lambda mv: mv.product_uom_qty and not mv.quantity_done))
not_done_count = len(moves.filtered(lambda mv: mv.product_uom_qty > mv.quantity_done))
backorder.partial_move_count = not_done_count - backorder.empty_move_count