Odoo Help


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.


Is possible to call function decorated with @api.one inside function decorated with @api.model ?

on 3/3/15, 3:55 AM 335 views


I make a function A decorated with @api.one and then i call this function inside function B decorated @api.model but i got empty list.

Is possible to do like that?

If i call function A inside function with same decorator i got list with the values (not empty). My collagues says that the function decorated with @api.model doesn't contain ID.

My question is how to pass the ID of the current model to make function decorated with @api.one works when executed from function decorated with @api.model?

Thank you.

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

1 follower(s)


Asked: 3/3/15, 3:55 AM
Seen: 335 times
Last updated: 3/16/15, 8:10 AM