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

What are your best practices to debug code or find a variable usage

By
smorele
on 12/4/15, 3:34 AM 337 views

Hello,

i'm facing a new problem. I'm new to Odoo and as a python developper I'm able to debug app when it crashes but unfortunately it's a little hard to find some variable usage. In example, I'd like to understand what's the aim of the variable group_partner_manager

Do you have clues to help me how to find this informations ? Do you always go to the code to find the usage or is there an hidden documentation ? I need some help from advanced users.

Thanks a lot.

0

Axel Mendoza

--Axel Mendoza--
10205
| 7 7 8
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 an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 12/5/15, 3:24 AM

Hi @smorele

Good to know that you are asking for how to know more about Odoo internals.

You need to find what is what you are looking for, in your case it's not a variable, it's a group name declared in an xml file as:

        <record model="res.groups" id="group_partner_manager">
<field name="name">Contact Creation</field>
</record>

Defined on addons/base/res/res_security.xml file, so basically you will find the usage in the source code files and have often to search for .xml, .py, and .js files to get the usage of a variable or a behavior, .js files will be the last resource but there are stuffs that you will only found there. There are other files extensions on Odoo but normally will not give you results of variable usage like: .po for translations, .rml old report format, .css styles, and I could figure out any other relevant.

After you get more familiar with Odoo you will learn how to find where you will get more chances to get a good search result. but always try to filter the results to only one file extension because if not you will get to much usage and will be a mess to follow the thread. Normally you apply a search on the addons/ folder but that will exclude Odoo core files like models and fields and it will be ok to search for modules fields and methods examples or code usage

Hope this help you a little

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

2 follower(s)

Stats

Asked: 12/4/15, 3:34 AM
Seen: 337 times
Last updated: 12/5/15, 3:24 AM