Server Action and python code

Bug #304939 reported by Sebastien LANGE - http://www.Syleam.fr
6
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned
Odoo Server (MOVED TO GITHUB)
Fix Released
Undecided
Fabien (Open ERP)
Odoo Web Client
Fix Released
Undecided
Mantavya Gajjar (Open ERP)

Bug Description

I tried the server action with this screencast under ubuntu 8.10 :

http://tinyatindia.blogspot.com/2008/10/first-screen-cast-server-action.html

I put "create" invoice and I've got this message in the server log :

/home/syleam/openerp/5.0/addons/document/content_index.py:39: RuntimeWarning: tempnam is a potential security risk to your program
  fname = os.tempnam(filename)+'.pdf'

So I've not the pdf invoice but if I use the print button, I've the pdf invoice.

Revision history for this message
Sebastien LANGE - http://www.Syleam.fr (alnslang) wrote :

The error in GTK client :

$ ./openerp-client.py
Traceback (most recent call last):
  File "/home/syleam/openerp/5.0/client/bin/widget/view/form_gtk/parser.py", line 103, in button_clicked
    obj._exec_action(result,datas)
  File "/home/syleam/openerp/5.0/client/bin/modules/action/main.py", line 155, in _exec_action
    self.exec_report(action['report_name'], datas)
  File "/home/syleam/openerp/5.0/client/bin/modules/action/main.py", line 41, in exec_report
    ids = datas['ids']
KeyError: 'ids'

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I fixed so that it works on GTK now in trunk.
We are fixing on eitny.

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

fixed in trunk.

Changed in openobject-server:
status: New → Fix Released
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

I also set client_action, very powerfull to raise wizards, reports, ...

Revision history for this message
Amit Mendapara (cristatus) wrote :

The problem has been fixed on web client but you have to reload the page once you get the report after creating the invoice. This behaviour is a known limitation of the web client and can't be fixed easily...

Changed in openobject-client-web:
status: New → Fix Released
Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

fixed in trunk with the revision 774.

Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

$ ./openerp-client.py
Traceback (most recent call last):
  File "/home/syleam/openerp/5.0/client/bin/widget/view/form_gtk/parser.py", line 103, in button_clicked
    obj._exec_action(result,datas)
  File "/home/syleam/openerp/5.0/client/bin/modules/action/main.py", line 155, in _exec_action
    self.exec_report(action['report_name'], datas)
  File "/home/syleam/openerp/5.0/client/bin/modules/action/main.py", line 41, in exec_report
    ids = datas['ids']
KeyError: 'ids'

Fixed the problem with the revision 774

Changed in openobject-client-web:
assignee: nobody → mga
Revision history for this message
Sebastien LANGE - http://www.Syleam.fr (alnslang) wrote :

I's ok wih the "create" button but now if I want to re-open the invoice with print menu, I've got this message in GTK client :

Traceback (most recent call last):
  File "/home/syleam/openerp/5.0/client/bin/widget/view/form.py", line 170, in _action
    value = obj._exec_action(act, data, context)
  File "/home/syleam/openerp/5.0/client/bin/modules/action/main.py", line 156, in _exec_action
    if action['ids']:
KeyError: 'ids'

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

fixed in trunk.

Changed in openobject-server:
status: New → Fix Released
Revision history for this message
Sebastien LANGE - http://www.Syleam.fr (alnslang) wrote :

Now, I've got all invoices in GTK client instead of one invoice.

Changed in openobject-server:
assignee: nobody → fp-tinyerp
status: Fix Released → In Progress
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

Refixed in trunk.

Changed in openobject-server:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.