Hi, Am Donnerstag, den 03.03.2011, 22:52 +0100 schrieb Cédric Krier: > On 03/03/11 19:21 +0100, Udo Spallek wrote: > > good idea to bring ir.defaults into discussion. > > Am Donnerstag, den 03.03.2011, 18:27 +0100 schrieb Nicolas Évrard: [...] > > > - 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. As far as I understand a system default is different from a company default or a user default. But you are right, it is not a good idea to allow user defaults everywhere.
> > > 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. Do you mean some kind of functionality, which restrict or declare the fields/models where the user can set a default? So every module has to add some xml to allow explicit the fields a user/company is able to set as default? What will be the order for applying defaults? First apply system defaults from default_<field name>, then company, then user? > > > - 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. Yes, thats true. And indeed it is very powerful. Yesterday I set a default on invoice total amount. Guess what happened... I created a new invoice which had this total amount, even without an invoice line... So yes, probably the right click functionality should be removed and replaced by a new default-system on company and user level. Regards -- Udo Spallek ------------------------------------ virtual things Preisler & Spallek GbR Munich - Aix-la-Chapelle Windeckstr. 77 81375 Munich - Germany Tel: +49 (89) 710 481 55 Fax: +49 (89) 710 481 56 [email protected] http://www.virtual-things.biz -- [email protected] mailing list
