コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
5011 ビュー

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

アバター
破棄
最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
1
3月 24
1887
1
2月 24
915
1
9月 23
1747
0
10月 22
1697
1
9月 20
3912