On 04/03/11 14:37 +0100, Udo Spallek wrote: > Hi, > Am Donnerstag, den 03.03.2011, 22:52 +0100 schrieb Cédric Krier: > > On 03/03/11 19:21 +0100, Udo Spallek wrote: > > > > 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?
No. > So every module has to add some xml to allow explicit the fields a > user/company is able to set as default? No. > What will be the order for applying defaults? > First apply system defaults from default_<field name>, then company, > then user? If we design like that we will have the same bad design of ir.default. The default value should be set for a field in only one place which is default_<field name>. Per example, a module that will add a default value for field will need to override de default_<field name> method. -- 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/
pgp9DCsR2auyr.pgp
Description: PGP signature
