Update analytic_invoice patch for speedup

This commit is contained in:
Sergi Almacellas Abellana 2016-04-13 14:51:51 +02:00
parent 94992ea5be
commit 4d3256690a
1 changed files with 4 additions and 3 deletions

View File

@ -445,6 +445,7 @@ diff -r 95d77335bdd5 trytond/trytond/modules/analytic_invoice/invoice.py
--- a/trytond/trytond/modules/analytic_invoice/invoice.py Sun Mar 01 15:34:41 2015 +0100
+++ b/trytond/trytond/modules/analytic_invoice/invoice.py Mon Nov 30 14:24:25 2015 +0100
@@ -26,32 +26,32 @@
@@ -25,32 +25,33 @@
return result
@ -483,7 +484,7 @@ diff -r 95d77335bdd5 trytond/trytond/modules/analytic_invoice/invoice.py
- value['analytic_lines'] = []
- to_create = []
+ for line in lines:
+ line.analytic_lines = []
+ analytic_lines = []
for entry in self.analytic_accounts:
if not entry.account:
continue
@ -491,9 +492,9 @@ diff -r 95d77335bdd5 trytond/trytond/modules/analytic_invoice/invoice.py
- if to_create:
- value['analytic_lines'] = [('create', to_create)]
- return values
+ line.analytic_lines.append(self.get_analytic_entry(entry,
+ analytic_lines.append(self.get_analytic_entry(entry,
+ line))
+ line.analytic_lines = analytic_lines
+ return lines
class AnalyticAccountEntry: