1. 16 Nov, 2017 1 commit
  2. 06 Nov, 2017 1 commit
  3. 05 Nov, 2017 1 commit
    • Pedro M. Baeza's avatar
      [ADD] rename_fields: New method for renaming completely fields · 954121e0
      Pedro M. Baeza authored
      This, in contrast of ``rename_columns``, performs all the steps for
      completely rename a field from one name to another. This is needed for
      making a complete renaming of a field with all their side features:
      translations, filters, exports...
      
      Call this method whenever you are not performing a pure SQL column renaming
      for other purposes (preserve a value for example).
      
      This method performs also the SQL column renaming, so only one call is
      needed.
      954121e0
  4. 30 Oct, 2017 1 commit
  5. 10 Oct, 2017 1 commit
  6. 07 Oct, 2017 2 commits
  7. 06 Oct, 2017 2 commits
  8. 05 Oct, 2017 4 commits
  9. 03 Oct, 2017 1 commit
  10. 01 Aug, 2017 3 commits
  11. 04 Jul, 2017 1 commit
  12. 04 Jun, 2017 2 commits
  13. 24 May, 2017 1 commit
  14. 23 May, 2017 1 commit
  15. 01 May, 2017 1 commit
  16. 15 Apr, 2017 1 commit
  17. 14 Apr, 2017 1 commit
  18. 13 Apr, 2017 3 commits
  19. 23 Jan, 2017 2 commits
  20. 21 Jan, 2017 1 commit
    • Pedro M. Baeza's avatar
      [ADD] convert_binary_field_to_attachment · d7fa29b6
      Pedro M. Baeza authored
      This method converts the 8.0 binary fields to attachments like Odoo 9.0
      makes with the new attachment=True attribute. It has to be called on
      post-migration script, as there's a call to get the res_name of the
      target model, which is not yet loaded on pre-migration.
      
      You need to rename the involved column in pre-migration script if you
      don't want to lose your data in the process.
      
      This method also removes after the conversion the source column for
      avoiding data duplication.
      
      This is done through Odoo ORM, because there's a lot of logic associated
      with guessing MIME type, format and length, file saving in store...
      that is doesn't worth to recreate it via SQL as there's not too much
      performance problem.
      
      :param env: Odoo environment
      :param field_spec: A dictionary with the ORM model name as key, and as
          dictionary values a tuple with:
              * field name to be converted as attachment as first element.
              * SQL column name that contains actual data as second element. If
                the second element is None, then the column name is taken
                calling `get_legacy_name` method, which is the typical technique.
      
      * field name to be converted as attachment as first element.
      * SQL column name that contains actual data as second element. If
        the second element is None, then the column name is taken
        calling `get_legacy_name` method.
      d7fa29b6
  21. 10 Jan, 2017 1 commit
    • Pedro M. Baeza's avatar
      [FIX] update_module_names: Rename non updated XML-ID occurences · c049180a
      Pedro M. Baeza authored
      Leaving untouched the non update ir.model.data entries, there are
      problems loading the database when the migration ends, as some
      of the related records can be assets, views...
      
      Renaming the entries to an unique name (generated from ID), we
      assure Odoo's update process removed them when updating the target
      module. If we would remove it them instead, we will need to remove
      manually the related resources as well, so this is the best
      strategy.
      c049180a
  22. 29 Dec, 2016 1 commit
  23. 27 Dec, 2016 5 commits
  24. 02 Dec, 2016 1 commit
  25. 07 Nov, 2016 1 commit