On 2018-04-26 06:26, Maxime Richez wrote: > I'm adding function fields from model purchase in model purchase_line : > party, currency, purchase_date,... > > Wondering if it's better to name those fields with a prefix : purchase_party, > purchase_currency,... but purchase_date is already prefixed... > > Should i define a global dictionary of mapped fields or use a startwith > function to remove prefix ? > > Or finally don't care to prefix except for duplicate name fields ?
For me, the rule should be to use a name that describes the best field and is unambiguous from the Model point of view. So in your case, you should use a prefix only if the name of the field without it has an ambiguous meaning or if there could be another module that adds the same field but for different purpose. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton-dev" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton-dev/20180426135304.GY10584%40kei.