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

About new / old API, ORM / OSV in res_config

By
Lucas Huber
on 8/27/15, 4:48 AM 621 views

I'm on refactoring an existing app for Odoo 8. Even after reading some docs and previous posts I don't really understand how the model for configuration works works. I mean it works but I can't figure out how?

A see that there are two different ways to use res_config for a configuration model for an new app:

The old style?

class xyz_config_setting(osv.osv_memory):
""" Setting days before to email alert """

_name = 'xyz.config.setting'
_inherit = 'res.config.settings'

New style?

 import logging
from openerp.osv import orm
 class ExchangeConfigSettings(orm.Model):

_name = 'exchange.config.settings'
_description = 'Exchange configuration'

_inherit = 'res.config.settings'
  1. What is in the second example appears I don't understand:  from openerp.osv import orm. Is this now ORM or OSV?

  2. What about res_config in Odoo V9?

  3. How ORM relates to new API. Is the API a part of ORM or can considered as equivalent? 

  4. What are the benefits of using the class res_config and not just the new API (models.Model)? 

Would be glad to understand a bit better.

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)

Stats

Asked: 8/27/15, 4:48 AM
Seen: 621 times
Last updated: 8/27/15, 4:48 AM