İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2264 Görünümler

What is the recommended way/format to update prices on existing products via importing file? 

Avatar
Vazgeç

On Odoo v17  odoo/addons/website_sale/models/product_pricelist.py large updates are slow due clear_cache, fired for every csv line entry, take care (i'm just looking a way to optimize this)

def write(self, data):

res = super(ProductPricelist, self).write(data)

self and self.env.registry.clear_cache()

return res

En İyi Yanıt

To update prices on existing products through file import, here’s a recommended workflow that ensures accuracy by using External ID:


1. Export Existing Product Data

Navigate to Inventory > Products and switch to List View.

Select the products you want to update, then click Action > Export.


In the export screen, add these fields:

External ID: Essential for identifying each product uniquely during the import. or check I want to import that, so the external ID is also exported


Sales Price (list_price) or Cost Price (standard_price): Select the price field(s) you intend to update.

Export the file in Excel or CSV format.


2. Update Prices in the Exported File

Open the exported file and update the prices as needed in the list_price (for sales prices) or standard_price (for cost prices) column.

Do not alter the External ID column, as it’s what Odoo will use to match each row to the correct product.


3. Import the Updated File

Go back to Inventory > Products and click Import.

Upload your updated file.

Ensure that External ID is mapped correctly in the import wizard to avoid any mismatches.


4. Validate and Complete the Import

Use the Test button in the import wizard to check for any potential issues.

If everything looks good, click Import to apply the price updates.

Additional Tips

Backup Data: It’s wise to make a backup or test with a few records first, especially for a large update.

Batch Update: If you're managing multiple price lists, you can repeat this process for each relevant price list by selecting the specific fields and products you want to update.

This method is highly reliable because using External IDs minimizes the risk of updating the wrong products.

Warm regards
daniel

Avatar
Vazgeç
Üretici

Thank you very much, appreciate the help

Kind regards

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Haz 25
1060
3
Mar 25
1953
2
Şub 25
4634
1
Şub 25
1643
1
May 25
1192