[MERGE] forward port of branch saas-4 up to 5087612
[odoo/odoo.git] / addons / account / account_invoice.py
index d0dc2ec..87c96fb 100644 (file)
@@ -216,7 +216,7 @@ class account_invoice(osv.osv):
     _name = "account.invoice"
     _inherit = ['mail.thread']
     _description = 'Invoice'
-    _order = "id desc"
+    _order = "number desc, id desc"
     _track = {
         'type': {
         },
@@ -1781,7 +1781,7 @@ class res_partner(osv.osv):
     """ Inherits partner and adds invoice information in the partner form """
     _inherit = 'res.partner'
     _columns = {
-        'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True),
+        'invoice_ids': fields.one2many('account.invoice', 'partner_id', 'Invoices', readonly=True),
     }
 
     def _find_accounting_partner(self, partner):