Merge lp:~openerp-dev/openobject-addons/trunk-bug-903474-kjo into lp:openobject-addons

Proposed by Kuldeep Joshi(OpenERP)
Status: Merged
Merged at revision: 6270
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-903474-kjo
Merge into: lp:openobject-addons
Diff against target: 41 lines (+9/-3)
2 files modified
portal/portal.py (+8/-2)
portal/portal_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-903474-kjo
Reviewer Review Type Date Requested Status
Thibault Delavallée (OpenERP) (community) Approve
Kuldeep Joshi(OpenERP) (community) Needs Resubmitting
Bhumika Shrimali (community) Needs Fixing
Review via email: mp+85837@code.launchpad.net

Description of the change

create record of ir_model_data and ir_value for new portal

To post a comment you must log in.
Revision history for this message
Bhumika Shrimali (sbh-openerp) wrote :

Hello,

When i click Create Menu , server side i get this warning
2011-12-19 05:30:30,266][?] WARNING:orm:No such field(s) in model ir.model.data: groups_id, parent_id.
[2011-12-19 05:30:30,269][?] WARNING:orm:No such field(s) in model ir.values: groups_id, noupdate, module, parent_id.

Thanks

review: Needs Fixing
Revision history for this message
Kuldeep Joshi(OpenERP) (kjo-openerp) wrote :

Hello Madam,

Change is done as per your suggestion

review: Needs Resubmitting
Revision history for this message
Thibault Delavallée (OpenERP) (tde-openerp) wrote :

Hello,

Thanks for your fix ! It has been merged into trunk.

Regards,

Thibault.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'portal/portal.py'
--- portal/portal.py 2011-11-22 08:51:38 +0000
+++ portal/portal.py 2011-12-20 10:37:54 +0000
@@ -98,8 +98,8 @@
98 def do_create_menu(self, cr, uid, ids, context=None):98 def do_create_menu(self, cr, uid, ids, context=None):
99 """ create a parent menu for the given portals """99 """ create a parent menu for the given portals """
100 menu_obj = self.pool.get('ir.ui.menu')100 menu_obj = self.pool.get('ir.ui.menu')
101 ir_data = self.pool.get('ir.model.data')
101 menu_root = self._res_xml_id(cr, uid, 'portal', 'portal_menu')102 menu_root = self._res_xml_id(cr, uid, 'portal', 'portal_menu')
102
103 for p in self.browse(cr, uid, ids, context):103 for p in self.browse(cr, uid, ids, context):
104 # create a menuitem under 'portal.portal_menu'104 # create a menuitem under 'portal.portal_menu'
105 menu_values = {105 menu_values = {
@@ -110,7 +110,13 @@
110 menu_id = menu_obj.create(cr, uid, menu_values, context)110 menu_id = menu_obj.create(cr, uid, menu_values, context)
111 # set the parent_menu_id to item_id111 # set the parent_menu_id to item_id
112 self.write(cr, uid, [p.id], {'parent_menu_id': menu_id}, context)112 self.write(cr, uid, [p.id], {'parent_menu_id': menu_id}, context)
113 113 menu_values.pop('parent_id')
114 menu_values.pop('groups_id')
115 menu_values.update({'model': 'ir.ui.menu',
116 'module': 'portal',
117 'res_id': menu_id,
118 'noupdate': 'True'})
119 data_id = ir_data.create(cr, uid, menu_values, context)
114 return True120 return True
115121
116 def _assign_menu(self, cr, uid, ids, context=None):122 def _assign_menu(self, cr, uid, ids, context=None):
117123
=== modified file 'portal/portal_view.xml'
--- portal/portal_view.xml 2011-08-02 13:50:30 +0000
+++ portal/portal_view.xml 2011-12-20 10:37:54 +0000
@@ -21,7 +21,7 @@
21 </record>21 </record>
22 <menuitem name="Portals" id="portal_list_menu"22 <menuitem name="Portals" id="portal_list_menu"
23 parent="portal_menu" sequence="1" action="portal_list_action"/>23 parent="portal_menu" sequence="1" action="portal_list_action"/>
2424
25 <!-- portal tree view -->25 <!-- portal tree view -->
26 <record id="portal_list_view" model="ir.ui.view">26 <record id="portal_list_view" model="ir.ui.view">
27 <field name="name">Portal List</field>27 <field name="name">Portal List</field>

Subscribers

People subscribed via source and target branches

to all changes: