Merge lp:~openerp-dev/openobject-addons/trunk-bug-876260-mdi into lp:openobject-addons

Proposed by DJ Patel (OpenERP)
Status: Merged
Merged at revision: 5672
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-876260-mdi
Merge into: lp:openobject-addons
Diff against target: 14 lines (+1/-4)
1 file modified
base_setup/base_setup.py (+1/-4)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-876260-mdi
Reviewer Review Type Date Requested Status
Aline (OpenERP) Needs Fixing
Review via email: mp+80182@code.launchpad.net

Description of the change

hello sir,

I have fix the issue of "install chart of account" and "install chart of account from a chart template" must be triggered automatically.

Thanks
Divyesh Makwana

To post a comment you must log in.
Revision history for this message
qdp (OpenERP) (qdp) wrote :

i didn't test but i feel like it's very weird to fix it that way. It means that the following code will never be reached:
314 if 'html' in context:
315 return {'type' : 'ir.actions.reload'}
316 else:
317 return {'type' : 'ir.actions.act_window_close'}

so i think that instead you should always return self.pool.get('res.config').next(cr, uid, [], context=context) at the end of that method, and in def _next() of server/trunk/openerp/addons/base/res/res_config.py, you need to treat the case where 'html' is given in the context or not.

stw, do you confirm?

Revision history for this message
qdp (OpenERP) (qdp) wrote :

in other words, i would do this:
=== modified file 'base_setup/base_setup.py'
--- base_setup/base_setup.py 2011-10-21 11:39:58 +0000
+++ base_setup/base_setup.py 2011-10-26 10:28:36 +0000
@@ -310,11 +310,8 @@
+ return self.pool.get('res.config').next(cr, uid, [], context=context)
- if 'html' in context:
- return {'type' : 'ir.actions.reload'}
- else:
- return {'type' : 'ir.actions.act_window_close'}

=== modified file 'openerp/addons/base/res/res_config.py'
--- openerp/addons/base/res/res_config.py 2011-10-02 11:51:31 +0000
+++ openerp/addons/base/res/res_config.py 2011-10-26 10:32:09 +0000
@@ -70,6 +70,8 @@
             res = next.action_launch(context=context)
             res['nodestroy'] = False
             return res
+ if 'html' in context:
+ return {'type' : 'ir.actions.reload'}
         return {'type' : 'ir.actions.act_window_close'}

Divyesh, can you test and if it's correct make new merge proposals on both server and addons?

thanks

Revision history for this message
Aline (OpenERP) (apr-tinyerp) wrote :

seems ok but the page is not reloaded if i install warehouse, don't know if it is due to this branch

review: Needs Fixing
Revision history for this message
DJ Patel (OpenERP) (mdi-openerp) wrote :

Hello Aline,

I check the issue, but it works fine.There are two merge proposal for this bug one for 'server'
and another for 'addons'.

I think you miss to check with both the branches.

Only one time the 'Chart of accounts' is triggered, the next time both the wizard are in 'done' state.

Thanks and Regards,

Divyesh Makwana

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_setup/base_setup.py'
2--- base_setup/base_setup.py 2011-10-21 11:39:58 +0000
3+++ base_setup/base_setup.py 2011-10-31 06:31:26 +0000
4@@ -311,10 +311,7 @@
5 cr.commit()
6 self.pool = pooler.restart_pool(cr.dbname, update_module=True)[1]
7
8- if 'html' in context:
9- return {'type' : 'ir.actions.reload'}
10- else:
11- return {'type' : 'ir.actions.act_window_close'}
12+ return self.pool.get('res.config').next(cr, uid, [], context=context)
13
14 #Migrate data from another application Conf wiz
15

Subscribers

People subscribed via source and target branches

to all changes: