How to prevent some specific users from making changes in price of product in point of sale? Every user is not allowed to change product price.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kirjanpito
- Varastointi
- PoS
- Project
- MRP
Tämä kysymys on merkitty
1
Vastaa
4577
Näkymät
Hi,
try this, post here if you find any other easy solution :
function field called permissions. group called fellow add those users into this group to whom you want field price as readonly.
def _check_permissions(self, cr, uid, ids, field_name, arg, context):
res = {}
formid = ids[0]
group_obj = self.pool.get('res.groups')
group_ids = group_obj.search(cr, uid, [('name','=', 'Fellow')])
group_obj = group_obj.browse(cr, uid, group_ids)
group_users = len(fellow[0].users)
i = 0
while i < group_users :
if group_obj[0].users[i].id == uid :
res[formid] = True
i = i + 1
return res
'permissions': fields.function(_check_permissions, type='char', method=True, string="Permissions"),
'price': fields.float('Price'),
<field name="permissions" invisible="1"/>
<field name="price" attrs="{'readonly':[('permissions','=',True)]}"/>
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
|
2
syysk. 19
|
4392 | ||
|
0
lokak. 18
|
2297 | ||
|
0
heinäk. 24
|
824 | ||
|
0
toukok. 19
|
3582 | ||
|
0
helmik. 18
|
2246 |