Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
3588 Widoki

Hi !

I'm looking for the correct group name to hide menu item "create invoice" button!
I'v tried to add a "group= " in the button field. 
It works and I can hide for everyone, but I want to restrict the access only to admin or better to the "sale administrator" group or to a custom group I've created : "sale accountant"

My last try was this, but not working :

<button name="%(sale.action_view_sale_advance_payment_inv)d" string="Create Invoice"

                        group="sale.order.manager"

                        type="action" context="{'default_advance_payment_method': 'percentage'}"

                        attrs="{'invisible': ['|',('invoice_status', '!=', 'no'), ('state', '!=', 'sale')]}"/>


does anyone has already done that ?


Thanks in advance


Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

Seems you are facing issue to find the external id of the groups, for this what you have to do is  that activate the developer mode from the settings and navigate to Settings -> Users & Companies -> Groups, search for the group and open it.

Then click on the debugger button at the top right of the screen, near logged in user name, click on View Meta Data


Then from the next pop up, you can get the external id of this group.


So the group name for the Sales Administrator is: sales_team.group_sale_manager

If the groups are created from the user interface, it will not have external ID, in such cases, you can generate the external id by exporting the record one time.


Reference:

  1. Activate Developer Mode in Odoo

  2. How To Find External ID Of Records in Odoo

     3. How To Generate External ID For The Records Created From User Interface Odoo


Thanks

Awatar
Odrzuć
Autor Najlepsza odpowiedź

Hey many thanks !!
Will try this !

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
maj 22
1888
0
sty 21
2282
2
maj 19
5310
3
sie 20
4371
1
gru 20
5218