[POS-commit] r6321 - stoqlib/trunk/stoqlib/domain

Johan Dahlin jdahlin at async.com.br
Wed Apr 4 18:01:34 BRT 2007


Author: jdahlin
Date: Wed Apr  4 18:01:34 2007
New Revision: 6321

Modified:
   stoqlib/trunk/stoqlib/domain/exampledata.py

Log:
Add an IPaymentGroup to all purchase orders created by the examples, fixes buildbot breakage

Modified: stoqlib/trunk/stoqlib/domain/exampledata.py
==============================================================================
--- stoqlib/trunk/stoqlib/domain/exampledata.py	(original)
+++ stoqlib/trunk/stoqlib/domain/exampledata.py	Wed Apr  4 18:01:34 2007
@@ -34,7 +34,8 @@
                                        ISellable, IStorable, ISalesPerson,
                                        IClient, IUser, ITransporter,
                                        IBankBranch,
-                                       ICreditProvider)
+                                       ICreditProvider,
+                                       IPaymentGroup)
 from stoqlib.lib.parameters import sysparam
 
 # Do not remove, these are used by doctests
@@ -338,9 +339,11 @@
 
     def _create_purchase_order(self):
         from stoqlib.domain.purchase import PurchaseOrder
-        return PurchaseOrder(supplier=self._create_supplier(),
-                             branch=self._create_branch(),
-                             connection=self.trans)
+        order = PurchaseOrder(supplier=self._create_supplier(),
+                              branch=self._create_branch(),
+                            connection=self.trans)
+        order.addFacet(IPaymentGroup, connection=self.trans)
+        return order
 
     def _create_purchase_order_item(self):
         from stoqlib.domain.purchase import PurchaseItem


More information about the POS-commit mailing list