Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Sales
  3. Last Customer Price Update v 17.0
  4. Sales Conditions FAQ

Last Customer Price Update

by Mohamed Yaseen Dahab
Odoo
v 17.0 Third Party 13
Download for v 17.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Point of Sale (point_of_sale)
• Sales (sale_management)
• Discuss (mail)
• Inventory (stock)
• Invoicing (account)
Lines of code 161
Technical Name last_price_update
LicenseLGPL-3
Versions 17.0 18.0 19.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Point of Sale (point_of_sale)
• Sales (sale_management)
• Discuss (mail)
• Inventory (stock)
• Invoicing (account)
Lines of code 161
Technical Name last_price_update
LicenseLGPL-3
Versions 17.0 18.0 19.0

🔄 Last Customer Price Update

One-click button to update Sale Order and POS line prices to the last price charged to the same customer — searches both SO and POS history automatically.

Odoo 17.0 Sales & POS Price History Arabic / English LGPL-3

🎬 Video Demo

Video Demo

📋 Overview

Last Customer Price Update is an Odoo 17 module that adds a "Last Price" button to both Sale Orders and the Point of Sale interface. With one click, it looks up the most recent price charged to the same customer for each product on the order and updates all line prices accordingly.

The module searches across both confirmed Sale Orders and completed POS Orders to find the latest price, ensuring accurate pricing regardless of which channel the customer last purchased from. If no previous order is found for a product, the default Odoo price is kept.

This is especially useful for businesses with repeat customers who negotiate special prices, wholesale buyers, or any scenario where consistency in customer-specific pricing matters.

Screenshot Overview

⭐ Key Features

  • ✓ Sale Order Button: "آخر سعر / Last Price" header button updates all SO line prices in one click
  • ✓ POS Button: "Last Price" control button on the POS Product Screen updates current order lines
  • ✓ Cross-Channel Search: Finds prices from both Sale Orders and POS Orders — picks the most recent
  • ✓ Customer-Specific: Prices are matched per customer + product combination
  • ✓ Safe Fallback: If no previous price is found for a product, the default price is kept unchanged
  • ✓ Confirmation Dialog: SO button asks for confirmation before updating to prevent accidental changes
  • ✓ Manual Price Lock: In POS, updated prices are marked as "manual" so pricelists don't override them
  • ✓ Arabic / English: Bilingual labels and error messages (Arabic + English)
  • ✓ Draft & Sent Only: SO button is only visible on Draft and Sent quotations — not confirmed orders
  • ✓ Smart Exclusion: When updating a SO, the current order is excluded from the price search

⚡ How It Works

When the button is clicked, the module performs a two-source search for each product on the order, picking the most recent price:

👤 Customer Selected
Partner is set on order
→ 🔍 Search SO + POS
Find last price per product
→ 📅 Pick Most Recent
Compare dates, pick latest
→ ✅ Update Prices
All lines updated at once

Price Search Logic

Source Criteria States Searched
Sale Orders Same partner + same product, ordered by create_date desc sale, done (confirmed & locked)
POS Orders Same partner + same product, ordered by create_date desc paid, done, invoiced
ℹ️
Most recent wins: If a customer bought "Widget" via POS on Jan 15 at $10 and via a Sale Order on Jan 20 at $12, the price used will be $12 (the more recent one).

📥 Installation

Requirements

Requirement Details
Odoo Version 17.0 (Community & Enterprise)
Depends On sale_management, point_of_sale
Python Libraries None (standard Odoo only)
License LGPL-3

Steps

1 Upload the module
Copy the last_price_update folder into your Odoo addons directory (e.g. /mnt/extra-addons/).
2 Update app list
Go to Apps → Update Apps List
3 Install the module
Search for "Last Customer Price Update" and click Install.
4 Clear browser cache
Press Ctrl+Shift+R to load the POS button assets.

📝 Usage: Sale Orders

1 Open or create a Sale Order (must be in Draft or Sent state).
2 Make sure a Customer is selected on the order.
3 Add products to the order lines as usual.
4 Click the 📜 آخر سعر / Last Price button in the header bar.
5 A confirmation dialog appears: "Update all line prices to the last price for this customer?". Click OK.
6 All order line prices are updated to the last price found. Lines with no history keep their original price.
⚠️
Button visibility: The button only appears when the order is in Draft or Sent state. Once confirmed, the button is hidden to prevent unintended changes.

🛒 Usage: Point of Sale

1 Open Point of Sale and start or resume a session.
2 Select a Customer on the current order.
3 Add products to the order.
4 Click the 🕐 آخر سعر / Last Price control button.
(Button turns yellow/warning when a customer is selected, grey otherwise)
5 All order line prices are updated via an RPC call to the server. Prices are locked as "manual" so pricelists won't override them on quantity changes.
💡
Visual cue: The POS button appears as grey when no customer is selected and turns yellow (warning) once a customer is set — reminding the cashier that last-price lookup is available.

🚨 Error Messages

The module provides clear bilingual feedback in both contexts:

Scenario Message Where
No customer selected "Please select a customer first. / يرجى اختيار العميل أولاً" SO & POS
No price history found "No previous prices found for this customer. / لم يتم العثور على أسعار سابقة لهذا العميل" SO & POS

❓ Frequently Asked Questions

Does it search POS orders, Sale Orders, or both?

Both. The module searches confirmed Sale Orders (sale/done) and completed POS Orders (paid/done/invoiced), then picks the one with the most recent date.

What happens if a product has no previous price for this customer?

The product's line price is left unchanged — the default Odoo price (from pricelist or product) stays. Only lines with a match in history are updated.

Will the pricelist override the updated price in POS?

No. When the price is updated in POS, the line's price_type is set to "manual", which prevents Odoo from recalculating it when the quantity changes.

Does the current order's price get included in the search?

No. When updating a Sale Order, the current SO is excluded from the search (via exclude_so_id) to avoid self-referencing.

Why don't I see the button on a confirmed Sale Order?

By design, the button is only visible on Draft and Sent quotations. Once confirmed, the order is locked and the button is hidden to prevent accidental price changes.

The POS button is grey / doesn't work

The button requires a customer to be selected on the POS order. Once you set a customer, the button turns yellow and becomes active. If still not working, clear browser cache (Ctrl+Shift+R) and restart the POS session.

🤝 Support

For questions, bug reports, or feature requests, please contact the module developer:

WhatsApp +20 100 780 2335
Email mohamed.yaseen.dahab@gmail.com
💡
Upgrade command:
./odoo-bin -u last_price_update -d your_database
Always clear browser cache and restart POS sessions after upgrading.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with