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
    • Estate 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
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

I want to hide the button "CREATE INVOICE" on a Sales Order. How can I do this?

Subscribe

Get notified when there's activity on this post

This question has been flagged
5 Replies
6052 Views
Avatar
Community Question

I don't want Salespeople making Invoices, I have a team that reviews their work and they may ask the Salespeople to make corrections before the Invoice can be made.

0
Avatar
Discard
Sehrish

Checkout these odoo customization tips:

https://goo.gl/8HgnCF

Avatar
Ray Carnes (ray)
Best Answer

You might not have to.

If you separate the jobs "sell it" and "charge for it" then the simplest way to do this is to give the "seller" and the "charger" a clean and quick way to work together.

What if the seller could click ONE button to let the CHARGER know it was time to do their job?

We added the CREATE INVOICE button on the same screen that the SELLER works on for a very good reason: in one click, they can finish their job (SELL IT) and notify the next person (the CHARGER) that they have work to do.  This is because a draft Invoice will show up in the list of Invoices that the next person looks at all day long.

I typically hear this question A LOT and when I ask "Why do you want that?" I hear a variety of common answers:

  • Our salespeople make mistakes, and we don't want Invoices in Accounting until someone has checked their work.

  • We have a team to "validate" the information on the Sales Order is correct and matches the contract we have with the Customer and THEY are the ones who should be creating the Invoices.

  • Nobody in Sales should be able to affect the books - they are not Accountants or Book Keepers and we don't want them anywhere near them.

These are all problems in systems that are NOT Odoo and have been used BEFORE Odoo.

This is the "solving problems we have on Earth, when we just need to get to Mars and find out the problems we REALLY have to deal with THERE" fallacy.

These problems happened in the past:

  • Invoices with mistakes due to mistakes on Sales Orders went to Customers

  • Invoices with mistakes due to not cross-checking the Contract with the Order went to Customers

  • Invoices were made by people who didn't have Accounting knowledge and messed up the books

It is natural to have concerns about them.  "How do we make sure this doesn't happen in Odoo???" is the perspective many people come from.

WHAT IF THESE PROBLEMS DIDN'T HAPPEN IN ODOO?

What if the seller could click ONE button to let the CHARGER know it was time to do their job?  What if any mistakes with the Sales Order could be corrected BEFORE the Invoice was sent to the Customer? What if the Contract could still be cross-checked with the Sales Order BEFORE the Invoice was sent to the Customer?

If you are still reading, you will notice we now have THREE teams involved:  the "SELLER", the "CHECKER" and the "CHARGER".

Keep the Button!!!!!!!

The "Seller" finishes work with a SINGLE CLICK that tells the "Checker" that it is their turn.  The Invoice that they create is a DRAFT and does NOT affect Accounting yet. 

The "Checker" starts work and can CANCEL the Invoice and ask the "Seller" to fix the problem, and ask the "Seller" to click ONCE (CREATE INVOICE button) the next time the "Checker" should be involved.

The "Checker" VALIDATES the Invoice once there are no mistakes on the Sales Order and the Contact has been cross-referenced.  (They do this with another SINGLE click).

The "Charger" then prints or sends the Invoice - they just look for Invoices "not sent" which is another two clicks.  Even if they notice any mistakes, they simply RESET TO DRAFT and change the Invoice to correct it.

My point:  Be careful jumping in and "fixing" problems that aren't really there.  About 75% of the time I find out that the button doesn't really need to be hidden.  In the 25% of cases that it does, you just (wait for it) CLICK on a screen related to Access Controls to prevent people in certain groups (salespeople) from having permission to CREATE an Invoice.  Then, when they click the button they get an error.

It is NOT hard to hide the button. It can be done by creating two inherited views - one to hide the button and one to show it based on group membership.

BUT - every change adds cost (cost to implement, potentially cost to upgrade - even if it is just a delay during migration testing to make sure the button still works the same way), risk (will it affect other things, are you accidentally taking tools away that could be useful to users on Mars) and makes it harder to leverage the awesome training resources that we have at odoo.com/slides (since you don't want users to say "but our Odoo doesn't have that button!!!!").

2
Avatar
Discard
Avatar
Aman Prakash
Best Answer

Hello There,

You can update the attributes of this field.

<field name="fieldname" attrs="{'invisible': domain}"/>

domain -> It will contain the conditions on which this button will be shown.

Thanks,

Aman Prakash (Associate Software Engineer)

Webkul Software Pvt. Ltd.

2
Avatar
Discard
Ray Carnes (ray)

Excellent. This is the way you hide the button if you really want it hidden. Using conditions if you want it hidden for some people but not others.

Avatar
Dinesh Kumar
Best Answer

Hi,

Instead of attributes you can also use groups to control the button visibility, so that button is only visible to the particular group, which you have mentioned.

Create a new group for your team and add the group name to the button by inheriting the form.

For Example :

 <button name="create_invoice" string="CREATE INVOICE" type="object" class="btn-primary" groups="module.your_group_name"/>

In this example "CREATE INVOICE" button is visible only to the assigned groups.

Thanks.


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

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

Sign up
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
الْعَرَبيّة 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 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

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