Il giorno Mon, 12/12/2011 alle 18.10 +0100, Cédric Krier ha scritto:
> On 12/12/11 08:46 -0800, vuk wrote:
> > Hello everybody, I have a Function field into a model that emulates an
> > Integer field.
> > 
> > duration =
> > fields.Function(fields.Integer(string='Duration',readonly=True,depends
> > = ['start','stop'],on_change_with =
> > ['start','stop']),'compute_duration')
> > 
> > into the tree view i set the sum attribute
> > 
> > <field name="duration" sum="tot hours"/>
> > 
> > The string 'tot hours' appears at the bottom of the view with no sum
> > 
> > tot hours: -
> > 
> > I also tried to force the widget setting widget="integer" but without
> > success
> > 
> > any idea?
> 
> It sums only the selected records.
> 
interesting! i would have never figured it out by myself, probably
because total is not shown at page loading but only when you set the
focus on the list. Maybe it would be clearer that way.
thank you very much

-- 
[email protected] mailing list

Reply via email to