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.

19 lines
552 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright (C) 2016-Today: La Louve (<http://www.lalouve.net/>)
  3. # @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  4. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. from openupgradelib import openupgrade
  6. BOOLEAN_TO_SELECTION = [
  7. ('false', 'no'),
  8. ('true', 'order'),
  9. ]
  10. @openupgrade.migrate()
  11. def migrate(cr, installed_version):
  12. openupgrade.map_values(
  13. cr, openupgrade.get_legacy_name('require_customer'),
  14. 'require_customer', BOOLEAN_TO_SELECTION, table='pos_config')