From 75f79bd4c45dd54907f8fc31f15c5fe19763aac4 Mon Sep 17 00:00:00 2001
From: Nicolas Martinelli <nim@odoo.com>
Date: Thu, 27 Aug 2015 12:08:06 +0200
Subject: [PATCH] [IMP] point_of_sale: adaptation due to the new Sale module

Major changes:
- No use of UoS anymore

Reason: complete rewrite of the Sale module.

Responsible: fp, dbo, nim
---
 addons/point_of_sale/point_of_sale.py        | 3 ---
 addons/point_of_sale/static/src/js/models.js | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py
index c6f5fe3089be..cf8c9b33b9ca 100644
--- a/addons/point_of_sale/point_of_sale.py
+++ b/addons/point_of_sale/point_of_sale.py
@@ -939,7 +939,6 @@ class pos_order(osv.osv):
                     'company_id': order.company_id.id,
                     'move_type': 'direct',
                     'note': order.note or "",
-                    'invoice_state': 'none',
                     'location_id': location_id,
                     'location_dest_id': destination_id,
                 }, context=context)
@@ -953,11 +952,9 @@ class pos_order(osv.osv):
                 move_list.append(move_obj.create(cr, uid, {
                     'name': line.name,
                     'product_uom': line.product_id.uom_id.id,
-                    'product_uos': line.product_id.uom_id.id,
                     'picking_id': picking_id,
                     'picking_type_id': picking_type.id, 
                     'product_id': line.product_id.id,
-                    'product_uos_qty': abs(line.qty),
                     'product_uom_qty': abs(line.qty),
                     'state': 'draft',
                     'location_id': location_id if line.qty >= 0 else destination_id,
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 0891ed037c53..543e47c81284 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -315,7 +315,7 @@ exports.PosModel = Backbone.Model.extend({
     },{
         model:  'product.product',
         fields: ['display_name', 'list_price','price','pos_categ_id', 'taxes_id', 'barcode', 'default_code', 
-                 'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description',
+                 'to_weight', 'uom_id', 'description_sale', 'description',
                  'product_tmpl_id'],
         order:  ['sequence','name'],
         domain: [['sale_ok','=',true],['available_in_pos','=',true]],
-- 
GitLab