From 2e6ff42f38e213b0ecff66b08686dcb198be75dc Mon Sep 17 00:00:00 2001 From: "nel@tinyerp.com" <> Date: Mon, 21 Jun 2010 18:12:29 +0200 Subject: [PATCH] [IMP] point of sale bzr revid: nel@tinyerp.com-20100621161229-xtb82392avghya68 --- addons/point_of_sale/account_bank_statement.py | 4 ++-- addons/point_of_sale/pos.py | 2 +- addons/point_of_sale/pos_view.xml | 4 ++-- addons/point_of_sale/report/pos_receipt.rml | 3 +-- addons/point_of_sale/wizard/pos_add_product.xml | 2 +- .../point_of_sale/wizard/pos_close_statement.py | 16 ++++++++++++++-- .../point_of_sale/wizard/pos_close_statement.xml | 7 +++---- .../point_of_sale/wizard/pos_open_statement.py | 14 ++++++++++++-- .../point_of_sale/wizard/pos_open_statement.xml | 7 +++---- addons/point_of_sale/wizard/pos_receipt_view.xml | 1 + addons/point_of_sale/wizard/pos_return.py | 4 ++-- addons/stock/report/picking.py | 2 +- addons/stock/stock_report.xml | 2 +- 13 files changed, 44 insertions(+), 24 deletions(-) diff --git a/addons/point_of_sale/account_bank_statement.py b/addons/point_of_sale/account_bank_statement.py index 7b808a7273c..e9ebbe2ef56 100644 --- a/addons/point_of_sale/account_bank_statement.py +++ b/addons/point_of_sale/account_bank_statement.py @@ -221,7 +221,7 @@ class account_bank_statement(osv.osv): self.write(cr, uid, ids, {'date':time.strftime("%Y-%m-%d %H:%M:%S"), 'state':'open', 'name':number}) return True - def button_confirm(self, cr, uid, ids, context=None): + def button_confirm(self, cr, uid, ids, context={}): """ Check the starting and ending detail of statement @return: True @@ -245,7 +245,7 @@ class account_bank_statement(osv.osv): self.write(cr, uid, statement.id, {'balance_end_real':Decimal(str(val_statement_line))+Decimal(str(val2)),'closing_date':time.strftime("%Y-%m-%d %H:%M:%S"),'state':'draft'}) # self.write(cr, uid, statement.id, {'balance_end_real':bal_st+val_statement_line,'closing_date':time.strftime("%Y-%m-%d %H:%M:%S"),'state':'draft'}) - return super(account_bank_statement, self).button_confirm(cr, uid, ids, context=None) + return super(account_bank_statement, self).button_confirm(cr, uid, ids, context={}) def button_cancel(self, cr, uid, ids, context={}): self.write(cr, uid, ids, {'state':'draft'}, context=context) diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index 2950d4e615f..edf41f84934 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -575,7 +575,7 @@ class pos_order(osv.osv): val=cr.fetchone() val=val and val[0] or None if val: - cr.execute("Update pos_order set date_validation='%s' where id = %d"%(val, order.id)) + cr.execute("Update pos_order set date_validation='%s', state_2 ='%s' where id = %d"%(val, 'accepted', order.id)) return True diff --git a/addons/point_of_sale/pos_view.xml b/addons/point_of_sale/pos_view.xml index 8ab8ced00fe..3fe5328c99e 100644 --- a/addons/point_of_sale/pos_view.xml +++ b/addons/point_of_sale/pos_view.xml @@ -174,7 +174,7 @@ - + @@ -860,7 +860,7 @@ - + diff --git a/addons/point_of_sale/report/pos_receipt.rml b/addons/point_of_sale/report/pos_receipt.rml index d615fc74534..313ba8cdb61 100644 --- a/addons/point_of_sale/report/pos_receipt.rml +++ b/addons/point_of_sale/report/pos_receipt.rml @@ -132,8 +132,7 @@ [[ repeatIn(o.lines,'line') ]] - [[ len(line.product_id.name) > 39 and line.product_id.name[:39] + '...' or line.product_id.name ]] - + [[ line.product_id.name ]] [[o.state=='cancel' and o.statement_ids and '-' or '']][['%.f' % line.qty ]] diff --git a/addons/point_of_sale/wizard/pos_add_product.xml b/addons/point_of_sale/wizard/pos_add_product.xml index f465f97f097..966a21baa4b 100644 --- a/addons/point_of_sale/wizard/pos_add_product.xml +++ b/addons/point_of_sale/wizard/pos_add_product.xml @@ -14,7 +14,7 @@