Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
3663 Ansichten

Hi,

I'm trying to create a wizard that is called with a button called "Add Multiple Rows" which is added to the view. 

The wizard is used for populating rows inside a one2many field on parent form. So i tried to achieve this with python / xml but when i call the actual model's method for e.g. "update_lines" from the wizard's button function and set the values to the desired one2many field on parent form everything is ok until this point but if the user clicks DISCARD instead of SAVE the one2many fields lines are still added. The extra lines added from the wizard are not removed.

The reason for that when i set the values on "update_lines" function like;

self.desired_field = [(6, 0 , [old ids and new created ids])] 

or like

self.desired_field = [(0, 0, {'name' : 'test'})]

They both work and add lines to one2many but as i tried to explain before the lines are not removed when user clicks DISCARD.

Any information or trick is much appreciated.

Thanks

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
4
Aug. 20
18004
1
Juni 24
442
0
Juli 22
3700
1
Feb. 16
4867
1
März 15
4727