Xavier ALT (OpenERP) has proposed merging 
lp:~openerp-dev/openerp-web/6.1-opw-573269-xal into lp:openerp-web/6.1.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-573269-xal/+merge/102332

Hi,

When using button inside FormOpenPopup, change done by the call_button are not 
reflected into the "popup" not to the real record - we need to force reloading 
of data after every button call.

Steps:
1. After installing stock, Go to the Incoming Shippments menu.
2. Select any picking which will have stock moves (o2m).
3. Open stock moves (o2m) from that picking
4. Click on the buttons appear on that view like 'Cancel', 'Cancel 
availability'.

Current: Status field doesn't change
Excpected: Status field should change to 'Cancelled' ('Cancel' button), 'Not 
Available' ('Cancel availibity' button).

-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-573269-xal/+merge/102332
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1-opw-573269-xal.
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js	2012-03-05 19:58:00 +0000
+++ addons/web/static/src/js/view_form.js	2012-04-17 15:23:39 +0000
@@ -2593,6 +2593,11 @@
             form_view_options: {'not_interactible_on_create':true},
             readonly: self.o2m.is_readonly()
         });
+        pop.dataset.call_button = function() {
+            var button_result = self.o2m.dataset.call_button.apply(self.o2m.dataset, arguments);
+            self.o2m.reload_current_view();
+            return button_result;
+        }
         pop.on_write.add(function(id, data) {
             self.o2m.dataset.write(id, data, {}, function(r) {
                 self.o2m.reload_current_view();

_______________________________________________
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

Reply via email to