[MERGE] forward port of branch 7.0 up to cc61d46
This commit is contained in:
commit
6026c2f4d0
|
@ -1330,7 +1330,7 @@ class account_invoice(osv.Model):
|
|||
else:
|
||||
user_id = uid
|
||||
po_ids = purchase_order_obj.search(cr, user_id, [('invoice_ids', 'in', ids)], context=context)
|
||||
for order in purchase_order_obj.browse(cr, uid, po_ids, context=context):
|
||||
for order in purchase_order_obj.browse(cr, user_id, po_ids, context=context):
|
||||
purchase_order_obj.message_post(cr, user_id, order.id, body=_("Invoice received"), context=context)
|
||||
invoiced = []
|
||||
shipped = True
|
||||
|
@ -1343,8 +1343,8 @@ class account_invoice(osv.Model):
|
|||
if all(line.invoice_id.state not in ['draft', 'cancel'] for line in po_line.invoice_lines):
|
||||
invoiced.append(po_line.id)
|
||||
if invoiced and shipped:
|
||||
self.pool['purchase.order.line'].write(cr, uid, invoiced, {'invoiced': True})
|
||||
workflow.trg_write(uid, 'purchase.order', order.id, cr)
|
||||
self.pool['purchase.order.line'].write(cr, user_id, invoiced, {'invoiced': True})
|
||||
workflow.trg_write(user_id, 'purchase.order', order.id, cr)
|
||||
return res
|
||||
|
||||
def confirm_paid(self, cr, uid, ids, context=None):
|
||||
|
|
Loading…
Reference in New Issue