← Back to team overview

credativ team mailing list archive

[Merge] lp:~therp-nl/openupgrade-server/7.0-move_the_docs into lp:openupgrade-server

 

Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/openupgrade-server/7.0-move_the_docs into lp:openupgrade-server.

Commit message:
[UPD] Move public location to https://doc.therp.nl/openupgrade
[UPD] Update old references to 6.1
[IMP] Docstrings
[IMP] Load docstrings of 7.0 specific API
[UPD] Coverage 7.0
[IMP] Increase TOC depth so that coverages are directly linked from main
 page

Requested reviews:
  OpenUpgrade Committers (openupgrade-committers)

For more details, see:
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-move_the_docs/+merge/208775

I'm proposing to move the docs to our own hosted https://doc.therp.nl/openupgrade. We have set up a nightly build process, so the docs are guaranteed to keep updated.

Readthedocs.org is a nice service, but in order to use Autodoc you need to configure a virtualenv and it has only worked for a very short time before it breaks again. Due to the lack of debug info, the reason for that was always unclear. Apart from that, bzr support has now been broken for 7 months and the docs have not been updated during that time. I feel a bit bad about that last reason as I could probably have a look into that and try to fix the Readthedocs code, but it would not fix the first problem.

Apart from that, some general improvements in the docs.




-- 
https://code.launchpad.net/~therp-nl/openupgrade-server/7.0-move_the_docs/+merge/208775
Your team OpenUpgrade Committers is requested to review the proposed merge of lp:~therp-nl/openupgrade-server/7.0-move_the_docs into lp:openupgrade-server.
=== modified file 'openerp/openupgrade/doc/source/API.rst'
--- openerp/openupgrade/doc/source/API.rst	2012-11-24 22:22:00 +0000
+++ openerp/openupgrade/doc/source/API.rst	2014-02-28 11:33:24 +0000
@@ -1,22 +1,32 @@
 OpenUpgrade API
 +++++++++++++++
 
-You can use the following functions in your pre and post scripts.
-
-Note that the path to the OpenUpgrade support library is different
-in OpenERP 6 and OpenERP 6.1. For migration scripts that cover a
-migration to OpenERP 6, please do support both paths using the
-following stanza. Doing so enables the user to use your migration
-script for migrating databases from OpenERP 5 to OpenERP 6.1 in one
-step, provided that a migration script to 6.1 exists as well.
-
-.. code-block:: python
-
-   try:
-        from openupgrade import openupgrade
-   except ImportError:
-        from openerp.openupgrade import openupgrade
+In OpenUpgrade you can use the following functions in your pre and
+post scripts. Use the following import from OpenUpgrade 6.1 on.
+
+.. code-block:: python
+
+   from openerp.openupgrade import openupgrade
+
+In OpenUpgrade 5.0 and 6.0, the import is slightly different.
+
+.. code-block:: python
+
+   from openupgrade import openupgrade
+
+General methods
+---------------
 
 .. automodule:: openupgrade
    :members:
 
+Methods for OpenUpgrade 7.0
+---------------------------
+
+The following specific methods for 7.0 are available. These have been
+developed to cover specific needs as per data model changes in that
+release.
+
+.. automodule:: openupgrade_70
+   :members:
+

=== modified file 'openerp/openupgrade/doc/source/conf.py'
--- openerp/openupgrade/doc/source/conf.py	2013-02-08 12:27:54 +0000
+++ openerp/openupgrade/doc/source/conf.py	2014-02-28 11:33:24 +0000
@@ -37,15 +37,15 @@
 
 # General substitutions.
 project = 'OpenUpgrade'
-copyright = '2012, The OpenUpgrade team'
+copyright = '2012-2014, The OpenUpgrade team'
 
 # The default replacements for |version| and |release|, also used in various
 # other places throughout the built documents.
 #
 # The short X.Y version.
-version = '6.1'
+version = '7.0'
 # The full version, including alpha/beta/rc tags.
-release = '6.1'
+release = '7.0'
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:

=== modified file 'openerp/openupgrade/doc/source/index.rst'
--- openerp/openupgrade/doc/source/index.rst	2013-11-12 20:53:56 +0000
+++ openerp/openupgrade/doc/source/index.rst	2014-02-28 11:33:24 +0000
@@ -10,7 +10,7 @@
 Contents:
 
 .. toctree::
-   :maxdepth: 2
+   :maxdepth: 3
 
    intro.rst   
    community.rst
