You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
280 B

  1. # coding: utf-8
  2. def migrate(cr, version):
  3. """Set the new supervisor_id field if this one is empty."""
  4. cr.execute(
  5. """
  6. UPDATE purchase_order
  7. SET supervisor_id = create_uid
  8. WHERE supervisor_id IS NULL OR supervisor_id = 1
  9. """
  10. )