[FIX] sale: should not create the invoice directly, make as on demands
bzr revid: hmo@tinyerp.com-20120913131808-rr6bfu9chszdn533
This commit is contained in:
parent
1e29f75280
commit
9eb850d552
|
@ -758,7 +758,7 @@ class sale_order(osv.osv):
|
|||
for o in self.browse(cr, uid, ids):
|
||||
if not o.order_line:
|
||||
raise osv.except_osv(_('Error!'),_('You cannot confirm a sale order which has no line.'))
|
||||
if (o.order_policy == 'manual'):
|
||||
if (o.order_policy == 'manual' or self.test_no_product(cr, uid, [o.id])):
|
||||
self.write(cr, uid, [o.id], {'state': 'manual', 'date_confirm': fields.date.context_today(self, cr, uid, context=context)})
|
||||
else:
|
||||
self.write(cr, uid, [o.id], {'state': 'progress', 'date_confirm': fields.date.context_today(self, cr, uid, context=context)})
|
||||
|
|
|
@ -196,7 +196,7 @@
|
|||
<record id="trans_wait_invoice_invoice" model="workflow.transition">
|
||||
<field name="act_from" ref="act_wait_invoice"/>
|
||||
<field name="act_to" ref="act_invoice"/>
|
||||
<field name="condition">(order_policy=='prepaid') or test_no_product()</field>
|
||||
<field name="condition">order_policy=='prepaid'</field>
|
||||
</record>
|
||||
|
||||
<record id="trans_wait_invoice_invoice_manual" model="workflow.transition">
|
||||
|
|
Loading…
Reference in New Issue