hunk.code_window:             pricelist_id = force_pricelist
               request.session['website_sale_current_pl'] = pricelist_id
               update_pricelist = True
           # create so if needed
           if not sale_order and (force_create or code):
               # TODO cache partner_id session
               affiliate_id = request.session.get('affiliate_id')
               if self.env['res.users'].sudo().browse(affiliate_id).exists():
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit:         if not self._context.get('pricelist'):
               self = self.with_context(pricelist=pricelist_id)
           # Test validity of the sale_order_id
           sale_order = self.env['sale.order'].sudo().browse(sale_order_id).exists() if sale_order_id else None
  
hunk.file_path: addons/website_sale/models/sale_order.py
hunk.type: add
file: # -*- coding: utf-8 -*-
  import models
  