← Back to team overview

openerp-community-reviewer team mailing list archive

[Bug 1247158] Re: [6.1, 7.0, trunk] Context is not propagated when writing translation on 'source' fields

 

** Changed in: openobject-server
    Milestone: None => 7.0

-- 
You received this bug notification because you are a member of OpenERP
Community Backports Team, which is a bug assignee.
https://bugs.launchpad.net/bugs/1247158

Title:
  [6.1,7.0,trunk] Context is not propagated when writing translation on
  'source' fields

Status in OpenERP Community Backports (Server):
  Fix Released
Status in OpenERP Community Backports (Server) 7.0 series:
  Fix Released
Status in OpenERP Server:
  Fix Released

Bug description:
  In openerp.osv.orm.BaseModel.write():

  When we do a write on a record for a translation and a translation we are writing is empty in the 'source' translation, the ORM will write that value on the record (for en_US):
  http://bazaar.launchpad.net/~openerp/openobject-server/7.0/view/head:/openerp/osv/orm.py#L4163

  Precisely, the write is here: http://bazaar.launchpad.net/~openerp
  /openobject-server/7.0/view/head:/openerp/osv/orm.py#L4171

  This call to write() isn't propagating the context, meaning that any
  special key in the context will be lost in the calls chain.

  The context needs to be propagated, with the 'lang' key forced to the
  default language, that is: en_US.

  I'll propose a merge.

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