Created on 2020-05-12.12:52:04 by ced, last changed 8 months ago by roundup-bot.
New changeset 933a75960148 by Cédric Krier in branch 'default': Check price_decimal configuration https://hg.tryton.org/tryton-env/rev/933a75960148
New changeset 7183035066d4 by Cédric Krier in branch 'default': Check price_decimal configuration https://hg.tryton.org/trytond/rev/7183035066d4
New changeset 3d7294bedb52 by Cédric Krier in branch 'default': Check price_decimal configuration https://hg.tryton.org/modules/product/rev/3d7294bedb52
Missatge de Cédric Krier <bugs@tryton.org> del dia dt., 12 de maig 2020 a les 17:09: > > Cédric Krier <cedric.krier@b2ck.com> added the comment: > > On 2020-05-12 16:59, Albert Cervera i Areny wrote: > > The proposal is an improvement because at least prevents corrupting data > but at the same time what is the purpose of considering both configuration > file and ir.configuration settings? > > By design the field definition can not depend on a setting in the > database because the field define the database schema. > And for performance, we cannot read in the database each time we need > this value. It would be too expensive and slow. And using a Function > field would add a lot of code on many models for no benefit (as any way > the UI user can not modify it). > Understood. > > ______________________________________ > Tryton issue tracker <bugs@tryton.org> > <https://bugs.tryton.org/issue9324> > ______________________________________ >
On 2020-05-12 16:59, Albert Cervera i Areny wrote: > The proposal is an improvement because at least prevents corrupting data but at the same time what is the purpose of considering both configuration file and ir.configuration settings? By design the field definition can not depend on a setting in the database because the field define the database schema. And for performance, we cannot read in the database each time we need this value. It would be too expensive and slow. And using a Function field would add a lot of code on many models for no benefit (as any way the UI user can not modify it).
The proposal is an improvement because at least prevents corrupting data but at the same time what is the purpose of considering both configuration file and ir.configuration settings? We already know that the right setting is the one in ir.configuration so why should we care about what's in the configuration file? Specially if there's no setting in the configuration file. We could emit a warning in the log if we really care about that. But for me this and the language, is a setting that the user should supply the very first time it creates the database, and later we just use what's in ir.configuration.
Following https://discuss.tryton.org/t/store-unit-price-digits-config-setting-in-the-database/2218 It may be a damaging issue to change the price_digits so we need to ensure to not start working with the wrong value. For that we store the initial value in ir.configuration and check on pool initialization.
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-05-28 18:23:13 | roundup-bot | set | messages: + msg58353 |
2020-05-28 18:23:09 | roundup-bot | set | messages: + msg58352 |
2020-05-28 18:23:05 | roundup-bot | set | status: testing -> resolved nosy: + roundup-bot messages: + msg58351 |
2020-05-18 00:36:39 | albertca | set | status: resolved -> testing |
2020-05-18 00:36:03 | albertca | set | status: testing -> resolved |
2020-05-12 18:51:01 | albertca | set | messages: + msg57978 |
2020-05-12 17:09:03 | ced | set | messages: + msg57970 |
2020-05-12 16:59:17 | albertca | set | nosy:
+ albertca messages: + msg57969 |
2020-05-12 13:09:32 | reviewbot | set | nosy:
+ reviewbot messages: + msg57957 |
2020-05-12 12:54:59 | ced | set | status: in-progress -> testing reviews: 317381002 keyword: + review |
Showing 10 items. Show all history (warning: this could be VERY long)