On 2018-01-17 08:59, Jon Levy wrote: > I am wondering what the correct idiom is to issue warnings while running a > report. Reports do not inherit from WarningErrorMixin, and run in readonly > transaction. I have a report that requires quite a bit of computation, and I > would like to be able to possibly issue a warning. > > If I try to call the warning based on a Model (that I am otherwise using in > the report), it raises an error that it can't be done in a readonly > transaction. > > Is it appropriate to raise the warning with a Transaction().new_cursor > context manager?
I think it goes against the general idea of having Report being readonly. Indeed I think you should run a wizard that will raise the warning or launch the report. -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/20180117173825.GF4241%40kei.
