Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openobject-client-web/6.0-opw-576387-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-576387-msh/+merge/114116
Hello,
Fixed the issue of readonly one2many which becomes editable when you press
create button of another one2many which is editable.
Demo :- To generate this issue create one one2many which has one or more
one2many editable as well as one or more one2many readonly, in product view
there is a one2many supplier_info which has one2many pricelist, so to generate
I have added one another one2many in supplier_into which is readonly, now there
are two one2many inside supplier_info one2many, 1. pricelist 2. newly
added(readonly).
Now just clicking on new button of pricelist, you will see the newly added
one2many also have the new button enable.
Reason :- The one2many should be enable or disable based on readonly attrs,
what here in the code we had check whether parent record has id, which is wrong
because parent record will always have id in 6.0 because when we open one2many
parent record is saved.
So just removed that part of code, we already have checked readonly attrs.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-576387-msh/+merge/114116
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/6.0-opw-576387-msh.
=== modified file 'addons/openerp/widgets/form/_o2m.py'
--- addons/openerp/widgets/form/_o2m.py 2012-04-07 10:19:09 +0000
+++ addons/openerp/widgets/form/_o2m.py 2012-07-10 07:41:33 +0000
@@ -216,9 +216,6 @@
if 'default_name' in current.context:
del current.context['default_name']
- if self.view_type == 'tree' and pparams:
- self.editable = bool(pparams.id)
-
self.screen = Screen(current, prefix=self.name, views_preloaded=view,
editable=self.editable, readonly=self.readonly,
selectable=0, nolinks=self.link, _o2m=1)
_______________________________________________
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