On 16/12/09 11:37 +0100, Cédric Krier wrote:
> I propose to replace it by a syntax composed of python object like this:
>
> Tuple(If(In(Eval('company'), Eval('context')), '=', '!='), Eval('id'),
> Get(Eval('context'), 'company'))
>
> The advantages are:
> - they can be manipulated by Python on the server-side because it is Python
> Object
> - we can implemented a json function to dump it on the fly into a json string
> like:
>
> {'__class__': 'Tuple', 'v': {'__class__': 'If', 'v': {...}}}
>
> And the client can inteprete it when loading the json.
> - they are not soo much verbose compare to Python statement
> - we good implement specific function for common pattern
>
> Disavantages are:
> - we need to check all the strings in XML (domain and context of
> ir.action.act_window) and Fields (domain and states). But any way, they was
> not so easy to extend as I showed above.
> - it will increase a little bit the size of fields_view_get result.Here is a first draft of the implementation: http://codereview.appspot.com/183067 -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email: [email protected] Jabber: [email protected] Website: http://www.b2ck.com/ twitter: http://twitter.com/cedrickrier identi.ca: http://identi.ca/cedrickrier
pgp3FZSEyTgTc.pgp
Description: PGP signature
