Skip to content

Commit

Permalink
fix depends
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-demeyer committed Jun 2, 2019
1 parent 809ad88 commit ef95c00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion product_classification/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

{
'name': 'Product Classification',
'version': '11.0.1.1.0',
'version': '11.0.1.2.0',
'license': 'AGPL-3',
'author': 'Noviat',
'website': 'http://www.noviat.com',
'category': 'Product Management',
'depends': [
'product',
'sale',
],
'data': [
'security/ir.model.access.csv',
Expand Down
12 changes: 12 additions & 0 deletions product_classification/models/product_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ def _get_complete_name(self, cl):
else:
parent_path = ''
return parent_path + cl.name

@api.multi
def get_product_tmpls_recursively(self):
"""
Returns all product.template records belonging to this
classification or its children.
"""
self.ensure_one()
res = self.product_tmpl_ids
for classif in self.child_ids:
res |= classif.get_product_tmpls_recursively()
return res

0 comments on commit ef95c00

Please sign in to comment.