On 03 Feb 16:10, Gmail - Iasmini wrote: > I wonder if you it's possible to show a dynamic screen messages over > the invoice and go filling this screen according to the processing of > the electronic invoice xml's. > > Because electronic invoice has some steps and I need to show to user > in wich step the processing is and if gives an error I need to show > in this screen in order to user can fix it. > > To be more clear you can watch this video that do exactly what I'm > meaning: http://www.silexsistemas.com.br/downloads/temp/nfse.mp4 > (sorry, the video is in Portuguese-BR, it's our legacy software, that > will be Tryton in future. I hope!) > > First, it shows a screen where the user can select the digital certificate. > > After that, it show this dynamic screen messages over the invoice. > > I need to do this 2 screens on Tryton's invoice, because in Brazil it > is electronic invoice. > > How do I do this in Tryton? > > I did a process button in invoice workflow and it is calling the > process method (wich is on a webservice).
We can not show some kind of progress status update on Tryton for now because we have a simple request/responce design. But you can raise any kind of error message using the Model.raise_user_error [1]. But it requires that your processing is done inside of a database transaction that will be rollbacked by the raise of the exception and so you could restart the request later once the error is fixed by the user. [1] http://doc.tryton.org/3.0/trytond/doc/ref/models/models.html?highlight=raise_user_error#trytond.model.Model.raise_user_error -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
pgptGITOGyxIv.pgp
Description: PGP signature
