Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Pricelist minimum margin not working in v7?

Subscriure's

Get notified when there's activity on this post

This question has been flagged
pricepricelist
1 Respondre
6599 Vistes
Avatar
Sean Samborski

Set single pricelist, Based on Public Price

 

Base Price * (1 + 0) + 0

Minimum Margin: 5.00

 

When creating an SO with my test user of the lowest sales access rights, the Price that comes up in the form is $Price + 5.00. Which is correct. It still allows the test user to drop the price below this amount. THe purpose of the minimum margin is to stop this kind of behavior.

 

Secondly, is there a way to make this minimum margin based on cost with the price based on public price? I can set two or more pricelists if this is needed.

0
Avatar
Descartar
Avatar
Ray Carnes
Best Answer

I believe it is working as intended.   If you look at the code**, the price for a Sales order line is fully editable:

'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Product Price'), readonly=True, states={'draft': [('readonly', False)]}),

The implications of this design decision is that no matter what a pricelist is set to, users will always be able to edit the value.  

You can prevent this by creating a group that is allowed to edit prices and only adding the relevant users to that group.  You just need to inherit the sale.order.form view and restrict the price_unit field to those who are members of a new group you create****.

 

 

** - https://github.com/odoo/odoo/blob/master/addons/sale/sale.py#L863

*** - https://www.odoo.com/forum/help-1/question/make-field-readonly-based-on-group-58921

0
Avatar
Descartar
Sean Samborski
Autor

That doesn't make sense. On the one hand, you have a price calculation formula in the pricelist. Then you have a minimum margin, but to get the minimum margin to work, you have to restrict access to change prices. Now the user will only get the price created in the formula but still not be getting the minimum margin. If we use this advice, the minimum margin is a useless field that will never work regardless of your permissions.

Ray Carnes

Everything works out of the box without needing changes, once you understand how to set things up. The documentation helps a lot. Permissions changes are only needed it you want an ENFORCED price instead of a SUGGESTION. Pricelists work with price calculations AND margins, not one or the other. Margins dictate the floor or ceiling that the calculation must work within. If the calculation works out to be below or above the margin limits, then they are used instead. If you are not seeing that you should post a screenshot of your rule. https://doc.odoo.com/book/6/6_16_Sales/6_16_Sales_pricing/

Ray Carnes

The part of your assumption that isn't correct is "The purpose of the minimum margin is to stop this kind of behavior". Permissions stop changes that pricelists suggest. A pricelist will never create a price that can't be changed.

Sean Samborski
Autor

Ok well that explanation actually makes sense. That the minimum is only used to control the formula you provide in price.

Ray Carnes

I just found http://stackoverflow.com/questions/23359684/dont-allow-to-quote-below-the-sales-price-of-a-product-in-openerp - it shows how you can create a function to 'validate' any change a user makes to a price and warn them about it.

Sean Samborski
Autor

Yeah I think I saw that before and there was another one like it. There's also some community modules that protect against price change. This question was more about my confusion about how the minimum margin works, which you cleared up. I'm pretty sure there are ways to write a module that can handle my use-case but I was just thinking the minimum margin was what I was thinking. Which it wasn't. Thanks for coming back and posting a followup info.

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
Pro rata prices
price pricelist
Avatar
Avatar
Avatar
Avatar
3
de març 24
5912
How can i get the price history for an item for a customer
price pricelist
Avatar
Avatar
Avatar
2
de març 24
4294
Update list_price from Price List
price pricelist
Avatar
0
de set. 21
3331
Only products from chosen price list available for an quotation
price pricelist
Avatar
0
de març 15
4671
Pricelist with Public Price AND Cost in v7?
price pricelist
Avatar
0
de març 15
3893
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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