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

How to set Configuration Values from Database for mandatory_billing_fields

By
Michael Karrer
on 3/18/15, 3:15 AM 438 views

In website_sale mandatory shipping and billing fields are directly set in the class website_sale in the file main.py.

I try to make this more useful and set this attributes by settings in the database.

The problem is that these attributes are directly set in the class - so not wrapped in a function. So no Database Cursor is available to fetch the values from this attributes(variables).

I tried to build my own Database Access with:

registry = RegistryManager.get(tools.config.options.get('db_name')) 

But this only gives me access to basic models like res.partner but not to models like website or product.product?!? Maybe they are not already loaded / build at that time?

So what would be the correct way to fetch the values for mandatory_billing_fields from the database model website where i wrote them to?!?

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: 3/18/15, 3:15 AM
Seen: 438 times
Last updated: 3/18/15, 3:15 AM