Do not fail to open product category to add products without any categories
(grafted from 72db56e056c39546a146bf57b60246428ed79f6c) --HG-- branch : 7.0
This commit is contained in:
1 parent
94ab53a27f
commit
2c8e0256cd
1 file changed
+2
-2
@@ -32,9 +32,9 @@ class Category(tree(separator=' / '), ModelSQL, ModelView):
|
||||
@ModelView.button_action('product.act_category_product')
|
||||
def add_products(cls, categories):
|
||||
return {
|
||||
'res_id': [categories[0].id],
|
||||
'res_id': [categories[0].id if categories else None],
|
||||
'pyson_domain': PYSONEncoder().encode(
|
||||
[('id', '=', categories[0].id)]),
|
||||
[('id', '=', categories[0].id if categories else None)]),
|
||||
}
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in new issue
Block a user