Odoo Aide


4 Answers

Axel Mendoza

--Axel Mendoza--
| 8 8 10
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
22/09/2015 12:03

Hi @Gustavo Seluja

Normally you need to work with authenticated sessions on your methods in a controller. If that is the case you could get the db_name from the OpenERPSession object like:

db_name = request.session._db

If you are not working with an authenticated session you could always get the db_name as a parameter in your method definition like:

class firmaController(http.Controller): 
    _cp_path = '/x_firma'
    def index(self, request, db=None, **post):

Using the former your url need to add an ?db=db_name as a querystring

Hope this solve your problem

Akira Chen
13/07/2019 18:45

How do I use C# to call the function?

def index(self, request, **post): 
Poser une question
Keep Informed
3 Abonné(e)s
About This Community

This platform 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.

Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now