Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openobject-client-web/6.0-opw-573729-msh into
lp:openobject-client-web.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-573729-msh/+merge/101702
Hello,
Fixed the issue of ids not passed in on_change of one2many.
Demo :- Purchase Order -> Edit any existing record when you trigger on_change
say for e.g "onchange_partner_id", this method will receive id of current
record, but when you open any existing record of one2many of purchase order
line and trigger the "product_id_change" so you will see the method will not
get the current id of record in ids in product_id_change method of purchase.py.
Reason is that we have set the id of ctx(line no. 1090 of webclient -> addons
-> openerp -> controllers -> form.py) but when you open one2many the id will
come in pctx that is ctx['parent'].
Hence changed the code to fix the issue.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-573729-msh/+merge/101702
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/6.0-opw-573729-msh.
=== modified file 'addons/openerp/controllers/form.py'
--- addons/openerp/controllers/form.py 2012-03-20 12:19:28 +0000
+++ addons/openerp/controllers/form.py 2012-04-12 09:43:18 +0000
@@ -1087,7 +1087,7 @@
proxy = rpc.RPCProxy(model)
- ids = ctx.id and [ctx.id] or []
+ ids = ctx.id and [ctx.id] or ctx.parent.id or []
try:
response = getattr(proxy, func_name)(ids, *args)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp