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

I'm new to openerp and using OpenERP v7

I'm creating a module with a workflow concerning 2 departments. I want to display the approve and reject buttons only to the managers and they should be able to see it only when it reaches for their approval or rejection stage.

How can i do this?

Thanks

Awatar
Odrzuć
Najlepsza odpowiedź

You only have to add a tag to your buttons in the xml view:

<button name="%(stock.action_view_stock_inventory_line_split)d"
                        string="Split inventory lines" groups="stock.group_inventory_valuation"
                        type="action" icon="gtk-justify-fill"/>

for example this only gives access to that group to see that button. Just add the group tag, you can see examples on the code.

Awatar
Odrzuć
Autor

Thanks for the reply but not exactly what i want. I'll give an example. Suppose there are two departments D1 and D2 and employee E1 wants to transfer from D1 to D2. He would need approval from both Managers M1 and M2 of the departments repectively. So when th M1 hasn't approved M2 shouldn't be able to view the approve button so i can;t just put a group because the manager would differ on a case to case basis, hope that makes it more clearer what i want

Powiązane posty Odpowiedzi Widoki Czynność
3
cze 21
11178
4
lip 15
3776
0
mar 15
6275
1
sie 25
80
2
lip 25
395