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 retrieve a value from a table

By
Selverine
on 5/5/13, 9:48 AM 720 views

Hi all,

I added a new field on the table "Sale_Order". On the file "sale.py" during the fonction "action_button_confirm", i would like to now the value of the field of the current Order.

Is it possible? How?

Thank you a lot!

Selverine

0

patrick

--patrick--
1958
| 5 4 7
Baarn, Netherlands
--patrick--
patrick
On 5/5/13, 5:45 PM

It is possible to get the value from the new field.

How to do it: make sure you have an object of sale_order. When using the browse method, you can use a dot (.) to access the value. Check the various .py files.

Example (from sale.py, in folder /addons/sale):

'currency_id': self.pool.get('product.pricelist').browse(cr, uid, pricelist_id, context=context).currency_id.id

This will store the value of the ID of the currency of the product.pricelist in the variable currency_id

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

0 follower(s)

Stats

Asked: 5/5/13, 9:48 AM
Seen: 720 times
Last updated: 3/16/15, 8:10 AM