Advertisement
rht_odoo

[QW][3681868]po ref

Apr 24th, 2024 (edited)
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #Done by RHT and QCO on the 29/02/2024
  2. #Reviewed by ROS on the 14/03/2024
  3. #Review:https://pastebin.com/edit/NwVkW9Fw
  4. #911 Task: https://www.odoo.com/web#id=3681868&cids=1&model=project.task&view_type=form
  5. #Need: Have the PO information on the delivery (for SO/PO linked trough MTO)
  6. for move in self:
  7. if move.picking_id.picking_type_code == 'outgoing':
  8. po_list = move.picking_id.group_id.x_studio_purchase_orders.filtered(lambda po,mv=move: mv.product_id in po.order_line.product_id)
  9. move['x_studio_po_ref'] = ', '.join(po_list.mapped("name"))
  10. else:
  11. move['x_studio_po_ref'] = "/"
  12.  
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement