diff options
Diffstat (limited to 'indoteknik_api/models/product_template.py')
| -rw-r--r-- | indoteknik_api/models/product_template.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indoteknik_api/models/product_template.py b/indoteknik_api/models/product_template.py index 0cbf605f..aa35d922 100644 --- a/indoteknik_api/models/product_template.py +++ b/indoteknik_api/models/product_template.py @@ -16,6 +16,7 @@ class ProductTemplate(models.Model): 'lowest_price': self.env['product.pricelist'].get_lowest_product_variant_price(product_template, product_pricelist_default), 'variant_total': len(product_template.product_variant_ids), 'stock_total': product_template.qty_stock_vendor, + 'weight': product_template.weight, 'manufacture': self.api_manufacture(product_template), 'categories': self.api_categories(product_template), } @@ -29,9 +30,10 @@ class ProductTemplate(models.Model): detail_data['variants'].append({ 'id': variant.id, 'code': variant.default_code or '', - 'name': variant.name, + 'name': variant.display_name, 'price': self.env['product.pricelist'].compute_price(product_pricelist_default, variant.id), - 'stock': variant.qty_stock_vendor + 'stock': variant.qty_stock_vendor, + 'weight': variant.weight, }) data.update(detail_data) return data |
