Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Jídlo a pohostinství
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Penzion
    • Distributor nápojů
    • Hotel
    Nemovitost
    • Realitní kancelář
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Poradenství
    • Účetní firma
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textil
    • Kov
    • Nábytek
    • Jídlo
    • Pivovar
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Transakce
    • Údržbář
    • Podpora IT & hardware
    • Systémy solární energie
    • Výrobce obuvi
    • Úklidové služby
    • Služby HVAC
    Ostatní
    • Nezisková organizace
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Procházet všechna odvětví
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Služby pro partnery
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Don't want Odoo to update price when changing quantity

Odebírat

Get notified when there's activity on this post

This question has been flagged
4 Odpovědi
4998 Zobrazení
Avatar
Adam

Hello,

In sale order line I don't want Odoo to update price automatically when I change the quantity because sometime, I change the price manually and then change the quantity so I need to keep the price. Please help!

0
Avatar
Zrušit
Avatar
shubham shiroya
Nejlepší odpověď

you can customize the behavior by overriding the relevant method in the sale.order.line model. Here's an example of how you can achieve this:

  1. Create a custom module:

    • Create a custom module or use an existing one to implement the required customization. Let's assume the module name is custom_sale.
  2. Inherit the sale.order.line model:

    • In the custom_sale/models/sale_order.py file, define a new Python class that inherits from sale.order.line:
from odoo import models, api


classSaleOrderLine(models.Model):
    _inherit = 'sale.order.line'    

@api.onchange('product_uom_qty')
defonchange_product_uom_qty(self): # Skip price update if price has been manually set
for line in self: if line.price_unit_manual: continue
​ ​ else: # Call the original onchange method to update the price
super(SaleOrderLine, line).onchange_product_uom_qty()



  1. Update the module manifest:
    • In the custom_sale/__manifest__.py file, add the dependency on the sale module:


0
Avatar
Zrušit
Khattab Omar Aldabagh

not work

Avatar
Niyas Raphy (Walnut Software Solutions)
Nejlepší odpověď

HI,

By default there is no option to disable it. If you need to achieve this you have add custom codes into the system, which will do the same for you.

The case is that, odoo has the functionality of the price list, where the price can change based on the number of quantities we are selling, once you applied this change, you will loose this functionality in the system.


Anyway if you need to achieve this, you have to create a custom module, which inherit the sale.order.line model and remove the product_uom_qty dependency from _compute_price_unit function.


Thanks

1
Avatar
Zrušit
Niyas Raphy (Walnut Software Solutions)

am sorry , the function is def _compute_price_unit(self): in the sale order line model

Avatar
Lucie Allard (lual)
Nejlepší odpověď

Hi!

This behavior was changed in Odoo 18, please have a look at the following video (starting from 12:40): https://www.odoo.com/odoo/project/809/tasks/4035579

Once you've upgraded the database to 18, you'll have access to the new feature. 

Hope this helps,

0
Avatar
Zrušit
Avatar
DECOWOOD EUROPA SL.
Nejlepší odpověď

This solution doens't work for me,


You can made override of function to avoid update:


from odoo import _, api, models, fields

class SaleOrderLine(models.Model): @api.depends('product_id', 'product_uom', 'product_uom_qty')
def _compute_price_unit(self):
for line in self:
if line.price_unit > 0:
continue
else:
super(SaleOrderLine, line)._compute_price_unit()

0
Avatar
Zrušit
Enjoying the discussion? Don't just read, join in!

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

Přihlásit se
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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