[IMP] sale : Sale order can be confirmed without any sale lines defined

bzr revid: mdi@tinyerp.com-20111116091435-wmon99c4oibevr40
This commit is contained in:
Divyesh Makwana (Open ERP) 2011-11-16 14:44:35 +05:30
parent 8700b860cd
commit c28edd1862
1 changed files with 1 additions and 1 deletions

View File

@ -620,7 +620,7 @@ class sale_order(osv.osv):
def action_wait(self, cr, uid, ids, *args):
for o in self.browse(cr, uid, ids):
if not o.order_line:
raise osv.except_osv(_('No Sale Order Lines !'), _('Please create sale order lines.'))
raise osv.except_osv(_('Error !'),_('You cannot confirm a sale order without any lines.'))
if (o.order_policy == 'manual'):
self.write(cr, uid, [o.id], {'state': 'manual', 'date_confirm': time.strftime(DEFAULT_SERVER_DATE_FORMAT)})
else: