variant.py 669 B

1234567891011121314
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo import http
  4. from odoo.addons.website_sale.controllers.variant import WebsiteSaleVariantController
  5. class WebsiteSaleStockVariantController(WebsiteSaleVariantController):
  6. @http.route()
  7. def get_combination_info_website(self, product_template_id, product_id, combination, add_qty, **kw):
  8. kw['context'] = kw.get('context', {})
  9. kw['context'].update(website_sale_stock_get_quantity=True)
  10. return super(WebsiteSaleStockVariantController, self).get_combination_info_website(product_template_id, product_id, combination, add_qty, **kw)