[IMP] sale:-removed invoiced state in sale.order.line

bzr revid: mtr@mtr-20100712131235-x6v1e0g3vnz0y9h6
This commit is contained in:
mtr 2010-07-12 18:42:35 +05:30
parent 049dafe680
commit 1c2505ed95
1 changed files with 3 additions and 4 deletions

View File

@ -829,13 +829,12 @@ class sale_order_line(osv.osv):
'number_packages': fields.function(_number_packages, method=True, type='integer', string='Number Packages'),
'notes': fields.text('Notes'),
'th_weight': fields.float('Weight', readonly=True, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft', 'Draft'),('confirmed', 'Confirmed'),('done', 'Done'),('cancel', 'Cancelled'),('exception', 'Exception'),('invoiced','Invoiced')], 'State', required=True, readonly=True,
'state': fields.selection([('draft', 'Draft'),('confirmed', 'Confirmed'),('done', 'Done'),('cancel', 'Cancelled'),('exception', 'Exception')], 'State', required=True, readonly=True,
help=' * The \'Draft\' state is set automatically when sale order in draft state. \
\n* The \'Confirmed\' state is set automatically when sale order in confirm state. \
\n* The \'Exception\' state is set automatically when sale order is set as exception. \
\n* The \'Done\' state is set automatically when sale order is set as done. \
\n* The \'Cancelled\' state is set automatically when user cancel sale order\
\n* The \'Invoiced\' state is set automatically when user creates sale order line invoice.'),
\n* The \'Cancelled\' state is set automatically when user cancel sale order.'),
'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'),
'salesman_id':fields.related('order_id', 'user_id', type='many2one', relation='res.users', string='Salesman'),
'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft':[('readonly',False)]}),
@ -857,7 +856,7 @@ class sale_order_line(osv.osv):
line_make_invoice_obj = self.pool.get("sale.order.line.make.invoice")
context.update({'active_ids' : ids,'active_id' : ids})
invoice_id = line_make_invoice_obj.make_invoices(cr, uid, ids, context)
return self.write(cr, uid, ids, {'state': 'invoiced'})
return True
def invoice_line_create(self, cr, uid, ids, context=None):
if context is None: