Advertisement
rht_odoo

[QW][3790350]Purchase price on SOL

Apr 11th, 2024
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. #Done by RHT on the xx/03/2024
  2. #Reviewed by ROS on the 15/03/2024
  3. #Review:
  4. #911: https://www.odoo.com/web#id=3790350&cids=1&model=project.task&view_type=form
  5. for sol in self:
  6.     purchase_order_ids = sol.order_id._get_purchase_orders()
  7.     purchase_line_ids = purchase_order_ids.order_line.filtered(lambda pol, current_sol = sol: pol.state != 'cancel' and pol.product_id.id == current_sol.product_id.id)
  8.     sol['x_studio_purchase_price'] = purchase_line_ids[:1].price_unit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement