I would like to understand when this field changes. It is part of sale.py model.
I have added a field "global discount" to sale.order model and I would like amount_untaxed to change when field "global discount" changes, what should I do?
'amount_untaxed': fields.function(_amount_all_wrapper,
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