diff --git a/addons/point_of_sale/pos.py b/addons/point_of_sale/pos.py index 156c42e25f6..b792a374d69 100644 --- a/addons/point_of_sale/pos.py +++ b/addons/point_of_sale/pos.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -177,7 +177,12 @@ class pos_order(osv.osv): readonly=True), 'state': fields.selection([('cancel', 'Cancel'), ('draft', 'Draft'), ('paid', 'Paid'), ('done', 'Done'), ('invoiced', 'Invoiced')], 'State', - readonly=True, ), + readonly=True, + help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed pos order. \ + \n* The \'Paid\' state is set automatically when users makes payment for the pos order. \ + \n* The \'Invoiced\' state is set when invoice is created for pos order. \ + \n* The \'Done\' state is set automatically when user close the pos order.\ + \n* The \'Cancel\' state is used when user cancel pos order.'), 'invoice_id': fields.many2one('account.invoice', 'Invoice', readonly=True), 'account_move': fields.many2one('account.move', 'Account Entry', readonly=True), 'pickings': fields.one2many('stock.picking', 'pos_order', 'Picking', readonly=True), @@ -891,14 +896,14 @@ class pos_order_line(osv.osv): price_line = float(qty)*float(price) return {'name': product_name, 'product_id': product_id[0], 'price': price, 'price_line': price_line ,'qty': qty } - + def unlink(self, cr, uid, ids, context={}): """Allows to delete pos order lines in draft,cancel state""" for rec in self.browse(cr, uid, ids, context=context): if rec.order_id.state not in ['draft','cancel']: raise osv.except_osv(_('Invalid action !'), _('Cannot delete an order line which is %s !')%(rec.order_id.state,)) return super(pos_order_line, self).unlink(cr, uid, ids, context=context) - + pos_order_line()