X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=addons%2Faccount%2Faccount_invoice.py;h=55ba1058d588f3f48f859cee64c4f7bc02c69ca6;hb=f166daf0652aa54037cf1baa5d81a7ae758f5e6e;hp=2b8ff770a61fe646f8a18a5554f730000f33a682;hpb=21303357276ba5339181693cd8a99f9c1312d741;p=odoo%2Fodoo.git diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 2b8ff77..55ba105 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -117,7 +117,7 @@ class account_invoice(osv.osv): #we check if the invoice is partially reconciled and if there are other invoices #involved in this partial reconciliation (and we sum these invoices) for line in aml.reconcile_partial_id.line_partial_ids: - if line.invoice: + if line.invoice and invoice.type == line.invoice.type: nb_inv_in_partial_rec += 1 #store the max invoice id as for this invoice we will make a balance instead of a simple division max_invoice_id = max(max_invoice_id, line.invoice.id) @@ -1407,7 +1407,7 @@ class account_invoice_line(osv.osv): _name = "account.invoice.line" _description = "Invoice Line" - _order = "invoice_id,sequence" + _order = "invoice_id,sequence,id" _columns = { 'name': fields.text('Description', required=True), 'origin': fields.char('Source Document', size=256, help="Reference of the document that produced this invoice."), @@ -1444,6 +1444,7 @@ class account_invoice_line(osv.osv): 'discount': 0.0, 'price_unit': _price_unit_default, 'account_id': _default_account_id, + 'sequence': 10, } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):