Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
2224 Näkymät

I want to avoid specific Group Visibility of a Sale Order, based on a SO field. 

But i can still see all sales orders because a record rule in Timesheet / User group.

If a remove that record rule, i can´t add timesheet lines.

I need that Users that are designed as "Project Manager"(Studio field) in a SO, can see that SO.

Odoo v11 SaaS

Avatar
Hylkää
Tekijä Paras vastaus

Sorry, this not working for me. 

I need do it by Record Rules. 

I want that users in a specific group, can view only their Sales Order. 

But if a put a record rule: OBJECT = SALES ORDER, DOMAIN = [('x_sorder_pm.user_id', '=',user.id)]
Then this user can´t write timesheets in all projects, only in that where the x_order_pm field = user.id

Avatar
Hylkää
Paras vastaus

Create custom group in sale order, and go to sale_order view form,then give attrs = "{invisible:[field_name == 'something']}"

example :

<button class="oe_stat_button" type="object" attrs="{'invisible': ['|', ('sale_order_count', '=', 0), ('type', '=', 'lead')]}"

        ////////

</button>

Note : I give example for button,you try in menuitem.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
tammik. 24
3189
0
tammik. 24
1522
2
elok. 22
2647
0
jouluk. 20
2078
1
syysk. 19
4851