Skip to Content
Menu
This question has been flagged
1 Reply
2629 Views

I don't want billing user to invoice backdate or use future date.

**** I am not a programmer so i don't understand coding****

Avatar
Discard
Best Answer

In Odoo Enterprise you can use Odoo Studio to limit which users can see a field. 

Otherwise you need to create a simple Extension View.  It's not really programming, but you need to understand something about how Odoo works.  For your reference, this is how to do it in Odoo 12:



Architecture

<data>
  <xpath expr="//field[@name='date_invoice']" position="attributes">
    <attribute name="groups">account.group_account_user</attribute>
  </xpath>
</data>

This would only allow a user with the Accountant role to view / change the invoice date. 

By the way, it's different in Odoo 13, but the principle is the same.

Avatar
Discard
Author

Hi, thanks for helping.

but sadly it does not work in odoo 13

I did say that it's different in Odoo 13 (it's because Odoo changed the database structure). Here's a guide to doing it in Odoo 13 CE: https://odootricks.tips/making-a-field-invisible/#13ce

Author

Thanks! It worked!