Skip to Content
Menu
This question has been flagged
5 Replies
4685 Views

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.

Avatar
Discard

Checkout these odoo customization tips:

https://goo.gl/8HgnCF

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!!!!").

Avatar
Discard
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.

Avatar
Discard

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.

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.


Avatar
Discard