On 10 juin, 19:54, Cédric Krier <[email protected]> wrote:
> On 10/06/12 10:43 -0700, guly200 wrote:
>
> > On 10 juin, 19:19, Cédric Krier <[email protected]> wrote:
> > > On 10/06/12 09:58 -0700, guly200 wrote:
>
> > > > I have an object of class A with a Function field for which the
> > > > searcher function executes a sql query on objects if class B.
>
> > > > When some B objects change, the list of A objects is not updated until
> > > > I stop and restart the server. I assume there is some caching on
> > > > server side because the searcher function is not being called...
>
> > > > Can somebody point me to where this is in the code or how I can reset
> > > > the cache of my Function field on object A when object B is being
> > > > modified ?
>
> > > By default there is no cache.
>
> > Weird !!
> > Is their any cache on the application of group rules then ?
> > I am using this function field to determine if the user has access to
> > a party or not based on complicated conditions on other objects. I
> > have a rule like this:
>
> >         <record model="ir.rule" id="rule_name">
> >             <field name="field" search="[('name', '=',
> > 'my_function_field'), ('model.model', '=', 'party.party')]"/>
> >             <field name="operator">=</field>
> >             <field name="operand">True</field>
> >             <field name="rule_group" ref="rule_group_name"/>
> >         </record>
>
> > Would there be any caching on the rule calculation to determine
> > access ?
>
> Ymyes there is a cache on ir.rule.domain_get()
>
> http://hg.tryton.org/trytond/file/9a2e382df2f8/trytond/ir/rule.py#l151
>


Thanks.
Could you advise what is the easiest way to empty this cache from my
class B object on the function field of class A object ?

-- 
[email protected] mailing list

Reply via email to