Comment 4 for bug 785582

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

The problem needs to fixed from addons itself. the reason is in web its working because web client saves the parent record prior to saving the O2M so when you add a record in O2M and click save&close it will directly save the record in the DB. Where as GTK does not follow this trend instead it saves the O2M in the client and only saves the O2M to DB when the Parent is saved. So here in Form view the "name" field has attrs applied which makes it readonly True and required False when the key is in ['line','break], but when you press Save&close the O2M record is saved internally and the view is switch back to 'list" now as the list view does not have the attrs applied on "name" field so when you save the parent record the "name" field is still required and left empty. To fix the issue the "name" field needs to have the same attrs on list view too.
i.e attrs="{'readonly':[('layout_type','in',('line','break'))], 'required':[('layout_type', 'not in', ['line','break'])] }"/> on list view in name field.

@ community Team: can please reassign the bug to addons3 team to get it fixed.

Thanks,