1- # Part of Odoo. See LICENSE file for full copyright and licensing details.
21import logging
32from odoo import api , models , _
43from odoo .http import request
@@ -17,6 +16,7 @@ def _cart_update(self, product_id=None, line_id=None,
1716 self .ensure_one ()
1817 product_context = dict (self .env .context )
1918 product_context .setdefault ('lang' , self .sudo ().partner_id .lang )
19+ # BizzAppDev Customization
2020 cfg_product = self .env ['product.product' ].with_context (
2121 product_context
2222 ).browse (int (product_id ))
@@ -28,6 +28,7 @@ def _cart_update(self, product_id=None, line_id=None,
2828 set_qty = set_qty ,
2929 kwargs = kwargs
3030 )
31+ # BizzAppDev Customization End
3132
3233 SaleOrderLineSudo = self .env ['sale.order.line' ].sudo ().\
3334 with_context (product_context )
@@ -85,9 +86,12 @@ def _cart_update(self, product_id=None, line_id=None,
8586 combination = product_template ._get_closest_possible_combination (
8687 received_combination )
8788
89+
90+ # BizzAppDev Customization
8891 # prevent to change variant in cart
8992 # get or create (if dynamic) the correct variant
9093 # product = product_template._create_product_variant(combination)
94+ # BizzAppDev Customization End
9195
9296 if not product :
9397 raise UserError (_ (
@@ -204,6 +208,7 @@ def _cart_update(self, product_id=None, line_id=None,
204208 'quantity' : quantity ,
205209 'date' : order .date_order ,
206210 'pricelist' : order .pricelist_id .id ,
211+ 'force_company' : order .company_id .id ,
207212 })
208213 product = self .env ['product.product' ].with_context (
209214 product_context ).browse (product_id )
0 commit comments