Odoo Ayuda

0

0
2 Answers
2
Avatar

Axel Mendoza

--Axel Mendoza--
13543
| 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/9/15 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'
    @http.httprequest
    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

Realizar una pregunta
Keep Informed
2 seguidor(es)
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.

Register