add sequence to support category

This commit is contained in:
ivan deng
2017-11-28 22:00:43 +08:00
parent 341ba2d82d
commit 4c3faf59a6
6 changed files with 63 additions and 1 deletions

View File

@@ -58,3 +58,7 @@ class ProductTemplate(models.Model):
if len(self.product_variant_ids) == 1:
self.product_variant_ids.default_code = self.default_code_stored
@api.onchange('categ_id')
def _onchange_cate_id(self):
if self.categ_id and self.categ_id.internal_type:
self.internal_type = self.categ_id.internal_type