context not passed in one2many fields or many2many fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
OpenERP Publisher's Warranty Team |
Bug Description
Steps to reproduce:
1. install the attached opw_addon module
2. connect to the web interface of your instance, go to Settings and click on Modules -> Test
3. click on the line "Model1"
Expected result:
A form view of Test Model with a single line, the line having Name = Line1 and Reproduce Bug = "1: new key value"
Actual result:
An error message with a stack trace saying that "new_key" is not in context.
Analysis:
The 'new_key' context value is passed in the view, but it is not visible to the web client.
This branch: https:/
Steps to reproduce bug #2:
1. install the patch on the branch mentioned above, and restart the instance
2. in the web interface, go to Settings and click on Modules -> Partners
3. Click on the line "Agrolait"
Expected result:
the Agrolait partner is displayed
Actual result:
A message saying "Uncaught Error: NameError: name 'supplier' is not defined" is displayed.
Clicking on OK will display the Agrolait partner, but the contacts kanban view is empty.
If I unapply the webclient patch, the res.partner view works fine.
If I edit the view "view_partner_form" and apply the following patch, the view (with the webclient patch) works again, but this probably breaks other things:
=== modified file 'openerp/
--- openerp/
+++ openerp/
@@ -186,7 +186,7 @@
- <field name="child_ids" mode="kanban" context=
+ <field name="child_ids" mode="kanban" context=
(This patch removes the 'default_supplier' entry from the context dictionary)
If I unapply the webclient patch, the res.partner view works fine (which is to be expected, as the context is not passed to the field without the webclient patch).
Related branches
- Alexandre Fayolle - camptocamp (community): Approve (code review, test)
- OpenERP Core Team: Pending requested
-
Diff: 25 lines (+2/-2)2 files modifiedaddons/web/static/src/js/data.js (+1/-1)
addons/web/static/src/js/view_form.js (+1/-1)
Changed in openerp-web: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
Changed in openerp-web: | |
status: | New → Fix Committed |
Changed in openerp-web: | |
status: | Fix Committed → Fix Released |
the code of the addon mentionned in the bug report.