Failed to click on 'Print' button at validate state of Purchase order.

Bug #670778 reported by Vinay Rana (OpenERP)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Medium
OpenERP's Framework R&D

Bug Description

The Following Traceback will come :

Environment Information :
System : Linux-2.6.32-21-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid
Operating System Release : 2.6.32-21-generic
Operating System Version : #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : en_IN.ISO8859-1
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1-1
Last revision No. & ID :1672 launchpad_translations_on_behalf_of_openerp-20101104045013-wa4nb44ew8m70unc
'utf8' codec can't decode byte 0xaf in position 10: unexpected code byte

Not Facing any server traceback.

The actual problem in following line of code:
<button name="%(report_purchase_order)d" string="Print" states="approved" type="action" icon="gtk-print"/>
Here need to pass action not report xml id or define it as a object type and return the report from that methods.

Thanks.

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Medium
status: New → Confirmed
qdp (OpenERP) (qdp)
Changed in openobject-addons:
milestone: none → 6.0-rc2
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Atik Agewan(OpenERP) (aag-openerp) wrote :

Hello vra (openerp),

I have checked this problem,
But I am not able to reproduce it,
can you again check and provide steps to reproduce problem.

Thanks

Changed in openobject-addons:
status: In Progress → Invalid
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Here is the traceback:

Traceback (most recent call last):
  File "/home/jvo/workspace/trunk/client/bin/widget/view/form_gtk/parser.py", line 123, in button_clicked
    model.get_button_action(self.form.screen, id, self.attrs)
  File "/home/jvo/workspace/trunk/client/bin/widget/model/record.py", line 388, in get_button_action
    obj.execute(action_id, datas, context=context)
  File "/home/jvo/workspace/trunk/client/bin/modules/action/main.py", line 81, in execute
    res = rpc.session.rpc_exec_auth('/object', 'execute', type, 'read', act_id, False, ctx)
  File "/home/jvo/workspace/trunk/client/bin/rpc.py", line 185, in rpc_exec_auth
    return sock.exec_auth(method, *args)
  File "/home/jvo/workspace/trunk/client/bin/rpc.py", line 90, in exec_auth
    res = self.execute(method, self._uid, self._passwd, *args)
  File "/home/jvo/workspace/trunk/client/bin/rpc.py", line 108, in execute
    result = getattr(self._sock,method)(self._db, *args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1387, in _parse_response
    p.feed(response)
  File "/usr/lib/python2.6/xmlrpclib.py", line 868, in end
    return f(self, join(self._data, ""))
  File "/usr/lib/python2.6/xmlrpclib.py", line 916, in end_string
    data = _decode(data, self._encoding)
  File "/usr/lib/python2.6/xmlrpclib.py", line 164, in _decode
    data = unicode(data, encoding)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xaf in position 10: unexpected code byte

Please specify where it has been fixed.
Bug was earlier confirmed, it should better go as released.
Thanks.

Changed in openobject-addons:
status: Invalid → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

It happens with XMLRPC connection.
Looks like a server issue.
Please recheck and provide information.
Thanks.

Revision history for this message
Rohan Nayani(Open ERP) (ron-tinyerp) wrote :

Hello,
I have checked for this problem and found that it is Generic Problem,
I create one button on Account Invoice that directly prints Invoice report (the same as Print button on Purchase Order), it also generated the same problem.
Can you please check it
Thanks

Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

As said by ron, it seems to be a generic problem of printing report from button having type=action

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 2 (openerp-dev-addons2) → nobody
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello,

This is generalize issue which is not working from framework side.(button type 'action' and passing report action)

Thanks.

Changed in openobject-addons:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
affects: openobject-addons → openobject-server
Changed in openobject-server:
milestone: 6.0-rc2 → none
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Something fishy is going on with the GTK client reading all fields of the report, including binary function fields such as report_sxw_content, where the direct binary content is not valid UTF-8 and should not be serialized at all.

The server should not serialize this way, but the client should not even be reading these fields at all.

Changed in openobject-server:
milestone: none → 6.0-rc2
status: Confirmed → In Progress
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

note: web client has the same issue if connected via XML-RPC to the server, NET-RPC works

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

This should be fixed at server revision 3086 <email address hidden>

After investigating further, I don't think a client-side patch would work as an optimization here (we would like to avoid transmitting some binary fields like report_rml_content, but there are other binary function fields that we need, so switching bin_size to True would not work). But anyway the server-side fix should prevent the error in both clients.

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.