openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #02562
Re: [Bug 1247158] Re: [6.1, 7.0, trunk] Context is not propagated when writing translation on 'source' fields
Hello, that's alright for me. Thank!
Le 26 déc. 2013 11:35, "Martin Trigaux (OpenERP)" <mat@xxxxxxxxxxx> a écrit
:
> Hello Guewen,
>
> I would prefer the 'lang' key to be set at False instead of en_US. This
> would have the same result but using less openerp magic (en_US being the
> default language in openerp).
> Is that ok with you ?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> 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:
> Confirmed
>
> 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
>
--
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 Committed
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
References