Hello,
The store keyword used to enhance the performance; since the functional field will be computed each time it'll be visible to the user.
without the store keyword [store=False], the functional field will not be stored in the database [e.g you can just access it by a browse record].
If you use store=True [the default is False]; your functional field will be stored in the DB and will be calculated for just one time.
- To tell the server when to recompute this filed you'll use a dictionary as
store={'model_name': (trigger_ids, [trigger_fields], priority), ...}
as in your example:
'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line'], 10),
the means: the field amount_untaxed will be recomputed whenever there is a changes in the 'order_line' field of the sale.order and
'sale.order.line': (_get_order, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
To recompute the field whenever there is a changes in the fields: 'price_unit', 'tax_id', 'discount', 'product_uom_qty' of the sale.order.line ...
the _get_order function: will return the [id] of parent sale order of the sale.order.line
For your question, I think you need to update the line as:
'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line', 'global_discount'], 10),
I hope this could helps ...