OCA / server-env

Tools to manage environment-dependent configuration
GNU Affero General Public License v3.0
56 stars 149 forks source link

[16.0][FIX] server_environment: string for field storing default value #161

Closed glitchov closed 1 year ago

glitchov commented 1 year ago

This fix avoids a possible collision in the string of field storing default value when the first part is empty and the string is then " Env Default".

qgroulard commented 1 year ago

Hi, I opened https://github.com/OCA/server-env/pull/160 yesterday to solve the same problem.

Regarding your solution, fieldname is basically base_field.name + _env_default, then you remove _env_default, thus what you use is base_field.name. I propose to use base_field.string which looks more appropriate to me in this case.

glitchov commented 1 year ago

@qgroulard Indeed your solution is better than mine.