GTK client is not sending readonly fields of newly created objects using one2many widget

Bug #939493 reported by Carlos Sierra Andrés
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

If you have an object with a one2many relation whose objects have readonly fields, if you have a view for the first object type and use the one2many_widget to populate objects of the second type then the readonly fields of the second type objects (the ones created through the one2many_widget) are not sent to the server.

If you create objects of the second type in their views when you save all the fields are sent, even readonly ones with their default or calculated values. This is not the case when you create these objects from the one2many_widget in other object.

When you use the one2many_widget all data is sent when you finish and save the first object (the one holding the relation) but when related objects are sent to the server the info of the readonly fields is not sent and may cause those objects to not be initialized properly.

This is the case when you try to create a one2many view for the attachments of an object. You can't associate a new attachment correctly (even using context default values) because when you save the object with the attachments to update the relations fields res_model and res_id are not sent for the newly created attachments. if you change the fields of ir.attachment to readonly=False then they are sent when you create new attachments and everything works like charm.

summary: - GTK client is not sending reanonly fileds of newly created objects using
+ GTK client is not sending readonly fields of newly created objects using
one2many widget
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.