storing blobs from reports

5 views
Skip to first unread message

Paul J Stevens

unread,
Aug 9, 2011, 2:52:25 PM8/9/11
to tryto...@googlegroups.com
Hi all,

I'm working on this custom module for generating reminders on overdue
payments of invoices.

All is fine. Just one thing bothers me. When I generate the report, I
want to store the last-sent reminder on the party.

I'm using the same pattern used in account_invoice/invoice.py [1]
and I do see the UPDATE query going out to the database. But then, a
ROLLBACK is issued. So what gives? Do I need to wrap this in a
transaction? Can I prevent the ROLLBACK?

[1]
http://git.subdir.eu/paul/trytond_account_invoice_reminder/tree/report.py#n136

--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/in...@nfg.nl/+31.85.877.99.97
________________________________________________________________

Cédric Krier

unread,
Aug 9, 2011, 3:01:20 PM8/9/11
to tryto...@googlegroups.com
On 09/08/11 20:52 +0200, Paul J Stevens wrote:
> Hi all,
>
> I'm working on this custom module for generating reminders on overdue
> payments of invoices.
>
> All is fine. Just one thing bothers me. When I generate the report, I
> want to store the last-sent reminder on the party.
>
> I'm using the same pattern used in account_invoice/invoice.py [1]
> and I do see the UPDATE query going out to the database. But then, a
> ROLLBACK is issued. So what gives? Do I need to wrap this in a
> transaction? Can I prevent the ROLLBACK?

The value if the _rpc dictionary corresponding of your call must be True.
See
http://doc.tryton.org/2.0/trytond/doc/ref/models/models.html#trytond.model.Model._rpc

--
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: cedric...@b2ck.com
Website: http://www.b2ck.com/

Paul J Stevens

unread,
Aug 10, 2011, 4:44:55 AM8/10/11
to tryto...@googlegroups.com
On 09-08-11 21:01, C�dric Krier wrote:

>> I'm using the same pattern used in account_invoice/invoice.py [1]
>> and I do see the UPDATE query going out to the database. But then, a
>> ROLLBACK is issued. So what gives? Do I need to wrap this in a
>> transaction? Can I prevent the ROLLBACK?
>
> The value if the _rpc dictionary corresponding of your call must be True.
> See
> http://doc.tryton.org/2.0/trytond/doc/ref/models/models.html#trytond.model.Model._rpc

That's it! Thanks.

Reply all
Reply to author
Forward
0 new messages