From 5fc48ab9ef97e6a2403dd8e3033e2e0966ce547d Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Mon, 17 May 2010 14:14:20 +0530 Subject: [PATCH] [IMP] point_of_sale:improve the view of point_of_sale and fix the problem of Sale Confirm wizard bzr revid: sbh@tinyerp.com-20100517084420-or26a2xz7w4pnd6z --- addons/point_of_sale/pos.py | 4 +++- addons/point_of_sale/pos_view.xml | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index 7a8d64899fa..981d20077d3 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -349,6 +349,7 @@ class pos_order(osv.osv): return False _defaults = { + 'user_salesman_id':lambda self, cr, uid, context: uid, 'user_id': lambda self, cr, uid, context: uid, 'sale_manager': lambda self, cr, uid, context: uid, 'state': lambda *a: 'draft', @@ -773,7 +774,8 @@ class pos_order(osv.osv): comp_id=comp_id and comp_id.id or False to_reconcile = [] group_tax = {} - account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context) + account_def = property_obj.get(cr, uid, 'property_account_receivable', 'res.partner', context=context).id + order_account = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def or curr_c.account_receivable.id # Create an entry for the sale diff --git a/addons/point_of_sale/pos_view.xml b/addons/point_of_sale/pos_view.xml index be838e1e11e..dace921596b 100644 --- a/addons/point_of_sale/pos_view.xml +++ b/addons/point_of_sale/pos_view.xml @@ -8,18 +8,19 @@ form
- - - - - - - + + + + + + + + - + @@ -31,7 +32,7 @@ - + @@ -69,7 +70,7 @@ - +