Advertisement
rht_odoo

[QW][5686] Ready Date Time

Jul 3rd, 2024 (edited)
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. # Written by SAIN and RHT on the 03/07/2024
  2.  
  3. # Reviewed by MGR on the 05/07/2024
  4.  
  5. # Review: https://pastebin.com/CduXma8N
  6.  
  7. # Need: Get the date time when the stock is ready to be transferred (useful especially in a multi steps WH).
  8.  
  9. # Task: https://www.odoo.com/odoo/project/5686/tasks/4031858?cids=1
  10.  
  11. for transfer in self:
  12.  
  13.     if transfer.state in ('assigned') and not transfer.x_ready_date_time:
  14.  
  15.         transfer['x_ready_date_time'] = datetime.datetime.now()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement