Merge lp:~openerp-dev/openobject-addons/trunk-google_map_wizard-bde into lp:openobject-addons

Proposed by Bharat Devnani (Open ERP)
Status: Merged
Merged at revision: 5416
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-google_map_wizard-bde
Merge into: lp:openobject-addons
Diff against target: 41 lines (+37/-0)
1 file modified
google_map/wizard/google_map_launch_view.xml (+37/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-google_map_wizard-bde
Reviewer Review Type Date Requested Status
Bharat Devnani (Open ERP) (community) Needs Resubmitting
tfr (Openerp) (community) Needs Fixing
Mustufa Rangwala (Open ERP) (community) Approve
Vo Minh Thu Pending
Review via email: mp+73215@code.launchpad.net

Description of the change

Hello Sir,

I have converted wizards from wizard.interface to osv.osv_memory for trunk-google_map_wizard.

Thanks & Regards,
Devnani Bharat R.

To post a comment you must log in.
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Bharat,

When you propose patch for some fixes, you should first check it with new database.
Here i can not install google_map module (due to sequence of loading of xml files!!)

I suggest few improvements/fixes too:
1. _launch_wizard => Do not change method name in your memory class keep old name
2. <field name="view_mode">tree,form,calendar,graph</field> => why cal and graph ?
3. + url=''
   + url="http://maps.google.com/maps?oi=map&q=" => We should merge these two lines.

Hope you will keep this suggestion in your mind for future fixes.

Thanks,
Mustufa

review: Needs Fixing
Revision history for this message
Bharat Devnani (Open ERP) (bde-openerp) wrote :

Hello Sir,

I have made the possible changes which you have suggested,

1) Arranged the sequence of files in __openerp__.py (Now new DB Can be created)
2) I have kept the function name launch_wizard as it is, becuase if i precede the function name with _. it will not allow to access resources remotely.
3) I have made <field name="view_mode"> to only form.
4) And optimized the code with reference to "url" variable.

Thanks & Regards,
Devnani Bharat R.

review: Needs Resubmitting
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Thanks for work,
Mustufa

review: Approve
Revision history for this message
tfr (Openerp) (tfr) wrote :

Missing file

Server Traceback (most recent call last):
  File "/home/openerp/source/web/openerp-web/addons/web/common/openerplib/main.py", line 245, in send
    result = openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/home/openerp/source/server/trunk/openerp/netsvc.py", line 325, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/openerp/source/server/trunk/openerp/service/web_services.py", line 580, in dispatch
    res = fn(db, uid, *params)
  File "/home/openerp/source/server/trunk/openerp/osv/osv.py", line 120, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openerp/source/server/trunk/openerp/osv/osv.py", line 172, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/openerp/source/server/trunk/openerp/osv/osv.py", line 163, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/openerp/source/server/trunk/openerp/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/home/openerp/source/server/trunk/openerp/pooler.py", line 39, in restart_pool
    registry = RegistryManager.new(db_name, force_demo, status, update_module, True)
  File "/home/openerp/source/server/trunk/openerp/modules/registry.py", line 160, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/home/openerp/source/server/trunk/openerp/modules/loading.py", line 336, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules)
  File "/home/openerp/source/server/trunk/openerp/modules/loading.py", line 251, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules)
  File "/home/openerp/source/server/trunk/openerp/modules/loading.py", line 190, in load_module_graph
    load_update_xml(module_name, idref, mode)
  File "/home/openerp/source/server/trunk/openerp/modules/loading.py", line 91, in <lambda>
    load_update_xml = lambda *args: _load_data(cr, *args, kind='update_xml')
  File "/home/openerp/source/server/trunk/openerp/modules/loading.py", line 123, in _load_data
    fp = tools.file_open(pathname)
  File "/home/openerp/source/server/trunk/openerp/tools/misc.py", line 216, in file_open
    raise IOError, 'File not found : %s' % name
IOError: File not found : /home/openerp/source/server/trunk/openerp/addons/google_map/wizard/google_map_launch_view.xml

review: Needs Fixing
Revision history for this message
Bharat Devnani (Open ERP) (bde-openerp) wrote :

Hello tfr,

Thanks for your time. the above traceback is solved now, as i have again added the google_map_launch_view.xml.

Thanks & Regards,
Devnani Bharat R.

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'google_map/wizard/google_map_launch_view.xml'
2--- google_map/wizard/google_map_launch_view.xml 1970-01-01 00:00:00 +0000
3+++ google_map/wizard/google_map_launch_view.xml 2011-10-19 11:44:26 +0000
4@@ -0,0 +1,37 @@
5+<?xml version="1.0" encoding="utf-8"?>
6+<openerp>
7+ <data>
8+ <record id="view_google_map_launch_form" model="ir.ui.view">
9+ <field name="name">launch.map.form</field>
10+ <field name="model">launch.map</field>
11+ <field name="type">form</field>
12+ <field name="arch" type="xml">
13+ <form string="Launch Map">
14+ <separator string="This wizard will launch google map" colspan="4"/>
15+ <group colspan="4" col="2">
16+ <button string="Cancel" icon="gtk-cancel" special="cancel"/>
17+ <button name="launch_wizard" string="Map" type="object" icon="gtk-zoom-in"/>
18+ </group>
19+ </form>
20+ </field>
21+ </record>
22+
23+ <record id="action_google_map_launch_form" model="ir.actions.act_window">
24+ <field name="name">Google Map</field>
25+ <field name="res_model">launch.map</field>
26+ <field name="view_type">form</field>
27+ <field name="view_mode">form</field>
28+ <field name="target">new</field>
29+ <field name="view_id" ref="view_google_map_launch_form"/>
30+ </record>
31+
32+ <act_window
33+ name="Launch Google Map"
34+ id="act_google_map_launch_form"
35+ res_model="launch.map"
36+ src_model="res.partner.address"
37+ view_mode="form"
38+ target="new"
39+ key2="client_action_multi"/>
40+ </data>
41+</openerp>

Subscribers

People subscribed via source and target branches

to all changes: