From d18b6c18b0c3c379e5b16cf8139ead2e41003cb8 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Sun, 2 May 2004 19:24:20 +0000
Subject: [PATCH] Added isDelivery class property

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@789 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/AccountingTransaction.py | 1 +
 product/ERP5/Document/Delivery.py              | 3 ++-
 product/ERP5/Document/Inventory.py             | 1 +
 product/ERP5/Document/PackingList.py           | 1 +
 product/ERP5/Document/ProductionReport.py      | 1 +
 product/ERP5/Document/Transaction.py           | 1 +
 6 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/Document/AccountingTransaction.py b/product/ERP5/Document/AccountingTransaction.py
index 3ac3e6336c..b92d9397f6 100755
--- a/product/ERP5/Document/AccountingTransaction.py
+++ b/product/ERP5/Document/AccountingTransaction.py
@@ -44,6 +44,7 @@ class AccountingTransaction(Delivery):
     add_permission = Permissions.AddPortalContent
     isPortalContent = 1
     isRADContent = 1
+    isDelivery = 1
 
     # Declarative security
     security = ClassSecurityInfo()
diff --git a/product/ERP5/Document/Delivery.py b/product/ERP5/Document/Delivery.py
index d333f1178c..e1927188e4 100755
--- a/product/ERP5/Document/Delivery.py
+++ b/product/ERP5/Document/Delivery.py
@@ -214,6 +214,7 @@ class Delivery(XMLObject):
     portal_type = 'Delivery'
     isPortalContent = 1
     isRADContent = 1
+    isDelivery = 1
 
     # Declarative security
     security = ClassSecurityInfo()
@@ -391,7 +392,7 @@ une liste de mouvements..."""
         This method is called whenever a packing list is being invoiced
       """
       # we create an invoice for this delivery
-      self.activate().buildInvoiceList()
+      self.activate(priority=4).buildInvoiceList()
       
     invoice = WorkflowMethod(_invoice, 'invoice')
     
diff --git a/product/ERP5/Document/Inventory.py b/product/ERP5/Document/Inventory.py
index 2af240f02d..7df9214654 100755
--- a/product/ERP5/Document/Inventory.py
+++ b/product/ERP5/Document/Inventory.py
@@ -42,6 +42,7 @@ class Inventory(XMLObject):
     portal_type = 'Inventory'
     isPortalContent = 1
     isRADContent = 1
+    isDelivery = 1
 
     # Declarative security
     security = ClassSecurityInfo()
diff --git a/product/ERP5/Document/PackingList.py b/product/ERP5/Document/PackingList.py
index b0f1aaa2d6..fd2b996d83 100755
--- a/product/ERP5/Document/PackingList.py
+++ b/product/ERP5/Document/PackingList.py
@@ -65,6 +65,7 @@ class PackingList(Delivery):
     add_permission = Permissions.AddPortalContent
     isPortalContent = 1
     isRADContent = 1
+    isDelivery = 1
 
     # Declarative security
     security = ClassSecurityInfo()
diff --git a/product/ERP5/Document/ProductionReport.py b/product/ERP5/Document/ProductionReport.py
index 6df38ae85f..4c2d10b2c7 100755
--- a/product/ERP5/Document/ProductionReport.py
+++ b/product/ERP5/Document/ProductionReport.py
@@ -44,6 +44,7 @@ class ProductionReport(Delivery):
     add_permission = Permissions.AddPortalContent
     isPortalContent = 1
     isRADContent = 1
+    isDelivery = 1
 
     # Declarative security
     security = ClassSecurityInfo()
diff --git a/product/ERP5/Document/Transaction.py b/product/ERP5/Document/Transaction.py
index aad3c4dc1e..0cae71054a 100755
--- a/product/ERP5/Document/Transaction.py
+++ b/product/ERP5/Document/Transaction.py
@@ -44,6 +44,7 @@ class Transaction(Delivery):
     add_permission = Permissions.AddPortalContent
     isPortalContent = 1
     isRADContent = 1
+    isDelivery = 1
 
     # Declarative security
     security = ClassSecurityInfo()
-- 
2.30.9