Odoo Help

0

0
7 Answers
1
Avatar

Emipro Technologies Pvt. Ltd.

--Emipro Technologies Pvt. Ltd.--
7752
| 7 8 10
Rajkot, India
--Emipro Technologies Pvt. Ltd.--

Emipro has been providing a wide range of business solutions in the domain of ERP & eCommerce. We take pride in serving 1000s of contented customers across the globe with strong roots in the US, Europe & India. Being a Certified Odoo Gold Partner in India as well as the United States, we bring our rich professional experience and unrivaled technical competence to help our customers obtain efficient and cost-effective business solutions in Odoo. With our team of 50+ Odoo Experts and highly experienced business analysts, we serve our customers which are companies of all sizes, ranging from start-ups to large enterprises. 

Our ERP Services:

  • Business Need Analysis & GAP Analysis

  • ERP Migration

  • Odoo Consultancy

  • Odoo Implementation & Customization

  • Odoo Training & Support

  • Odoo Website & eCommerce Development

  • Odoo Integration (Marketplaces, eCommerce platforms, Shipping Carriers, Payment Gateways etc.)

Our Achievements:


Reach Us:

Website: www.emiprotechnologies.com

Email: info@emiprotechnologies.com

Skype: emiprotech

Emipro Technologies Pvt. Ltd.
3/10/15, 6:18 AM

Hi Chesucr,

You can migrate your code as like below. You just need to chage your functions like below and you code will be migrate into V8.

    @api.multi
    def _get_image(self, name, args):
        return dict((p.id, tools.image_get_resized_images(p.image)) for p in self)

    @api.one
    def _set_image(self, name, value, args):
        return self.write({'image': tools.image_resize_image_big(value)})

I hope you will get your result. 

Note : Please refer python file from odoo=>openerp=>addons=>base=>res=>res_partner.py in this file looking on the class res_partner.

3 Comments
chesucr
3/10/15, 8:03 AM

mmm I think you copied the code from here https://www.odoo.com/es_ES/forum/help-1/question/avatar-image-in-new-api-69525 but that doesn't work. Thanks anyway. Moreover with @api.one and @api.multi you only need 'self' as argument. With the function _set_image I get this error: RuntimeError: maximum recursion depth exceeded. I will go on with my research

Emipro Technologies Pvt. Ltd.
3/10/15, 8:40 AM

As I have write down on the note. I have seen this in that file. I have not copied from https://www.odoo.com/es_ES/forum/help-1/question/avatar-image-in-new-api-69525.

chesucr
3/13/15, 5:56 AM

OK thanks, I owe you one ;) I tried the functions with this field and it worked: image = fields.Binary("Second product image", compute="_get_image", multi="_get_image", inverse="_set_image")

0
wizardz
8/22/16, 7:49 AM

what is now the complete answer ( code) ?

0
Avatar

Vasanth

--Vasanth--

3893
| 6 3 10
Pondicherry, India
--Vasanth--
Vasanth
3/9/15, 9:39 AM

hi,

please refer this link for your way to do migration:

https://www.odoo.com/forum/help-1/question/migrate-database-from-openerp-6-1-to-odoo-72702

1 Comment
chesucr
3/9/15, 11:20 AM

I was talking about code migration instead database migration, thanks anyway

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now