Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Odoo Technical Tips

86 views

Published on

We are going to discuss some technical features in Odoo

Published in: Business
  • Be the first to comment

  • Be the first to like this

Odoo Technical Tips

  1. 1. www.cybrosys.com ODOO TECHNICAL TIPS
  2. 2. Here, we are going to discuss some technical features in Odoo.
  3. 3. 1. How to make a menu visible for users? • To make a menu visible for the users other than the administrator, we have to use the group’s keyword. • On defining the menu we have to add groups along with it.
  4. 4. • If we define a menu like the above, the menu will be only visible for the administrator. • If the menu has to be visible for all the users, then we have to change the above menu definition as follows
  5. 5. • Where the “base.group_user” is the group name of the employees. • As we define the menu like this, the menu will be visible for all the users. • If the menu wants to show only for specific groups, such as Sales/manager,
  6. 6. 2. How to make a field visible in Debug mode only? To make a field visible only in debug mode, we have to add group attribute for the field
  7. 7. • Suppose the above field has to be visible only in the debug mode, then add groups=”base.group_no_one” to this field Then the field will be visible only in the debug mode
  8. 8. 3. How to Access current user and current DB in XML? To get the current user details in the XML, we can use the following user.id -> it will give the Id of the current user user.name -> it will give the name of current user user.groups_id -> this will return the groups in which user is a member To get the database name, we can use the following request.session.db -> this will return the DB name
  9. 9. 4. How to send Email via Python Code? Now let us check how can we send the e-mail from the python code,
  10. 10. • By using the code given we can send the email. • First of all, we have to access the mail. • Mail object, then set the subject, body, from and to. • The given code is based on V10.
  11. 11. 5. How to override an existing function? • How to override an existing function without affecting the original. • Suppose def get_val is a function in the model test.test, now we can look how to override this get_val function in the test.test model.
  12. 12. • By the given format, we can override an existing function. • By this, you can add new codes so that this will also get executed along with the original function execution
  13. 13. Refer this link for more: https://www.cybrosys.com/blog/odoo-technical-tips
  14. 14. Thank You ! Cybrosys Technologies Pvt. Ltd. Neospace, Kinfra Techno Park, Kakkancherry, Calicut University P.O. Calicut Kerala, India - 673635. Cybrosys Ltd 15, ST Antonys Road, Forest Gate, London England, E79QA. Cybrosys Technologies Pvt. Ltd. 1st Floor, Thapasya Building, Infopark, Kakkanad, Kochi, Kerala, India-682030.

×