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

set track_visibility onchange for filed function

By
Yao
on 2/14/14, 5:18 AM 1,627 views

I wrote a new column, fileds.function and tried to set the track_visibility to onchange, but it does not work.

I noticed that in the existing field "amount_untaxted" from sale.order works fine with track_visibility="always". But when I tried to override the filed and change the track_visibility='onchange', it does not work any more.

please advise.

    'amount_untaxed': fields.function(_amount_all, digits_compute=dp.get_precision('Account'), string='Untaxed Amount',
        store={
            'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
            'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
        },
        multi='sums', help="The amount without tax.", track_visibility='always'),

Thanks very much in advance.

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

2 follower(s)

Stats

Asked: 2/14/14, 5:18 AM
Seen: 1627 times
Last updated: 3/16/15, 8:10 AM