Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Store create method on variable?

By
Carlos Llamacho
on 9/17/13, 5:14 PM 660 views

I am baffled by a behaviour of OpenERP. I understand that the create method returns the id of the newly created record. So i tried to store said value in a variable for later use, but altough the variable is stored in i can see an increment in the id records, the new record is not created in the database. Is this normal?

new_menu_id = self.pool.get('ir.ui.menu').create(cr, uid, {'name':specie.name,  'parent_id':top_parent_id[0], 'icon':'STOCK_OPEN',  'sequence':1}, context=None)

I used a exception to see my value and returns me a integer correctly, but the new menu record is not created.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 9/17/13, 5:14 PM
Seen: 660 times
Last updated: 3/16/15, 8:10 AM