Tryton - Issues

 

Issue3672

Title Generalize error message
Priority feature Status resolved
Superseder Remove unique constraint on sepa identifier, Remove useless sql constraint
View: 7937, 7940
Nosy List ced, pokoli, resteve, reviewbot, roundup-bot, xcodinas
Type behavior Components
Assigned To ced Keywords review
Reviews 35291002,64481002
View: 35291002, 64481002

Created on 2014-02-12.13:01:10 by ced, last changed by roundup-bot.

Messages
New changeset 3d377527c665 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/tryton-env/rev/3d377527c665
New changeset e41d146307e9 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/trytond/rev/e41d146307e9
New changeset f1bf2be165b9 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/web_user/rev/f1bf2be165b9
New changeset 1be6b3418bdb by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/timesheet_cost/rev/1be6b3418bdb
New changeset b064b4f02c25 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/timesheet/rev/b064b4f02c25
New changeset 908feec11e28 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_supply_production/rev/908feec11e28
New changeset 6ce2d561c3ed by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_supply/rev/6ce2d561c3ed
New changeset cd2a587eecd8 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_package_shipping_ups/rev/cd2a587eecd8
New changeset 0467f8c478b6 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_package_shipping_dpd/rev/0467f8c478b6
New changeset f818c00b56d2 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_package_shipping/rev/f818c00b56d2
New changeset b8cf8e8c7a94 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_package/rev/b8cf8e8c7a94
New changeset 59b299ed2fa2 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_lot_unit/rev/59b299ed2fa2
New changeset ae6a7719df28 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_lot_sled/rev/ae6a7719df28
New changeset e1ed82bb1056 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_lot/rev/e1ed82bb1056
New changeset 57a974598a2d by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_location_move/rev/57a974598a2d
New changeset f284990b2d64 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock_forecast/rev/f284990b2d64
New changeset 53898f4756bb by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/stock/rev/53898f4756bb
New changeset 40a6ead117c5 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_supply_drop_shipment/rev/40a6ead117c5
New changeset 901879ee8100 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_subscription_asset/rev/901879ee8100
New changeset 993986c4a6df by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_subscription/rev/993986c4a6df
New changeset e122ce7c714f by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_stock_quantity/rev/e122ce7c714f
New changeset 1fb939a35728 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_shipment_tolerance/rev/1fb939a35728
New changeset 39e7fd8158da by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_shipment_cost/rev/39e7fd8158da
New changeset 1c524d600eca by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_promotion_coupon/rev/1c524d600eca
New changeset ac74bbb16f32 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_promotion/rev/ac74bbb16f32
New changeset e3b122c29552 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_payment/rev/e3b122c29552
New changeset 96fa0f783a72 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_opportunity/rev/96fa0f783a72
New changeset 643e1fb9a1ac by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_complaint/rev/643e1fb9a1ac
New changeset 33a3107ef240 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale_advance_payment/rev/33a3107ef240
New changeset c720259bb5b2 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/sale/rev/c720259bb5b2
New changeset f71225244858 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/purchase_requisition/rev/f71225244858
New changeset b83d8419d931 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/purchase_request_quotation/rev/b83d8419d931
New changeset faead6f75e93 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/purchase_request/rev/faead6f75e93
New changeset 70b0298d41e3 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/purchase/rev/70b0298d41e3
New changeset 7eee3b5afdfa by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/project_invoice/rev/7eee3b5afdfa
New changeset d7b720489943 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/project/rev/d7b720489943
New changeset db2c7f27b3ed by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/production_work/rev/db2c7f27b3ed
New changeset 2ae74fca771a by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/production_outsourcing/rev/2ae74fca771a
New changeset b19c33a8ada6 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/production/rev/b19c33a8ada6
New changeset 2178c2a96863 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/product_price_list/rev/2178c2a96863
New changeset 250e70974e4a by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/product_cost_fifo/rev/250e70974e4a
New changeset 8c885973a93f by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/product/rev/8c885973a93f
New changeset ce9d9e78f041 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/party_siret/rev/ce9d9e78f041
New changeset c05a19615e4c by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/party/rev/c05a19615e4c
New changeset 9b150c489250 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/ldap_authentication/rev/9b150c489250
New changeset 2e00af3c94e0 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/currency/rev/2e00af3c94e0
New changeset 7ec751691778 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/commission/rev/7ec751691778
New changeset eda8ec460896 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/bank/rev/eda8ec460896
New changeset d2b157389fe3 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/authentication_sms/rev/d2b157389fe3
New changeset 19849c6554d3 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/analytic_purchase/rev/19849c6554d3
New changeset 056f5a821c03 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/analytic_account/rev/056f5a821c03
New changeset 2bd4820eae4f by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_tax_cash/rev/2bd4820eae4f
New changeset e70913d85aa6 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_stock_continental/rev/e70913d85aa6
New changeset 0458d195ba93 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_stock_anglo_saxon/rev/0458d195ba93
New changeset 4f03ed6915e0 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_statement_ofx/rev/4f03ed6915e0
New changeset 4feba2fd060c by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_statement_coda/rev/4feba2fd060c
New changeset a0ce9cbdf3e9 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_statement_aeb43/rev/a0ce9cbdf3e9
New changeset 360d0c5747fb by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_statement/rev/360d0c5747fb
New changeset d896dc60c010 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_product/rev/d896dc60c010
New changeset a8550d684cac by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_payment_stripe/rev/a8550d684cac
New changeset ac3aea04b6a2 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_payment_sepa/rev/ac3aea04b6a2
New changeset b46797e3a313 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_payment/rev/b46797e3a313
New changeset 2c61ecf25cb1 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_invoice/rev/2c61ecf25cb1
New changeset 0b4702c77fce by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_fr_chorus/rev/0b4702c77fce
New changeset bcfec489b24a by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_es/rev/bcfec489b24a
New changeset 9049203c3507 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_dunning_fee/rev/9049203c3507
New changeset 43de1cb5041f by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_dunning/rev/43de1cb5041f
New changeset 2170c41e3fe3 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_deposit/rev/2170c41e3fe3
New changeset de6a1dbbf8bb by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_credit_limit/rev/de6a1dbbf8bb
New changeset 61705395ce1e by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account_asset/rev/61705395ce1e
New changeset efb8001e1ac1 by Cédric Krier in branch 'default':
Add ir.message and use custom exceptions
https://hg.tryton.org/modules/account/rev/efb8001e1ac1
review35291002 updated at https://codereview.tryton.org/35291002/#ps480001
review64481002 updated at https://codereview.tryton.org/64481002/#ps240001
review35291002 updated at https://codereview.tryton.org/35291002/#ps460001
review64481002 updated at https://codereview.tryton.org/64481002/#ps220001
review35291002 updated at https://codereview.tryton.org/35291002/#ps440001
review35291002 updated at https://codereview.tryton.org/35291002/#ps420001
msg45470 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-12-22.17:36:08
The migration SQL to clean former error message:

