openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #18751
[Bug 1084947] [NEW] [6.0.4] Wrong object id in Context of subviews
Public bug reported:
Steps to reproduce:
In a database using base_contact module, I inherited the re.partener.job
class to mark the function field as translate=true.
In the web client, when opening a contact from the contact menu, then
open one of the jobs entered for this contact:
The form that opens is a subview of
base_contact.view_partner_contact_form.
In this form, click the translate icon to open the online translator.
The fields values loaded in the translation window are wrong:
I found out with debug_rpc_answer, that the id used to fetch the fields
is the one of the contact (parent form) and not the id of the current
job.
Attempts that failed:
- I have replaced those subviews by genuine views (tree and form) of the res.partner.job object, to no avail. same symptom .
- I have tried to force the active_id(s) in context using the self (?) id, like in example below:
<field name="job_ids" colspan="4" nolabel="1" widget="one2many_list"
context="{'active_ids':[self.id], 'form_view_ref' :
'my_additions.view_partner_job_form_custom','tree_view_ref' :
'my_additions.view_partner_job_tree_custom'}"/>
I meet the exact same problem when marking res.partner.address fields as
translatable with the base_contact.view_partner_form_xxx subview system.
The only way to overcome the problem is creating a direct menu to the
res.partner.job/address object so that active_id in the forms are
correct. But the whole purpose of having hierarchically imbricated view
is lost.
I would suspect the bug being the context passed to subviews that is
wrong.
regards.
Nicolas
** Affects: openobject-server
Importance: Undecided
Status: New
** Tags: context subviews translation
--
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/1084947
Title:
[6.0.4] Wrong object id in Context of subviews
Status in OpenERP Server:
New
Bug description:
Steps to reproduce:
In a database using base_contact module, I inherited the
re.partener.job class to mark the function field as translate=true.
In the web client, when opening a contact from the contact menu, then
open one of the jobs entered for this contact:
The form that opens is a subview of
base_contact.view_partner_contact_form.
In this form, click the translate icon to open the online translator.
The fields values loaded in the translation window are wrong:
I found out with debug_rpc_answer, that the id used to fetch the
fields is the one of the contact (parent form) and not the id of the
current job.
Attempts that failed:
- I have replaced those subviews by genuine views (tree and form) of the res.partner.job object, to no avail. same symptom .
- I have tried to force the active_id(s) in context using the self (?) id, like in example below:
<field name="job_ids" colspan="4" nolabel="1" widget="one2many_list"
context="{'active_ids':[self.id], 'form_view_ref' :
'my_additions.view_partner_job_form_custom','tree_view_ref' :
'my_additions.view_partner_job_tree_custom'}"/>
I meet the exact same problem when marking res.partner.address fields
as translatable with the base_contact.view_partner_form_xxx subview
system.
The only way to overcome the problem is creating a direct menu to the
res.partner.job/address object so that active_id in the forms are
correct. But the whole purpose of having hierarchically imbricated
view is lost.
I would suspect the bug being the context passed to subviews that is
wrong.
regards.
Nicolas
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1084947/+subscriptions
Follow ups
References