diff options
| author | Denis Ledoux <dle@odoo.com> | 2015-06-30 12:52:11 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2015-06-30 13:12:37 +0200 |
| commit | 279f225cf06da7c1dac8627c656cc3fca47d4ca8 (patch) | |
| tree | 4f9b1ada7c74b7f64c14dfca0d779cd9b0923da3 /addons/web/static/lib/bootstrap | |
| parent | 95f49eadc18d3c4964086968ec92092c2af75892 (diff) | |
[IMP] mrp, stock, stock_account: compute stored fields trigger
This is a performance revision.
Some stored functions field were recomputed uselessly.
In mrp, `hour_total` and `cycle_total` were recomputed
at each write on `mrp.production`, while they should be recomputed
only when there is a change on the `workcenter_lines` field,
or when there is a change in the `hour` or `cycle` field
of these `workcenter_lines`.
In stock, `min_date`, `max_date` and `priority` of
`stock.picking` were recomputed each time a new move
was added to the picking,
wether or not the 'expected_date' of this move
was between the `stock.picking` `min_date` and `max_date`,
and the priority not greater.
In stock, `product_qty` of `stock.move` was recomputed
at each write on the `stock.move`, while it should be
recomputed only when there is a change in `product_id`,
`product_uom` or `product_uom_qty`, as the computation
method only depends on these three fields.
In stock_account, the `invoice_state` of `stock.picking`
was recomputed each time a new `stock.move` was associated
to the picking, wether or not the `invoice_state` of the move
was already the same than the `invoice_state` of the picking.
opw-643560
Diffstat (limited to 'addons/web/static/lib/bootstrap')
0 files changed, 0 insertions, 0 deletions
