improved_sale_workflow_for_advances

bzr revid: fp@tinyerp.com-20081106214409-okz2mj0zwu6ael3k
This commit is contained in:
Fabien Pinckaers 2008-11-06 22:44:09 +01:00
parent fed9b3e832
commit a9b2720017
1 changed files with 2 additions and 2 deletions

View File

@ -220,7 +220,7 @@ class sale_order(osv.osv):
- The 'Invoice after delivery' choice will generate the draft invoice after the packing list have been finished.
- The 'Invoice from the packings' choice is used to create an invoice during the packing process."""),
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'project_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True, states={'draft':[('readonly', False)]}),
'project_id':fields.many2one('account.analytic.account', 'Analytic Account', readonly=True, states={'draft':[('readonly', False)]}),
'order_line': fields.one2many('sale.order.line', 'order_id', 'Order Lines', readonly=True, states={'draft':[('readonly',False)]}),
'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoice', help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."),
@ -431,7 +431,7 @@ class sale_order(osv.osv):
'user_id': (o.user_id and o.user_id.id) or uid,\
'partner_type': 'customer', 'probability': 1.0,\
'planned_revenue': o.amount_untaxed})
if (o.order_policy == 'manual') and (not o.invoice_ids):
if (o.order_policy == 'manual'):
self.write(cr, uid, [o.id], {'state': 'manual'})
else:
self.write(cr, uid, [o.id], {'state': 'progress'})