DELETE FROM "ir_translation" WHERE "type" = 'error';
review35291002 updated at https://codereview.tryton.org/35291002/#ps400001
review64481002 updated at https://codereview.tryton.org/64481002/#ps200001
msg45421 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-12-20.23:31:01
The change is ready to be committed, if there are no more comment on message in few days, I will commit it (to avoid too much work to maintain it up to date).
review64481002 updated at https://codereview.tryton.org/64481002/#ps180001
review64481002 updated at https://codereview.tryton.org/64481002/#ps160001
review64481002 updated at https://codereview.tryton.org/64481002/#ps140001
review64481002 updated at https://codereview.tryton.org/64481002/#ps120001
review64481002 updated at https://codereview.tryton.org/64481002/#ps100001
review35291002 updated at https://codereview.tryton.org/35291002/#ps380001
review64481002 updated at https://codereview.tryton.org/64481002/#ps80001
review64481002 updated at https://codereview.tryton.org/64481002/#ps60001
review35291002 updated at https://codereview.tryton.org/35291002/#ps360001
review35291002 updated at https://codereview.tryton.org/35291002/#ps340071
review64481002 updated at https://codereview.tryton.org/64481002/#ps40001
review64481002 updated at https://codereview.tryton.org/64481002/#ps20001
review64481002 updated at https://codereview.tryton.org/64481002/#ps1
msg44984 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-11-23.09:08:07
Here is WIP review64481002 for modules
review35291002 updated at https://codereview.tryton.org/35291002/#ps310001
review35291002 updated at https://codereview.tryton.org/35291002/#ps290001
review35291002 updated at https://codereview.tryton.org/35291002/#ps270001
msg44952 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-11-21.01:05:31
I uploaded a WIP, it is already functional as the trytond tests pass. I still have to improve some exception testing in tests. But it can already be discussed about the derived exceptions I created etc.
Next step will be to make reviews for each needed module.
msg44928 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-11-19.18:36:58
I will have to remove the _error_messages because _sql_constraint will become ambiguous if we keep it.
msg44924 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-11-19.09:59:37
You've been added as collaborator on the review, feel free to pick the issue.
msg44920 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-11-18.18:39:31
I would like to resume this review and finish it for inclusion.
review35291002 updated at https://codereview.tryton.org/35291002/#ps260001
review35291002 updated at https://codereview.tryton.org/35291002/#ps220001
review35291002 updated at https://codereview.tryton.org/35291002/#ps210001
review35291002 updated at https://codereview.tryton.org/35291002/#ps170001
review35291002 updated at https://codereview.tryton.org/35291002/#ps150001
review35291002 updated at https://codereview.tryton.org/35291002/#ps130001
review35291002 updated at https://codereview.tryton.org/35291002/#ps100001
review35291002 updated at https://codereview.tryton.org/35291002/#ps60001
msg35198 (view) Author: [hidden] (xcodinas) (Tryton committer) Date: 2017-08-17.11:43:30
>Yes the goal is to remove _error_messages but we could do it in two steps, 
>first support ir.message and after progressively replace _error_messages.
>ir.message should use the translation mechanism.

