[FIX] sale_stock: failing sale_stock.tour according to the modules installed

The `sale_stock.tour` failed in the case the admin was not
part of the group
`product.group_stock_packaging`
or the group
`sale.group_mrp_properties`

because then the sale order was working with the editable list,
which does not open a dialog,
while the test was relying on the dialog to be opened,
in order to close it.

The fix is simply to pass the fact to close the dialog if
there is none.

opw-779308
This commit is contained in:
Denis Ledoux
2017-11-03 12:51:09 +01:00
parent aaa7566141
commit 8360daa057
+3 -1
View File
@@ -20,7 +20,9 @@ odoo.define("sale_stock.tour", function (require) {
auto: true,
in_modal: false,
run: function (actions) {
actions.auto(".modal-footer .btn-primary");
if ($('.modal-footer .btn-primary').length){
actions.auto(".modal-footer .btn-primary");
}
},
});
});