Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

[solved] updating product attribute extra price from default extra prices

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
pricesproductsvariantsattributes
2 Replies
4167 Rodiniai
Portretas
BUDNIK PROGRAMMING

I am looking to manage prices by updating the attribute default additional price value.

I can understand that it may be unwise to have the default changing value change any additional set prices on individual products. Knowing the risks involved, Is there any way to force Odoo Online to use the default additional price only? Currently the default additional price will only apply after the price has been added and then the attribute is added to the product which is less than ideal. I have upwards of 10,000 variants I need to manage with the same attribute that will affect the price equally so changing the prices per product will be a hinderance to my users.


***updated with solution ***


After playing with chat gpt for a couple hours i have finally found my solution. If you want to update your pricing from the attribute menu rather than individually on each product and each attribute, which will take about 9 clicks per price extra value, you will need to create a server action that will do this update for you.


I activated the dev mode and under the technical section found the server action menu. Under this menu I created a server action called update attribute pricing that would execute code in the model 'product.template' . Then I used the following code to acheive this 


# Fetch all attribute lines associated with the product

attribute_lines = env['product.template.attribute.value'].search([('product_tmpl_id', '=', record.id)])


for attribute_line in attribute_lines:

    # Fetch the related product attribute value

    attribute_value = attribute_line.product_attribute_value_id

    

    if attribute_value:

        # Fetch the default extra price from the product attribute value model

        default_extra_price = attribute_value.default_extra_price

        

        # Compare and update if necessary

        if attribute_line.price_extra != default_extra_price:

            attribute_line.write({'price_extra': default_extra_price})

 

now with this action created and activating a contextual action I can select products I wish to update pricing on and when using the action it will fetch the default_price_extra and apply those values to the price_extra fields on each product.

0
Portretas
Atmesti
Portretas
BUDNIK PROGRAMMING
Autorius Best Answer

Hi Ricardo, 

Thank you for the suggestion, however it would be highly unrealistic to manage my volume of products in this manner. In addition to the rest of my inventory I have 7 products that contain a minimum of 600 variants each along with a large variety of additional options that need to be priced out. I really would prefer to be able to manage prices from one menu such as the "default additional cost" in the configuration > attributes tab. 


update:

upon further exploration i believe I have found a solution that i think could work but chatgpt can only get me so far in making it function as intended.


I would like to create a server action that is either manually triggered or scheduled/automatically triggered to update the value price extra field (price_extra) under the Product Template Attribute Value model (product.template.attribute.value) to the default extra price value under the product.attribute.value model.


currently my server action expression looks like this [ update price_extra to product.attribute.value.default_extra_price ] however this does not work. I have tried a couple versions of this but no success. I would appreciate any insight or advice on this solution.



0
Portretas
Atmesti
Portretas
Ricardo Gross
Best Answer

It is also possible to create "Extra prices" for product variants, for specific pricelists (using the "Extra prices" button on products with variants):

0
Portretas
Atmesti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registracija
Related Posts Replies Rodiniai Veikla
Can I set a default variant on website product page?
products variants attributes e-commerce
Portretas
Portretas
Portretas
Portretas
3
vas. 24
3056
How to Link Product Images to Colors While Maintaining Separate Listings in the "All Products" Section
products variants
Portretas
Portretas
Portretas
Portretas
3
liep. 25
3722
How to Add/Remove/Rename attributes without loosing all variants?
remove products add variants attributes
Portretas
Portretas
1
vas. 25
3585
Allow selection of multiple values from a single attribute of a product's variant Solved
products variants
Portretas
Portretas
Portretas
Portretas
3
rugs. 24
4482
How do you add product attributes to ALL products at the same time?
products attributes
Portretas
Portretas
1
spal. 23
3054
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now