duplicate partner created for each order import

Bug #499042 reported by Raphaël Valyi - http://www.akretion.com
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
Fix Released
High
Unassigned

Bug Description

Hello,

due to my attempt to fix the "guest mode" order import, I made that regression. more specifically, this is due to that specific code:

    def oevals_from_extdata(self, cr, uid, external_referential_id, data_record, key_field, mapping_lines, defaults, context):
        res = super(magerp_osv.magerp_osv, self).oevals_from_extdata(cr, uid, external_referential_id, data_record, key_field, mapping_lines, defaults, context)

        if not context.get('one_by_one', False):
            if data_record.get('billing_address', False):
                if not data_record.get('partner_id', False): #seems like a guest order, create partner on the fly from billing address to make OpenERP happy:
                    res['partner_id'] = self.pool.get('res.partner').create(cr, uid, {'name': data_record['billing_address'].get('lastname', '') + ' ' + data_record['billing_address'].get('firstname', '')}, context)

Changed in magentoerpconnect:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

fixed by commit #273, simply update your code to fix (you could delete the redundant unused partners in your install if you have some due to the bug),
sorry for the inconvenience.

Changed in magentoerpconnect:
status: Confirmed → 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.