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.

14 lines
536 B

6 years ago
6 years ago
  1. def store_ir_config_param(cr):
  2. """Prior to version 12.0 the default order of partner
  3. names was last_first. In order to retain this behaviour we
  4. store the config parameter if it is not present.
  5. """
  6. cr.execute("SELECT 1 FROM ir_config_parameter "
  7. "WHERE key = 'partner_names_order'")
  8. if not cr.fetchone():
  9. cr.execute("INSERT INTO ir_config_parameter (key, value) VALUES "
  10. "('partner_names_order', 'last_first')")
  11. def migrate(cr, version):
  12. store_ir_config_param(cr)