@@ -19,7 +19,7 @@
    development.rst
    API.rst
 
-You should find the latest version of this documentation here: `<http://readthedocs.org/docs/openupgrade-server>`_
+You should find the latest version of this documentation here: `<https://doc.therp.nl/openupgrade>`_
 
 Indices and tables
 ==================

=== modified file 'openerp/openupgrade/doc/source/modules61-70.rst'
--- openerp/openupgrade/doc/source/modules61-70.rst	2013-11-12 18:05:02 +0000
+++ openerp/openupgrade/doc/source/modules61-70.rst	2014-02-28 11:33:24 +0000
@@ -22,7 +22,7 @@
 +-----------------------------------+-----------------------------------+
 |account_accountant                 | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
-|account_analytic_analysis          |                                   |
+|account_analytic_analysis          | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |account_analytic_default           | No change                         |
 +-----------------------------------+-----------------------------------+
@@ -32,7 +32,7 @@
 +-----------------------------------+-----------------------------------+
 |account_asset                      |                                   |
 +-----------------------------------+-----------------------------------+
-|account_bank_statement_extensions  |                                   |
+|account_bank_statement_extensions  | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |account_budget                     |                                   |
 +-----------------------------------+-----------------------------------+
@@ -44,11 +44,11 @@
 +-----------------------------------+-----------------------------------+
 |account_followup                   |                                   |
 +-----------------------------------+-----------------------------------+
-|account_payment                    |                                   |
+|account_payment                    | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |account_sequence                   |                                   |
 +-----------------------------------+-----------------------------------+
-|account_test                       |                                   |
+|account_test                       | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |account_voucher                    | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
@@ -66,7 +66,7 @@
 +-----------------------------------+-----------------------------------+
 |auth_crypt                         |                                   |
 +-----------------------------------+-----------------------------------+
-|auth_ldap                          |                                   |
+|auth_ldap                          | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |auth_oauth                         |                                   |
 +-----------------------------------+-----------------------------------+
@@ -88,17 +88,17 @@
 +-----------------------------------+-----------------------------------+
 |base_report_designer               | No change                         |
 +-----------------------------------+-----------------------------------+
-|base_setup                         |                                   |
+|base_setup                         | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |base_status                        | No change                         |
 +-----------------------------------+-----------------------------------+
 |base_vat                           | No change                         |
 +-----------------------------------+-----------------------------------+
-|board                              |                                   |
+|board                              | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |claim_from_delivery                |                                   |
 +-----------------------------------+-----------------------------------+
-|contacts                           |                                   |
+|contacts                           | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |crm                                | work in progress                  |
 +-----------------------------------+-----------------------------------+
@@ -124,7 +124,7 @@
 +-----------------------------------+-----------------------------------+
 |document_webdav                    | No change                         |
 +-----------------------------------+-----------------------------------+
-|edi                                |                                   |
+|edi                                | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |email_template                     | Done                              |
 +-----------------------------------+-----------------------------------+
@@ -144,7 +144,7 @@
 +-----------------------------------+-----------------------------------+
 |hr                                 | Done                              |
 +-----------------------------------+-----------------------------------+
-|hr_attendance                      |                                   |
+|hr_attendance                      | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |hr_contract                        | No change                         |
 +-----------------------------------+-----------------------------------+
@@ -160,11 +160,11 @@
 +-----------------------------------+-----------------------------------+
 |hr_recruitment                     |                                   |
 +-----------------------------------+-----------------------------------+
-|hr_timesheet                       |                                   |
+|hr_timesheet                       | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |hr_timesheet_invoice               |                                   |
 +-----------------------------------+-----------------------------------+
-|hr_timesheet_sheet                 |                                   |
+|hr_timesheet_sheet                 | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |idea                               |                                   |
 +-----------------------------------+-----------------------------------+
@@ -236,7 +236,7 @@
 +-----------------------------------+-----------------------------------+
 |l10n_mx                            |                                   |
 +-----------------------------------+-----------------------------------+
-|l10n_nl                            |                                   |
+|l10n_nl                            | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |l10n_pa                            |                                   |
 +-----------------------------------+-----------------------------------+
@@ -268,7 +268,7 @@
 +-----------------------------------+-----------------------------------+
 |mail                               | Done                              |
 +-----------------------------------+-----------------------------------+
-|marketing                          |                                   |
+|marketing                          | Nothing to do                     |
 +-----------------------------------+-----------------------------------+
 |marketing_campaign                 |                                   |
 +-----------------------------------+-----------------------------------+
