是否有发票交付数量的解决方案?

Is there a solution to invoice delivered qty ?

我想知道在 odoo 中是否有仅针对交付数量(交付数量 - 退回数量)开具发票的解决方案 还是我必须编码?

据我所知,没有任何选项可以为交付数量开具发票。 您必须为该选项编写代码。

继承模块stock_move的_get_invoice_line_vals stock_account

def _get_invoice_line_vals(
     ...
     #search for (deliverd - returnedQty)
     qty = 0
     quant_obj = self.pool.get("stock.quant")
     uom_obj = self.pool.get('product.uom')
     quant_search = quant_obj.search(cr, uid, [('history_ids', 'in', move.id), ('qty', '>', 0.0), ('location_id', 'child_of', move.location_dest_id.id)], context=context)
     for quant in quant_obj.browse(cr, uid, quant_search, context=context):
         if not quant.reservation_id or quant.reservation_id.origin_returned_move_id.id != move.id:
             qty += quant.qty
     qty = uom_obj._compute_qty(cr, uid, move.product_id.uom_id.id, qty, move.product_uom.id)
     quantity = qty
#         quantity = move.product_uom_qty
     # set UoS if it's a sale and the picking doesn't have one
     uos_id = move.product_uom.id
#         if move.product_uos:
#             uos_id = move.product_uos.id
#             quantity = move.product_uos_qty
#             
    ...