fix problem with empty layout_category;
							parent
							
								
									76822501eb
								
							
						
					
					
						commit
						09d23465c3
					
				|  | @ -14,7 +14,7 @@ class AccountInvoice(models.Model): | |||
| 
 | ||||
|         self.ensure_one() | ||||
|         res = [[]] | ||||
|         for category, lines in groupby(self.invoice_line_ids.sorted(key=lambda s: s.layout_category_id.name), lambda l: l.layout_category_id): | ||||
|         for category, lines in groupby(self.invoice_line_ids.sorted(key=lambda s: s.layout_category_id.name or ''), lambda l: l.layout_category_id): | ||||
|             # If last added category induced a pagebreak, this one will be on a new page | ||||
|             if res[-1] and res[-1][-1]['pagebreak']: | ||||
|                 res.append([]) | ||||
|  |  | |||
|  | @ -201,15 +201,15 @@ | |||
|                                                 <br/> | ||||
|                                             </span> | ||||
|                                             <span t-if="shorttext"> | ||||
|                                                 <span> | ||||
|                                                 <span t-if="invoice_line.lot_id and invoice_line.lot_id.short_text"> | ||||
|                                                     <strong>Kurztext:</strong> | ||||
|                                                     <span t-if="invoice_line.lot_id.short_text" t-field="invoice_line.lot_id.short_text"/> | ||||
|                                                     <span t-field="invoice_line.lot_id.short_text"/> | ||||
|                                                 </span> | ||||
|                                                 <span> | ||||
|                                                     <span t-if="not invoice_line.lot_id.short_text" t-field="invoice_line.name"/> | ||||
|                                                 <span t-else=""> | ||||
|                                                     <span t-field="invoice_line.name"/> | ||||
|                                                 </span> | ||||
|                                             </span> | ||||
|                                             <span t-if="not shorttext"> | ||||
|                                             <span t-else=""> | ||||
|                                                 <span t-field="invoice_line.name"/> | ||||
|                                             </span> | ||||
|                                             <span t-if="invoice_line.product_id.tracking=='serial'"> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue