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

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 4645
Proposed branch: lp:~therp-nl/openupgrade-server/7.0-move_the_docs
Merge into: lp:openupgrade-server
Diff against target: 333 lines (+67/-46)
5 files modified
openerp/openupgrade/doc/source/API.rst (+25/-15)
openerp/openupgrade/doc/source/conf.py (+3/-3)
openerp/openupgrade/doc/source/index.rst (+2/-2)
openerp/openupgrade/doc/source/modules61-70.rst (+20/-20)
openerp/openupgrade/openupgrade.py (+17/-6)
To merge this branch: bzr merge lp:~therp-nl/openupgrade-server/7.0-move_the_docs
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Approve
Review via email: mp+208775@code.launchpad.net

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

Description of the change

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[1] 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.

[1] https://github.com/rtfd/readthedocs.org/issues/435#issuecomment-22916939

To post a comment you must log in.
Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

Thanks !

LGTM.

Regards.

review: Approve (code review, no test)
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
1OpenUpgrade API1OpenUpgrade API
2+++++++++++++++2+++++++++++++++
33
4You can use the following functions in your pre and post scripts.4In OpenUpgrade you can use the following functions in your pre and
55post scripts. Use the following import from OpenUpgrade 6.1 on.
6Note that the path to the OpenUpgrade support library is different6
7in OpenERP 6 and OpenERP 6.1. For migration scripts that cover a7.. code-block:: python
8migration to OpenERP 6, please do support both paths using the8
9following stanza. Doing so enables the user to use your migration9 from openerp.openupgrade import openupgrade
10script for migrating databases from OpenERP 5 to OpenERP 6.1 in one10
11step, provided that a migration script to 6.1 exists as well.11In OpenUpgrade 5.0 and 6.0, the import is slightly different.
1212
13.. code-block:: python13.. code-block:: python
1414
15 try:15 from openupgrade import openupgrade
16 from openupgrade import openupgrade16
17 except ImportError:17General methods
18 from openerp.openupgrade import openupgrade18---------------
1919
20.. automodule:: openupgrade20.. automodule:: openupgrade
21 :members:21 :members:
2222
23Methods for OpenUpgrade 7.0
24---------------------------
25
26The following specific methods for 7.0 are available. These have been
27developed to cover specific needs as per data model changes in that
28release.
29
30.. automodule:: openupgrade_70
31 :members:
32
2333
=== 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 @@
3737
38# General substitutions.38# General substitutions.
39project = 'OpenUpgrade'39project = 'OpenUpgrade'
40copyright = '2012, The OpenUpgrade team'40copyright = '2012-2014, The OpenUpgrade team'
4141
42# The default replacements for |version| and |release|, also used in various42# The default replacements for |version| and |release|, also used in various
43# other places throughout the built documents.43# other places throughout the built documents.
44#44#
45# The short X.Y version.45# The short X.Y version.
46version = '6.1'46version = '7.0'
47# The full version, including alpha/beta/rc tags.47# The full version, including alpha/beta/rc tags.
48release = '6.1'48release = '7.0'
4949
50# There are two options for replacing |today|: either, you set today to some50# There are two options for replacing |today|: either, you set today to some
51# non-false value, then it is used:51# non-false value, then it is used:
5252
=== 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 @@
10Contents:10Contents:
1111
12.. toctree::12.. toctree::
13 :maxdepth: 213 :maxdepth: 3
1414
15 intro.rst 15 intro.rst
16 community.rst16 community.rst
@@ -19,7 +19,7 @@
19 development.rst19 development.rst
20 API.rst20 API.rst
2121
22You should find the latest version of this documentation here: `<http://readthedocs.org/docs/openupgrade-server>`_22You should find the latest version of this documentation here: `<https://doc.therp.nl/openupgrade>`_
2323
24Indices and tables24Indices and tables
25==================25==================
2626
=== 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 @@
22+-----------------------------------+-----------------------------------+22+-----------------------------------+-----------------------------------+
23|account_accountant | Nothing to do |23|account_accountant | Nothing to do |
24+-----------------------------------+-----------------------------------+24+-----------------------------------+-----------------------------------+
25|account_analytic_analysis | |25|account_analytic_analysis | Nothing to do |
26+-----------------------------------+-----------------------------------+26+-----------------------------------+-----------------------------------+
27|account_analytic_default | No change |27|account_analytic_default | No change |
28+-----------------------------------+-----------------------------------+28+-----------------------------------+-----------------------------------+
@@ -32,7 +32,7 @@
32+-----------------------------------+-----------------------------------+32+-----------------------------------+-----------------------------------+
33|account_asset | |33|account_asset | |
34+-----------------------------------+-----------------------------------+34+-----------------------------------+-----------------------------------+
35|account_bank_statement_extensions | |35|account_bank_statement_extensions | Nothing to do |
36+-----------------------------------+-----------------------------------+36+-----------------------------------+-----------------------------------+
37|account_budget | |37|account_budget | |
38+-----------------------------------+-----------------------------------+38+-----------------------------------+-----------------------------------+
@@ -44,11 +44,11 @@
44+-----------------------------------+-----------------------------------+44+-----------------------------------+-----------------------------------+
45|account_followup | |45|account_followup | |
46+-----------------------------------+-----------------------------------+46+-----------------------------------+-----------------------------------+
47|account_payment | |47|account_payment | Nothing to do |
48+-----------------------------------+-----------------------------------+48+-----------------------------------+-----------------------------------+
49|account_sequence | |49|account_sequence | |
50+-----------------------------------+-----------------------------------+50+-----------------------------------+-----------------------------------+
51|account_test | |51|account_test | Nothing to do |
52+-----------------------------------+-----------------------------------+52+-----------------------------------+-----------------------------------+
53|account_voucher | Nothing to do |53|account_voucher | Nothing to do |
54+-----------------------------------+-----------------------------------+54+-----------------------------------+-----------------------------------+
@@ -66,7 +66,7 @@
66+-----------------------------------+-----------------------------------+66+-----------------------------------+-----------------------------------+
67|auth_crypt | |67|auth_crypt | |
68+-----------------------------------+-----------------------------------+68+-----------------------------------+-----------------------------------+
69|auth_ldap | |69|auth_ldap | Nothing to do |
70+-----------------------------------+-----------------------------------+70+-----------------------------------+-----------------------------------+
71|auth_oauth | |71|auth_oauth | |
72+-----------------------------------+-----------------------------------+72+-----------------------------------+-----------------------------------+
@@ -88,17 +88,17 @@
88+-----------------------------------+-----------------------------------+88+-----------------------------------+-----------------------------------+
89|base_report_designer | No change |89|base_report_designer | No change |
90+-----------------------------------+-----------------------------------+90+-----------------------------------+-----------------------------------+
91|base_setup | |91|base_setup | Nothing to do |
92+-----------------------------------+-----------------------------------+92+-----------------------------------+-----------------------------------+
93|base_status | No change |93|base_status | No change |
94+-----------------------------------+-----------------------------------+94+-----------------------------------+-----------------------------------+
95|base_vat | No change |95|base_vat | No change |
96+-----------------------------------+-----------------------------------+96+-----------------------------------+-----------------------------------+
97|board | |97|board | Nothing to do |
98+-----------------------------------+-----------------------------------+98+-----------------------------------+-----------------------------------+
99|claim_from_delivery | |99|claim_from_delivery | |
100+-----------------------------------+-----------------------------------+100+-----------------------------------+-----------------------------------+
101|contacts | |101|contacts | Nothing to do |
102+-----------------------------------+-----------------------------------+102+-----------------------------------+-----------------------------------+
103|crm | work in progress |103|crm | work in progress |
104+-----------------------------------+-----------------------------------+104+-----------------------------------+-----------------------------------+
@@ -124,7 +124,7 @@
124+-----------------------------------+-----------------------------------+124+-----------------------------------+-----------------------------------+
125|document_webdav | No change |125|document_webdav | No change |
126+-----------------------------------+-----------------------------------+126+-----------------------------------+-----------------------------------+
127|edi | |127|edi | Nothing to do |
128+-----------------------------------+-----------------------------------+128+-----------------------------------+-----------------------------------+
129|email_template | Done |129|email_template | Done |
130+-----------------------------------+-----------------------------------+130+-----------------------------------+-----------------------------------+
@@ -144,7 +144,7 @@
144+-----------------------------------+-----------------------------------+144+-----------------------------------+-----------------------------------+
145|hr | Done |145|hr | Done |
146+-----------------------------------+-----------------------------------+146+-----------------------------------+-----------------------------------+
147|hr_attendance | |147|hr_attendance | Nothing to do |
148+-----------------------------------+-----------------------------------+148+-----------------------------------+-----------------------------------+
149|hr_contract | No change |149|hr_contract | No change |
150+-----------------------------------+-----------------------------------+150+-----------------------------------+-----------------------------------+
@@ -160,11 +160,11 @@
160+-----------------------------------+-----------------------------------+160+-----------------------------------+-----------------------------------+
161|hr_recruitment | |161|hr_recruitment | |
162+-----------------------------------+-----------------------------------+162+-----------------------------------+-----------------------------------+
163|hr_timesheet | |163|hr_timesheet | Nothing to do |
164+-----------------------------------+-----------------------------------+164+-----------------------------------+-----------------------------------+
165|hr_timesheet_invoice | |165|hr_timesheet_invoice | |
166+-----------------------------------+-----------------------------------+166+-----------------------------------+-----------------------------------+
167|hr_timesheet_sheet | |167|hr_timesheet_sheet | Nothing to do |
168+-----------------------------------+-----------------------------------+168+-----------------------------------+-----------------------------------+
169|idea | |169|idea | |
170+-----------------------------------+-----------------------------------+170+-----------------------------------+-----------------------------------+
@@ -236,7 +236,7 @@
236+-----------------------------------+-----------------------------------+236+-----------------------------------+-----------------------------------+
237|l10n_mx | |237|l10n_mx | |
238+-----------------------------------+-----------------------------------+238+-----------------------------------+-----------------------------------+
239|l10n_nl | |239|l10n_nl | Nothing to do |
240+-----------------------------------+-----------------------------------+240+-----------------------------------+-----------------------------------+
241|l10n_pa | |241|l10n_pa | |
242+-----------------------------------+-----------------------------------+242+-----------------------------------+-----------------------------------+
@@ -268,7 +268,7 @@
268+-----------------------------------+-----------------------------------+268+-----------------------------------+-----------------------------------+
269|mail | Done |269|mail | Done |
270+-----------------------------------+-----------------------------------+270+-----------------------------------+-----------------------------------+
271|marketing | |271|marketing | Nothing to do |
272+-----------------------------------+-----------------------------------+272+-----------------------------------+-----------------------------------+
273|marketing_campaign | |273|marketing_campaign | |
274+-----------------------------------+-----------------------------------+274+-----------------------------------+-----------------------------------+
@@ -276,7 +276,7 @@
276+-----------------------------------+-----------------------------------+276+-----------------------------------+-----------------------------------+
277|membership | |277|membership | |
278+-----------------------------------+-----------------------------------+278+-----------------------------------+-----------------------------------+
279|mrp | work in progress |279|mrp | Done |
280+-----------------------------------+-----------------------------------+280+-----------------------------------+-----------------------------------+
281|mrp_byproduct | |281|mrp_byproduct | |
282+-----------------------------------+-----------------------------------+282+-----------------------------------+-----------------------------------+
@@ -352,7 +352,7 @@
352+-----------------------------------+-----------------------------------+352+-----------------------------------+-----------------------------------+
353|project_timesheet | |353|project_timesheet | |
354+-----------------------------------+-----------------------------------+354+-----------------------------------+-----------------------------------+
355|purchase | work in progress |355|purchase | Done |
356+-----------------------------------+-----------------------------------+356+-----------------------------------+-----------------------------------+
357|purchase_analytic_plans | |357|purchase_analytic_plans | |
358+-----------------------------------+-----------------------------------+358+-----------------------------------+-----------------------------------+
@@ -366,7 +366,7 @@
366+-----------------------------------+-----------------------------------+366+-----------------------------------+-----------------------------------+
367|resource | No change |367|resource | No change |
368+-----------------------------------+-----------------------------------+368+-----------------------------------+-----------------------------------+
369|sale | work in progress |369|sale | Done |
370+-----------------------------------+-----------------------------------+370+-----------------------------------+-----------------------------------+
371|sale_analytic_plans | |371|sale_analytic_plans | |
372+-----------------------------------+-----------------------------------+372+-----------------------------------+-----------------------------------+
@@ -376,11 +376,11 @@
376+-----------------------------------+-----------------------------------+376+-----------------------------------+-----------------------------------+
377|sale_margin | |377|sale_margin | |
378+-----------------------------------+-----------------------------------+378+-----------------------------------+-----------------------------------+
379|sale_mrp | |379|sale_mrp | No change |
380+-----------------------------------+-----------------------------------+380+-----------------------------------+-----------------------------------+
381|sale_order_dates | No change |381|sale_order_dates | No change |
382+-----------------------------------+-----------------------------------+382+-----------------------------------+-----------------------------------+
383|sale_stock | |383|sale_stock | Done |
384+-----------------------------------+-----------------------------------+384+-----------------------------------+-----------------------------------+
385|share | |385|share | |
386+-----------------------------------+-----------------------------------+386+-----------------------------------+-----------------------------------+
@@ -402,7 +402,7 @@
402+-----------------------------------+-----------------------------------+402+-----------------------------------+-----------------------------------+
403|web_analytics | No change |403|web_analytics | No change |
404+-----------------------------------+-----------------------------------+404+-----------------------------------+-----------------------------------+
405|web_linkedin | |405|web_linkedin | Nothing to do (new in 7.0) |
406+-----------------------------------+-----------------------------------+406+-----------------------------------+-----------------------------------+
407|web_shortcuts | No change |407|web_shortcuts | No change |
408+-----------------------------------+-----------------------------------+408+-----------------------------------+-----------------------------------+
409409
=== 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 @@
37 'load_data',37 'load_data',
38 'rename_columns',38 'rename_columns',
39 'rename_tables',39 'rename_tables',
40 'rename_models',
41 'rename_xmlids',
40 'drop_columns',42 'drop_columns',
41 'table_exists',
42 'column_exists',
43 'logged_query',
44 'delete_model_workflow',43 'delete_model_workflow',
44 'warn_possible_dataloss',
45 'set_defaults',45 'set_defaults',
46 'logged_query',
47 'column_exists',
48 'table_exists',
46 'update_module_names',49 'update_module_names',
47 'add_ir_model_fields',50 'add_ir_model_fields',
48 'rename_models',
49 'rename_xmlids',
50 'get_legacy_name',51 'get_legacy_name',
51 'm2o_to_m2m',52 'm2o_to_m2m',
53 'message',
52] 54]
5355
54def load_data(cr, module_name, filename, idref=None, mode='init'):56def load_data(cr, module_name, filename, idref=None, mode='init'):
@@ -219,6 +221,8 @@
219 'table' : name of the table where the field is.221 'table' : name of the table where the field is.
220 'field' : name of the field that are moving.222 'field' : name of the field that are moving.
221 'new_module' : name of the new module223 'new_module' : name of the new module
224
225 .. versionadded:: 7.0
222 """226 """
223 module_obj = pool.get('ir.module.module')227 module_obj = pool.get('ir.module.module')
224 for field in fields: 228 for field in fields:
@@ -316,6 +320,9 @@
316 write_value(ids, field, value)320 write_value(ids, field, value)
317 321
318def logged_query(cr, query, args=None):322def logged_query(cr, query, args=None):
323 """
324 Logs query and affected rows at level DEBUG
325 """
319 if args is None:326 if args is None:
320 args = []327 args = []
321 res = cr.execute(query, args)328 res = cr.execute(query, args)
@@ -392,6 +399,8 @@
392 :param table: The source table399 :param table: The source table
393 :param field: The field name of the target model400 :param field: The field name of the target model
394 :param source_field: the many2one column on the source table.401 :param source_field: the many2one column on the source table.
402
403 .. versionadded:: 7.0
395 """404 """
396 cr.execute('SELECT id, %(field)s '405 cr.execute('SELECT id, %(field)s '
397 'FROM %(table)s '406 'FROM %(table)s '
@@ -409,9 +418,11 @@
409 To be extended with logging to a table for reporting purposes.418 To be extended with logging to a table for reporting purposes.
410419
411 :param module: the module name that the message concerns420 :param module: the module name that the message concerns
412 :param table: the model that this message concerns (may be False,421 :param table: the model that this message concerns (may be False, \
413 but preferably not if 'column' is defined)422 but preferably not if 'column' is defined)
414 :param column: the column that this message concerns (may be False)423 :param column: the column that this message concerns (may be False)
424
425 .. versionadded:: 7.0
415 """426 """
416 argslist = list(args or [])427 argslist = list(args or [])
417 prefix = ': '428 prefix = ': '

Subscribers

People subscribed via source and target branches