[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 4174 revid:dle@openerp.com-20140415130732-bud8xb3pzgxw2imr
bzr revid: dle@openerp.com-20140415101427-a6r7lgy50x9bdah3 bzr revid: dle@openerp.com-20140415130951-ckuv8nsl17qkb300
This commit is contained in:
commit
f8d5ef0f80
|
@ -165,7 +165,7 @@ class account_invoice_refund(osv.osv_memory):
|
|||
to_reconcile_ids = {}
|
||||
for line in movelines:
|
||||
if line.account_id.id == inv.account_id.id:
|
||||
to_reconcile_ids[line.account_id.id] = [line.id]
|
||||
to_reconcile_ids.setdefault(line.account_id.id, []).append(line.id)
|
||||
if line.reconcile_id:
|
||||
line.reconcile_id.unlink()
|
||||
inv_obj.signal_invoice_open(cr, uid, [refund.id])
|
||||
|
|
|
@ -133,10 +133,7 @@ class purchase_order(osv.osv):
|
|||
def _invoiced(self, cursor, user, ids, name, arg, context=None):
|
||||
res = {}
|
||||
for purchase in self.browse(cursor, user, ids, context=context):
|
||||
invoiced = False
|
||||
if purchase.invoiced_rate == 100.00:
|
||||
invoiced = True
|
||||
res[purchase.id] = invoiced
|
||||
res[purchase.id] = all(line.invoiced for line in purchase.order_line)
|
||||
return res
|
||||
|
||||
def _get_journal(self, cr, uid, context=None):
|
||||
|
@ -547,7 +544,7 @@ class purchase_order(osv.osv):
|
|||
inv_line_id = inv_line_obj.create(cr, uid, inv_line_data, context=context)
|
||||
inv_lines.append(inv_line_id)
|
||||
|
||||
po_line.write({'invoiced': True, 'invoice_lines': [(4, inv_line_id)]}, context=context)
|
||||
po_line.write({'invoice_lines': [(4, inv_line_id)]}, context=context)
|
||||
|
||||
# get invoice data and create invoice
|
||||
inv_data = {
|
||||
|
@ -1295,9 +1292,15 @@ 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 po_id in po_ids:
|
||||
purchase_order_obj.message_post(cr, user_id, po_id, body=_("Invoice received"), context=context)
|
||||
workflow.trg_write(uid, 'purchase.order', po_id, cr)
|
||||
for order in purchase_order_obj.browse(cr, uid, po_ids, context=context):
|
||||
purchase_order_obj.message_post(cr, user_id, order.id, body=_("Invoice received"), context=context)
|
||||
invoiced = []
|
||||
for po_line in order.order_line:
|
||||
if any(line.invoice_id.state not in ['draft', 'cancel'] for line in po_line.invoice_lines):
|
||||
invoiced.append(po_line.id)
|
||||
if invoiced:
|
||||
self.pool['purchase.order.line'].write(cr, uid, invoiced, {'invoiced': True})
|
||||
workflow.trg_write(uid, 'purchase.order', order.id, cr)
|
||||
return res
|
||||
|
||||
def confirm_paid(self, cr, uid, ids, context=None):
|
||||
|
|
|
@ -110,7 +110,6 @@ class stock_picking(osv.osv):
|
|||
invoice_line_obj = self.pool.get('account.invoice.line')
|
||||
purchase_line_obj = self.pool.get('purchase.order.line')
|
||||
purchase_line_obj.write(cursor, user, [move_line.purchase_line_id.id], {
|
||||
'invoiced': True,
|
||||
'invoice_lines': [(4, invoice_line_id)],
|
||||
})
|
||||
return super(stock_picking, self)._invoice_line_hook(cursor, user, move_line, invoice_line_id)
|
||||
|
|
|
@ -631,6 +631,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
});
|
||||
}
|
||||
return $.when();
|
||||
}).fail(function() {
|
||||
self.save_list.pop();
|
||||
return $.when();
|
||||
});
|
||||
}
|
||||
return iterate();
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
padding: 0px;
|
||||
background: white;
|
||||
}
|
||||
.openerp .oe_kanban_view .oe_kanban_column, .openerp .oe_kanban_view .oe_kanban_column_cards {
|
||||
.openerp .oe_kanban_view .oe_kanban_column {
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_kanban_view .oe_kanban_aggregates {
|
||||
|
|
|
@ -179,7 +179,7 @@
|
|||
padding: 0px
|
||||
background: #ffffff
|
||||
|
||||
.oe_kanban_column, .oe_kanban_column_cards
|
||||
.oe_kanban_column
|
||||
height: 100%
|
||||
.oe_kanban_aggregates
|
||||
padding: 0
|
||||
|
|
Loading…
Reference in New Issue