@@ -276,7 +276,7 @@
 +-----------------------------------+-----------------------------------+
 |membership                         |                                   |
 +-----------------------------------+-----------------------------------+
-|mrp                                | work in progress                  |
+|mrp                                | Done                              |
 +-----------------------------------+-----------------------------------+
 |mrp_byproduct                      |                                   |
 +-----------------------------------+-----------------------------------+
@@ -352,7 +352,7 @@
 +-----------------------------------+-----------------------------------+
 |project_timesheet                  |                                   |
 +-----------------------------------+-----------------------------------+
-|purchase                           | work in progress                  |
+|purchase                           | Done                              |
 +-----------------------------------+-----------------------------------+
 |purchase_analytic_plans            |                                   |
 +-----------------------------------+-----------------------------------+
@@ -366,7 +366,7 @@
 +-----------------------------------+-----------------------------------+
 |resource                           | No change                         |
 +-----------------------------------+-----------------------------------+
-|sale                               | work in progress                  |
+|sale                               | Done                              |
 +-----------------------------------+-----------------------------------+
 |sale_analytic_plans                |                                   |
 +-----------------------------------+-----------------------------------+
@@ -376,11 +376,11 @@
 +-----------------------------------+-----------------------------------+
 |sale_margin                        |                                   |
 +-----------------------------------+-----------------------------------+
-|sale_mrp                           |                                   |
+|sale_mrp                           | No change                         |
 +-----------------------------------+-----------------------------------+
 |sale_order_dates                   | No change                         |
 +-----------------------------------+-----------------------------------+
-|sale_stock                         |                                   |
+|sale_stock                         | Done                              |
 +-----------------------------------+-----------------------------------+
 |share                              |                                   |
 +-----------------------------------+-----------------------------------+
@@ -402,7 +402,7 @@
 +-----------------------------------+-----------------------------------+
 |web_analytics                      | No change                         |
 +-----------------------------------+-----------------------------------+
-|web_linkedin                       |                                   |
+|web_linkedin                       | Nothing to do (new in 7.0)        |
 +-----------------------------------+-----------------------------------+
 |web_shortcuts                      | No change                         |
 +-----------------------------------+-----------------------------------+

=== modified file 'openerp/openupgrade/openupgrade.py'
--- openerp/openupgrade/openupgrade.py	2013-10-28 21:25:32 +0000
+++ openerp/openupgrade/openupgrade.py	2014-02-28 11:33:24 +0000
@@ -37,18 +37,20 @@
     'load_data',
     'rename_columns',
     'rename_tables',
+    'rename_models',
+    'rename_xmlids',
     'drop_columns',
-    'table_exists',
-    'column_exists',
-    'logged_query',
     'delete_model_workflow',
+    'warn_possible_dataloss',
     'set_defaults',
+    'logged_query',
+    'column_exists',
+    'table_exists',
     'update_module_names',
     'add_ir_model_fields',
-    'rename_models',
-    'rename_xmlids',
     'get_legacy_name',
     'm2o_to_m2m',
+    'message',
 ]    
 
 def load_data(cr, module_name, filename, idref=None, mode='init'):
@@ -219,6 +221,8 @@
         'table' : name of the table where the field is.
         'field' : name of the field that are moving.
         'new_module' : name of the new module
+
+    .. versionadded:: 7.0
     """
     module_obj = pool.get('ir.module.module')
     for field in fields: 
@@ -316,6 +320,9 @@
                 write_value(ids, field, value)
     
 def logged_query(cr, query, args=None):
+    """
+    Logs query and affected rows at level DEBUG
+    """
     if args is None:
         args = []
     res = cr.execute(query, args)
@@ -392,6 +399,8 @@
     :param table: The source table
     :param field: The field name of the target model
     :param source_field: the many2one column on the source table.
+
+    .. versionadded:: 7.0
     """
     cr.execute('SELECT id, %(field)s '
                'FROM %(table)s '
@@ -409,9 +418,11 @@
     To be extended with logging to a table for reporting purposes.
 
     :param module: the module name that the message concerns
-    :param table: the model that this message concerns (may be False,
+    :param table: the model that this message concerns (may be False, \
     but preferably not if 'column' is defined)
     :param column: the column that this message concerns (may be False)
+
+    .. versionadded:: 7.0
     """
     argslist = list(args or [])
     prefix = ': '


Follow ups