On 03/03/11 19:21 +0100, Udo Spallek wrote: > Hello Nicolas, > > good idea to bring ir.defaults into discussion. > Am Donnerstag, den 03.03.2011, 18:27 +0100 schrieb Nicolas Évrard: > > Hello the list, > > Yesterday we talked on IRC, about removing the ir.default object from > > tryton. > > Our main issues with ir.default are: > > - No access right what so ever: anybody can set a default value > > for anybody else, > Why not just remove the field 'apply to all users' from UI and make > field user required in ir.default? > > > - No multi-company support: A default value set through this > > feature will be used for every companies > As ir.default is provided from the framework, it does not know anything > about companies. > I would extend the company Model and add the field company required to > ir.default. Like we do with properties. > > > - Can break workflow or other stuffs: A user can set as default > > the value of states to a certain state and thus it might break > > some logic that relies on this field. > Here I would avoid to set defaults for readonly fields. But I do not > know if it is easy to do, since we have the states attribute on fields.
This is not enough. You must understand that this feature allow to overide any coded default value. This is a bad design as it brings on two places the same concept/behavior. > > > Moreover it seems that the current use of this feature can be replaced > > either by: > > - making tryton's modules more clever > I can not imagine how to bring ir.default functionality from clever > modules? Could you explain, please. > > Think about one sales person for French customers will have default > language 'French' on new parties. And the sales person for GB will have > a default language 'Englisch' for new parties. This can not be done with > better default_<field> methods. Exactly. We should identify every cases people wrongly used the ir.default and modify the code to have a clear way to fix it per example by defining more configuration values on singletons, on company or on user. And perhaps some will go on specific modules. > > > - customizing the company object to set default company-wise. > But company is not available for standard user. It is restricted to > group company-admin. Additionally it is not so easy to edit a table of > fields/defaults then like now, just right click on a field and choose > 'set as default'. But maybe I misunderstand, so please explain what to > do here. > > > Does anybody have strong feelings about this issue or could we go on > > with their removal ? > I like the right click options: set as default/set default/reset > default. This is a decoy. This was a fonctionnality that makes think it is powerful but indeed it spreads all over the application the business/company rules. So nobody could have a clear picture of the workflow, rules etc. -- 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/
pgpCy81Aiauuh.pgp
Description: PGP signature
