1
我想知道是否有一个解决方案发票只是交付的数量(交付的数量 - 返回的数量)在odoo 或我必须编码?有没有解决发票交货数量的问题?
我想知道是否有一个解决方案发票只是交付的数量(交付的数量 - 返回的数量)在odoo 或我必须编码?有没有解决发票交货数量的问题?
继承_get_invoice_line_vals模块中stock_move的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
#
...
据我所知,没有任何选项可以发送交付的数量。 您必须为该选项编写代码。