Jon Levy
2018-01-17 16:59:00 UTC
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?
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?
--
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/4729ffc5-0c6a-4b1b-97a9-11b27d15c48d%40googlegroups.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/4729ffc5-0c6a-4b1b-97a9-11b27d15c48d%40googlegroups.com.