← Back to team overview

openerp-india team mailing list archive

[Bug 921390] Re: on save readonly elements (populated via default_get method) are not saved

 

*** This bug is a duplicate of bug 378824 ***
    https://bugs.launchpad.net/bugs/378824

It's a design decision, and it has not been decided to change it so far. Read-only fields are meant for information purpose and are not used to transfer actual data, so developers must not rely on them for persisting field values.
There are many workarounds for doing it (e.g. using a second invisible field), but this is generally seen as a bad pattern.

** Changed in: openobject-server
   Importance: Low => Wishlist

** Changed in: openobject-server
       Status: Confirmed => Won't Fix

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/921390

Title:
  on save readonly elements (populated via default_get method) are not
  saved

Status in OpenERP Server:
  Won't Fix

Bug description:
  I have custom entity with o2m on res.partner and when I am on the
  res.partner view and create a new record for the custom entity, I use
  default_get method to populate certain fields ( don't want the user to
  modify them but want them to be displayed to the user) and keep them
  readonly.

  The field gets stored in the buffer as it show up on the tree view
  when I say save on the child form. But when I hit save on the main
  res.partner form, the value dis-appears. I did a debug_rpc_answer to
  check and it seems the UI is dropping it at the save time.

  Can this be fixed?

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/921390/+subscriptions