Prices list import is not able to retrieve the category

Bug #812340 reported by Yann Papouin
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP's Framework R&D

Bug Description

Prices list import is not able to retrieve the category from the "version_id/items_id/categ_id" field
The reported error is always "Record not found".

For example (eg: with category = All Products/Master Category A/Subcategory A), if I replace "All Products/Master Category A/Subcategory A" with "Subcategory A" then it works but my problem is that I have some categories with the same name, it's always uses the first.

All Products
  - Master Category A
    - Subcategory A
    - Subcategory B
    - Subcategory C
  - Master Category B
    - Subcategory A
    - Subcategory B
    - Subcategory C

So, it should use the full path (complete_name ?) to retrieve the right category.

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello Yann,

Would you please provide me the related csv file so I can check this issue more specifically.

Thanks.

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Yann Papouin (yann-papouin) wrote :

You can test it on a fresh database.
Ok, first you need to run "__import__produit.categorie.csv", note that I'm using id's to build inheritance.

Case 1: (by category name ONLY)

Next you can test import with "__import__pricelist_1.csv".
There is some constraints there:
 - You have to create a new Pricelist and remember it's database ".id" (there is no way to import without this, I think it's a bug too, it will not be necessary when custom id will be set)
 - Now, replace the ".id" field of the CSV with your previously created pricelist id
 - Import link only exists in the GTK client, so run a double click on your pricelist to see versions and go to Form->Import
 - Data is correctly imported

Data is imported and the category (version_id/items_id/categ_id) has been replaced with the full length (with parent's one) category name. Note that in this case there is now way to set the "Subcategory B" from "Master Category B"

Case 2: (by FULL category name)

(please delete previously added version first to avoid date conflict)

Next you can test import with "__import__pricelist_2.csv".
There is some constraints there:
 - Now, replace the ".id" field of the CSV with your previously created pricelist id
 - Import link only exists in the GTK client, so run a double click on your pricelist to see versions and go to Form->Import
 - Data is NOT imported :
ValueError: No record found for All products / Manufacturer A / Master Category B / Subcategory A

Now, you can see the bug.

nb: I think that three things must be fixed to achieve this basic user case:

- Add the import field in the Web GUI (pricelist view)
- Allows pricelist import without ".id", only "name" and maybe "id" are necessary for a minimum
- "version_id/items_id/categ_id/id" is not usable when importing because "categ_id/id" is not known, but as you can see in my "__import__produit.categorie.csv", I used them to associate data...

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Wishlist
status: Incomplete → Confirmed
Revision history for this message
Michael Karrer (michaelkarrer81) wrote :

I really feel this is a bug and not a "Whish"! Having the same name in subcategories is pretty normal!

Please reconsider to change this from Whislist to Confirmed!

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.