[6.1]Misbehaviour on binary field (widget=image) on on_change method in one2many widget

Bug #994982 reported by Husen Daudi
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Status tracked in Trunk
6.1
Confirmed
Medium
OpenERP Publisher's Warranty Team
Trunk
Invalid
Medium
Unassigned

Bug Description

Hello OpenERP,

I have added a binary field with widget='image' in one 2 many form view.
while adding image using onchange on product_id i am not getting value in binary widget using on_change.
I manage to do this using attached patch.

My patch will show the image from on_change on product but It will not getting saved.
I tried to select image manually on binary field but still its not getting saved.

The problem seems in buffer storage of one2many field.

Here is the traceback I am getting while saving the o2m record.

2012-05-05 07:34:41,992 10197 ERROR ? openerp.addons.web.common.http.HttpRequest.dispatch: An error occurred while handling a json request
Traceback (most recent call last):
  File "/home/serpentcs/openerp/bazaar/61stable/web/addons/web/common/http.py", line 260, in dispatch
    r = method(controller, self, **self.params)
  File "/home/serpentcs/openerp/bazaar/61stable/web/addons/web/controllers/main.py", line 1383, in image
    res = Model.read([int(id)], [field], context)[0].get(field)
ValueError: invalid literal for int() with base 10: 'one2many_v_id_419'
2012-05-05 07:34:41,994 10197 INFO ? werkzeug: 127.0.0.1 - - [05/May/2012 07:34:41] "GET /web/binary/image?session_id=0ab297edfd704ac78a982cb85f2f2bc4&model=sale_wizard.child_item&id=one2many_v_id_419&field=image&t=1336203281284 HTTP/1.1" 500 -

Regards,
Husen.

Tags: maintenance
Revision history for this message
Husen Daudi (husendaudi) wrote :
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Husen,

I did try all steps as you reported with under one2many list, widget="image" on product_id_change (product_id_change) and return the image (binary) field with latest trunk as well as stable6.1 at my end. But I have faced the problem on only 6.1.

I have attached the video for both trunk and 6.1 which is described that problem appears only on 6.1. I have faced two misbehaviour on 6.1 which is:

1) When product_id change (on_change) called binary field 's value doesn't set. But when the parent record is saved then after we can see it(binary field 's value) on one2many list.
2) When I tried to set binary field 's value manually then again I have faced similar kind of issue. After the on2many list's save this field 's values doesn't set again, and we have to save main (parent) record.

But I didn't faced any traceback at my end, I have attached the code which I applied to check this issue (which will more helpful to reproduce again). And this problem only appears on 6.1 stable version that's why I am assigning this to OPW team also it's not a blocking point, So set it as a "Low".

Please see attached video which shows more clearly.

Cheers!

Revision history for this message
Amit Parik (amit-parik) wrote :
Revision history for this message
Amit Parik (amit-parik) wrote :
Revision history for this message
Amit Parik (amit-parik) wrote :
summary: - Traceback when storing binary image in one2many widget
+ [6.1]Misbehaviour on binary field (widget=image) on on_change method in
+ one2many widget
Changed in openerp-web:
assignee: nobody → OpenERP R&D Web Team (openerp-dev-web)
importance: Undecided → Low
status: New → Confirmed
assignee: OpenERP R&D Web Team (openerp-dev-web) → OpenERP Publisher's Warranty Team (openerp-opw)
Changed in openerp-web:
importance: Low → Medium
Changed in openerp-web:
status: Confirmed → Invalid
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

Hello niv-openerp,

I arrived to this bug report following https://bugs.launchpad.net/openerp-web/+bug/1016586.

We are still experiencing the issue reported in that bug, but I see you closed this one as "invalid". Could you add a note explaining why?

Thanks

Changed in openerp-web:
status: Invalid → New
tags: added: maintenance
removed: image openerp web widget
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.