← Back to team overview

openerp-connector-community team mailing list archive

Re: Difficulty in Upgrading (product_product_uniq_default_code)

 

Thank you Guewen 

The "find dups" sql will be helpful. 

I really got here as I was trying to update to the newer version of the Connector. Should Database Update command be run after the BZR branches are reset and re-pulled? In my note I referenced a few dependencies that seemed missing. Should there be any new Modules installed before proceeding far w/ the Connector update? I am not there right now but will be coming to this upgrade again soon 

(somewhat unfocused from the last note: > There seem to have been "Unmet Dependencies" related to 


"magentoerpconnect", "connector_ecommerce""web" and "shipping line builder" 

At present, I went back to previous snapshot and do not have the 
branches installed, but the intention is to get there. Perhaps I missed 
something regarding the proper upgrade to 2.10. Does the "Shippiing 
Line Builder" as an extension come in at that point? Should it somehow 
already be in my earlier Extension sets? 
I'm not aware of a "Shipping Line Builder" module. 


<blockquote>
--------------- 
</blockquote>

<blockquote>
What is the exact text in the logs? /(Guewen) 
</blockquote>

<blockquote>
I don't know now as I went to an earlier snapshot. I will have to come back to this. Where do the logs get written? I normally just am watching a SSH session. I have one command to "Start" the Server, and another to rather Start the Server and Update the Database. I can see the update as it proceeds. (Landis). 
</blockquote>

Thank you for your help. I will work on the "no dup" issue first. 

Landis 
----- Original Message -----

From: "Guewen Baconnier" <guewen.baconnier@xxxxxxxxxxxxxx> 
To: "Landis Arnold" <larnold@xxxxxxxxxxx>, "openerp-connector-community" <openerp-connector-community@xxxxxxxxxxxxxxxxxxx> 
Sent: Thursday, February 6, 2014 1:46:57 AM 
Subject: Re: [Openerp-connector-community] Difficulty in Upgrading (product_product_uniq_default_code) 

Hi, 

On 02/05/2014 05:56 AM, Landis Arnold wrote: 

<blockquote>
Hello, 
I have been working on "updating" to the new Connector series. It 
seemed best that I do a Database Update just to be sure I was square 
before I added/modified the new branches. 
I apologize if the question here is too long: 

*Subject 1: (pre 2.1 Series, likely 1.x end, updated just before 
annoucment of 2.1)* 
All goes well in Pre Series 2 Database update except, in 
"product_product" I get an error altering table regarding a "duplicate 
entry" in a unique constraint field. 
It seems to me this would repeat itself much more if I were to have 
Items being used in Multiple Magento Backends - but I do not. Still I 
can't get through the Update using: 

-u all -d (Active Database) 

Evidently I have duplicate Data. 


If you want to have it, you should update the records and execute manually: 
ALTER Table "product_product" ADD Constraint 
"product_product_uniq_default_code" unique(default_code) 



I have gone through the database a few times now and I found two records that had duplicate values in "default_code". 
They are Default Code "/" for (Service) and (Unreferenced Products) (Seems like a Category entry rather than product) 
I changed the later to /1A 

and 
Default Code "Gift Certificate" (there are/were 2 Entries) 
I changed the second to "Gift Certificate 2" 

I plan to delete 1 or Both Gift Certificates, and will change the Codes "/" all together (I believe "Unreferenced products is a remnant frm my attempt at the OpenLabs connector) 

In every event, the XML is throwing the error mentioned and still lets me access the Application. Perhaps there is a "search" type command to find other duplicates I have not recognized. (In general will he Connector be sure not to bring in Duplicates in "default_code"? 
The connector does not add this constraint, it is added by another 
</blockquote>


module. Anyway, OpenERP does not block the update of a module when it 
happens. The best way to find the duplicates is to log in the Postgres 
database and run the query: 
SELECT default_code, count(default_code) FROM product_product GROUP BY 
default_code HAVING count(default_code) > 1; 

Once you have corrected them all, you can create the constraint with: 
ALTER Table "product_product" ADD Constraint 
"product_product_uniq_default_code" unique(default_code) 


<blockquote>
--- 

*Subject 2 -> 2.1 Series of Connector* 
I mention the above because prior I I had tried to modify/add/use the 
new branches (bzr branch lp:openerp-connector-ecommerce/7.0 
openerp-connector-ecommerce 
Did you added the new branch in the addons-path? 
</blockquote>



<blockquote>
and got a string of errors. It seems I need to run some module installs 
after adding the branches and before updating the database. Prior to 
the update (in subject above) the Connector seems to be working correctly 

There seem to have been "Unmet Dependencies" related to 
"magentoerpconnect", "connector_ecommerce""web" and "shipping line builder" 

At present, I went back to previous snapshot and do not have the 
branches installed, but the intention is to get there. Perhaps I missed 
something regarding the proper upgrade to 2.10. Does the "Shippiing 
Line Builder" as an extension come in at that point? Should it somehow 
already be in my earlier Extension sets? 
I'm not aware of a "Shipping Line Builder" module. What is the exact 
</blockquote>


text in the logs? 


<blockquote>

all help is appreciated. 
thank you, 

-- 
Landis Arnold 

larnold@xxxxxxxxxxx 

office: 303-444-2336 ext 11 
cell : 303-601-0622 




-- 
</blockquote>


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/ 

-- 


References