I've updated the review and I've added the design to follow to replace error 
messages, the idea is to directly remove _error_messages.
msg35012 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2017-08-03.22:14:08
Yes the goal is to remove _error_messages but we could do it in two steps, first support ir.message and after progressively replace _error_messages.
ir.message should use the translation mechanism.
review35291002 updated at https://codereview.tryton.org/35291002/#ps40001
review35291002 updated at https://codereview.tryton.org/35291002/#ps20002
msg32360 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-03-08.14:18:29
I have a few concerns about the migration:

- Should we remove cls._error_messages? Or deprecate them and register the  messages to the new ir.translation table. 
- Should we keep the current translations values? Or we should introduce the ir.message records as new strings to translate? The latter have the benefit that they can be reviewed but I'm wondering if this will be too much work.
New review35291002 at https://codereview.tryton.org/35291002/#ps1
msg32358 (view) Author: [hidden] (xcodinas) (Tryton committer) Date: 2017-03-08.13:46:03
I'm going to make a script that will migrate the actual error data to this design.
msg32357 (view) Author: [hidden] (xcodinas) (Tryton committer) Date: 2017-03-08.13:41:37
I add review35291002 that adds ir.message and uses it for the error messages.
msg32036 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-02-17.14:37:25
Just droping a note to take in account issue6277 when implementing this.
msg15589 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2014-02-12.13:01:08
As the wizard always skip those error translation, if there are changes on it,
it keep for the language the old one and the new.
It is not a big issue because the get_source will search for matching origin.
This could be fixed by changing the way error messages are defined.
We should create an Model for such message (ir.message) where the «name» will be
translatable and replace all the error message defined in the models by record
in this table. This way, we will have unambigus links: «xml id» - «db id» -
«model» «res_id».
History
Date User Action Args
2018-12-29 14:26:48roundup-botsetmessages: + msg45592
2018-12-29 14:26:45roundup-botsetmessages: + msg45591
2018-12-29 14:26:40roundup-botsetmessages: + msg45590
2018-12-29 14:26:31roundup-botsetmessages: + msg45589
2018-12-29 14:26:28roundup-botsetmessages: + msg45588
2018-12-29 14:26:26roundup-botsetmessages: + msg45587
2018-12-29 14:26:24roundup-botsetmessages: + msg45586
2018-12-29 14:26:21roundup-botsetmessages: + msg45585
2018-12-29 14:26:14roundup-botsetmessages: + msg45584
2018-12-29 14:26:06roundup-botsetmessages: + msg45583

Showing 10 items. Show all history (warning: this could be VERY long)