← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 881974] [NEW] OpenERP can not save the readonly field in sale order

 

Public bug reported:

Salam ,

In a sale order  line, I try to make price_unit  readonly for certain group , so to do this :
1-  I created 2 groups : Sales / Readonly price unit   & Sales / Write price unit
2- I used fields_get to redfine rights access like this :
  if group.name == 'Sales / Readonly price unit':
                        res[field].setdefault('states', {})
                        res[field]['states']['draft'] = [('readonly', False)]
                        
                    if group.name == 'Sales / Write price unit':
                        res[field].setdefault('states', {})
                        res[field]['states']['draft'] = [('readonly', False)]

Everything works fine except that by recording the sale order the unit
price is set by default to 0.00 for users who have the readonly group.

Thanks for your help

** Affects: fleetmanager
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/881974

Title:
  OpenERP can not save the readonly field in sale order

Status in Fleet Manager for Open ERP(Open Object):
  New

Bug description:
  Salam ,

  In a sale order  line, I try to make price_unit  readonly for certain group , so to do this :
  1-  I created 2 groups : Sales / Readonly price unit   & Sales / Write price unit
  2- I used fields_get to redfine rights access like this :
    if group.name == 'Sales / Readonly price unit':
                          res[field].setdefault('states', {})
                          res[field]['states']['draft'] = [('readonly', False)]
                          
                      if group.name == 'Sales / Write price unit':
                          res[field].setdefault('states', {})
                          res[field]['states']['draft'] = [('readonly', False)]

  Everything works fine except that by recording the sale order the unit
  price is set by default to 0.00 for users who have the readonly group.

  Thanks for your help

To manage notifications about this bug go to:
https://bugs.launchpad.net/fleetmanager/+bug/881974/+subscriptions


Follow ups

References