Comment 4 for bug 619289

Revision history for this message
ntrubert-cobweb (ntrubert) wrote :

Hi,

    def find_or_create(self, cr, uid, magento_address, external_referential_id, address_default, context={}):
        logger = netsvc.Logger()
        create_ids = []
        write_ids = []
        oe_address = self.mage_to_oe_address(cr, uid, magento_address, address_default)
        args = [(key,'=',oe_address.get(key)) for key in oe_address.keys()]
        addr_id = self.search(cr,uid,args,context=context)

        #Comment by Me

        #if magento_address['is_active'] == 1:
        active = True
        #else:
        # active = False

        #oe_address['active'] = active # this should not be a basis of creating a new address.

Hope that it can help you!