← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~agilebg/account-invoice-report/7.0-bug-1284049-hurrinico into lp:account-invoice-report

 

Nicola Malcontenti - Agile BG has proposed merging lp:~agilebg/account-invoice-report/7.0-bug-1284049-hurrinico into lp:account-invoice-report.

Requested reviews:
  Account Core Editors (account-core-editors)
Related bugs:
  Bug #1284049 in Account - Invoicing Reports: "serial numbers on invoice"
  https://bugs.launchpad.net/account-invoice-report/+bug/1284049

For more details, see:
https://code.launchpad.net/~agilebg/account-invoice-report/7.0-bug-1284049-hurrinico/+merge/208753

https://bugs.launchpad.net/account-invoice-report/+bug/1284049
-- 
https://code.launchpad.net/~agilebg/account-invoice-report/7.0-bug-1284049-hurrinico/+merge/208753
Your team OpenERP Community Reviewer/Maintainer is subscribed to branch lp:account-invoice-report.
=== modified file 'account_invoice_production_lot/__openerp__.py'
--- account_invoice_production_lot/__openerp__.py	2014-01-02 10:03:31 +0000
+++ account_invoice_production_lot/__openerp__.py	2014-02-28 09:49:59 +0000
@@ -29,6 +29,7 @@
     "depends": [
         "sale_stock",
         "invoice_webkit",
+        "stock_picking_invoice_link",
         ],
     "author": "Agile Business Group",
     "summary": "Display delivered serial numbers in invoice",

=== modified file 'account_invoice_production_lot/invoice.py'
--- account_invoice_production_lot/invoice.py	2014-01-02 10:03:31 +0000
+++ account_invoice_production_lot/invoice.py	2014-02-28 09:49:59 +0000
@@ -30,10 +30,15 @@
         result = {}
         for line in self.browse(cr, uid, ids, context=context):
             result[line.id] = []
-            for order_line in line.order_lines:
-                for move in order_line.move_ids:
+            if line.move_line_ids:
+                for move in line.move_line_ids:
                     if move.prodlot_id:
                         result[line.id].append(move.prodlot_id.id)
+            else:
+                for order_line in line.order_lines:
+                    for move in order_line.move_ids:
+                        if move.prodlot_id:
+                            result[line.id].append(move.prodlot_id.id)
         return result
 
     _inherit = "account.invoice.line"


Follow ups