← Back to team overview

openerp-connector-community team mailing list archive

Re: Duplicate items if multiple stores

 

Hi Guewen,

Trying to understand "deactivated" in this sentence:

"For normal users, they are 
directly deactivated (and we import their address book). "

I would think they would be "activated" while guests might be "de-activated" in respect to their not wishing to really register.

Thanks as well for the great work!
Landis Arnold

----- Original Message -----
From: "Guewen Baconnier" <guewen.baconnier@xxxxxxxxxxxxxx>
To: "Mike Lindsay" <lindsm@xxxxxxxxx>
Cc: "openerp-connector-community" <openerp-connector-community@xxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, January 22, 2014 12:33:27 AM
Subject: Re: [Openerp-connector-community] Duplicate items if multiple stores

On 01/22/2014 08:07 AM, Mike Lindsay wrote:
> I'm sorry I should of said separate Magento instances.  One is 1.7 the
> other is 1.8.
>
> I have 2 copies of product reference # 016-400.  The first one has a
> connector ID of 8 to "1.8 Magento Test".  The second one does not have a
> binding.  Neither existed in OpenERP before I put them in magento.  I
> don't think I cleared all my Reviews before I setup the second magento
> instance.   My lowest product reference # 0008-016 only has one
> instance, I would bet money that is the only one I reviewed/approved
> before setting up the second store.
The connector does not make assertion by default on how products should 
be considered as identical. For you it is the reference but for another 
person it may not be true (also the reference is not "unique" on 
OpenERP). It is easy to add a custom mapping to link them though:

     @only_create
     @mapping
     def bind_on_reference(self, record):
         domain = [('default_code', '=', record['sku'])]
         product_ids = self.session.search(domain)
         if product_ids:
             return {'openerp_id': product_ids[0]}

Customers should be mapped with address email.

>
> As far as the customers go, I realized for guest checkouts on Magento,
> it creates 3 contacts.  Not sure if that is default behavior for
> magento-connector or some US localization modules I have installed that
> might be affecting partners.

Magento creates 2 new addresses on the fly for each sale 
(shipping/billing) so we have to import them. For normal users, they are 
directly deactivated (and we import their address book). For guest 
users, we keep them as their addresses as they do not have an address 
book on Magento.

>
> Thanks for all your input/help so far, anything I can do to help, let me
> know.
You are welcome.
Thanks, our inputs are already valuable.
>
>
> On Tue, Jan 21, 2014 at 10:35 PM, Guewen Baconnier
> <guewen.baconnier@xxxxxxxxxxxxxx
> <mailto:guewen.baconnier@xxxxxxxxxxxxxx>> wrote:
>
>     On 01/21/2014 11:37 PM, Mike Lindsay wrote:
>
>         My test Magento orders automatically imported into OpenERP
>         yesterday.
>            That put a smile on my face.  Great work :)  For the fun of it, I
>         hooked 2 different magento stores to my OpenERP instance.  After the
>         import, I was very surprised to see all my items duplicated.
>           Many of
>         the customers were repeated also (harder to check on these as a
>         default
>         customer seems to generate 3 contacts anyways).
>
>         Have I missed a configuration step, or is this expected
>         behavior?  These
>         items, including weight are identical, and seem to have been
>         duplicated.
>
>         Inline image 1
>
>         Thanks!
>
>         Mike
>
>
>     Are the stores on the same Magento instance?
>
>     Can you check the magento id of these records ('Connector' tab then
>     click on the Magento binding)? Are they identical?
>
>     --
>     Guewen Baconnier
>     Business Solutions Software Developer
>
>     Camptocamp SA
>     PSE A, CH-1015 Lausanne
>     Phone: +41 21 619 10 39 <tel:%2B41%2021%20619%2010%2039>
>     Office: +41 21 619 10 10 <tel:%2B41%2021%20619%2010%2010>
>     http://www.camptocamp.com/
>
>     --
>     Mailing list: https://launchpad.net/~__openerp-connector-community
>     <https://launchpad.net/~openerp-connector-community>
>     Post to     : openerp-connector-community@__lists.launchpad.net
>     <mailto:openerp-connector-community@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~__openerp-connector-community
>     <https://launchpad.net/~openerp-connector-community>
>     More help   : https://help.launchpad.net/__ListHelp
>     <https://help.launchpad.net/ListHelp>
>
>


-- 
Guewen Baconnier
Business Solutions Software Developer

Camptocamp SA
PSE A, CH-1015 Lausanne
Phone: +41 21 619 10 39
Office: +41 21 619 10 10
http://www.camptocamp.com/

-- 
Mailing list: https://launchpad.net/~openerp-connector-community
Post to     : openerp-connector-community@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openerp-connector-community
More help   : https://help.launchpad.net/ListHelp


Follow ups

References