[7.0] POS take an image of a wrong size

Bug #1252342 reported by Andrei Levin
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Won't Fix
Undecided
Unassigned
OpenERP Community Backports (Addons)
New
Undecided
Unassigned

Bug Description

POS takes an image field instead of image_small of a product. If you uploaded big images POS consumes huge amount of RAM and became really slow.

This bug is very easy to correct:

in file point_of_sale/static/src/js/models.js (lines 327-331)

    module.Product = Backbone.Model.extend({
        get_image_url: function(){
            return instance.session.url('/web/binary/image', {model: 'product.product', field: 'image', id: this.get('id')});
        },
    });

should be substituted with:

    module.Product = Backbone.Model.extend({
        get_image_url: function(){
            return instance.session.url('/web/binary/image', {model: 'product.product', field: 'image_small', id: this.get('id')});
        },
    });

Tags: of point pos sale
Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello Levin,

I have checked this issue, with huge size of images. But my POS is working fine with latest trunk as well with stable 7.0. I have attached a video for your more reference, have a look on that.

So, Would you please check this again ? and correct me If I did any wrong steps with more information.

Thanks & waiting for your answer ..!!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Andrei Levin (andrei-levin) wrote :

Hello Cristian,

you did the wrong test. You should click with the right button of a mouse and try to open an image in a new tab. This way you will see the real size. There is no need for a POS to load big images. Fortunately OpenERP did all the needed work and the only change needed is the field name.

My customer has almost 600 products with images of 150+KB (this size is needed for a possibility to print an image in high resolution). I've also seen no problems with just one image. The situation is different with 90+MB of images in RAM.

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

We have already fixed this issue on latest trunk , It is only affected to stable v7.

So, As per our bug management policy, If you want to this on v7 then you have to contact our support team at <email address hidden> they will defiantly helps you.

Thanks for reporting!

Changed in openobject-addons:
status: Incomplete → Invalid
status: Invalid → Won't Fix
Revision history for this message
Andrei Levin (andrei-levin) wrote :

Dear Christian,

if you read my Bug Description, you know that I already fix it and I don't need any help. I only fulfilled Bug Report to tell you that v.7 has this annoying bug which is very easy to correct. Somebody told me that bugs should be fixed in stable version and not only in trunk.

Have a nice day!

Denero Team (deneroteam)
no longer affects: openerp-web
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Andrei, why don't you propose the patch to OCB?

Regards.

Revision history for this message
Andrei Levin (andrei-levin) wrote : Re: [Bug 1252342] Re: [7.0] POS take an image of a wrong size

I don't proposed it to OCB, because I find this bug before you tell me
how to do it the right way. :-)

2014-06-16 10:05 GMT+02:00 Pedro Manuel Baeza <email address hidden>:
> Hi, Andrei, why don't you propose the patch to OCB?
>
> Regards.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1252342
>
> Title:
> [7.0] POS take an image of a wrong size
>
> Status in OpenERP Community Backports (Addons):
> New
> Status in Odoo Addons:
> Won't Fix
>
> Bug description:
> POS takes an image field instead of image_small of a product. If you
> uploaded big images POS consumes huge amount of RAM and became really
> slow.
>
> This bug is very easy to correct:
>
> in file point_of_sale/static/src/js/models.js (lines 327-331)
>
> module.Product = Backbone.Model.extend({
> get_image_url: function(){
> return instance.session.url('/web/binary/image', {model: 'product.product', field: 'image', id: this.get('id')});
> },
> });
>
> should be substituted with:
>
> module.Product = Backbone.Model.extend({
> get_image_url: function(){
> return instance.session.url('/web/binary/image', {model: 'product.product', field: 'image_small', id: this.get('id')});
> },
> });
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ocb-addons/+bug/1252342/+subscriptions

--
Didotech Srl

Via T.Aspetti, 248
35133 Padova (PD)

Tel 049 8592286
Cell.: 347-2426694
www.didotech.com
www.simplerp.it

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.