On 14/12/12 15:14 +0100, Guillem Barba Domingo wrote: > 2012/12/13 Cédric Krier <[email protected]> > > > On 23/11/12 13:36 +0100, Cédric Krier wrote: > > > On 23/11/12 12:28 +0000, [email protected] wrote: > > > > Reviewers: , > > > > > > > > Please review this at http://codereview.tryton.org/599002/ > > > > > > Here are the rational for such change. > > > The current implementation requires to query the fields description in > > > English to allow to convert the operand into value. This is process is > > > quite expensive on the translation table. > > > > > > I think it doesn't deserve a migration (which will require a lot of > > > dead code) because normally such record rule should be created in XML > > > via a module (it is development) and so the XML will fail to load if not > > > updated. And if someone has write a rule via the client, then there will > > > be a message during the update because the 'NOT NULL' constraint could > > > not be set and the Rule will raise an exception when accessed to prevent > > > unauthorized access. > > > > I would like to push this review but I got no feedback? > > > > > I think to leave two options is the best solution,
Two options is always the worst solution.
The zen of Python:
There should be one-- and preferably only one --obvious way to do
it.
> prevailing the field
> 'domain' (it culd be renamed to 'force_domain'?) over the definition with
> fields.
> Most of times the rules are created by expert users (the consultor), but
> some users want to define it's rules
In real life it doesn't work. You need to test a lot if you add a new
rule because it has impact on the all system. So it is the job of
developers.
> and the current solution, even though
> it is very simple and limitated, give to the non expert user the option to
> define a rule.
With this patch, we merge the syntax with the one on act_window and many
other places so there is only 1 syntax to know.
> This feature could also be isolated into a new module like 'rule_simple' or
> 'rule_editor'.
You can do it but I will be against the inclusion of such module in the
core.
--
Cédric Krier
B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/
pgpsOBfIgCilW.pgp
Description: PGP signature
