Commit 273f273a authored by Rafael Monnerat's avatar Rafael Monnerat

erp5_accounting&trade&pdm: Missing set ConstraintType on constraints

   This is expected that constraints can call getConstraintType() if they are filtered:

    return context.checkConsistency(fixit=1, filter={'constraint_type': 'post_upgrade'},)
  Module Products.ERP5Type.Core.Folder, line 1476, in checkConsistency
    error_list.extend(obj.fixConsistency(filter=filter, **kw))
  Module Products.ERP5Type.Base, line 2714, in fixConsistency
    return self.checkConsistency(fixit=True, filter=filter, **kw)
  Module Products.ERP5Type.Core.Folder, line 1476, in checkConsistency
    error_list.extend(obj.fixConsistency(filter=filter, **kw))
  Module Products.ERP5Type.Base, line 2714, in fixConsistency
    return self.checkConsistency(fixit=True, filter=filter, **kw)
  Module Products.ERP5Type.Core.Folder, line 1462, in checkConsistency
    **kw
  Module Products.ERP5Type.Base, line 2686, in checkConsistency
    for constraint_instance in self._filteredConstraintList(filter):
  Module Products.ERP5Type.Base, line 2739, in _filteredConstraintList
    constraints = [x for x in constraints if x.__of__(self).getConstraintType() in \
AttributeError: 'RequestContainer' object has no attribute 'getConstraintType'
parent bde5a88d
<property_sheet_list> <property_sheet_list>
<portal_type id="Account Type Constraint">
<item>ConstraintType</item>
</portal_type>
<portal_type id="Accounting Transaction"> <portal_type id="Accounting Transaction">
<item>AccountingTransactionConstraint</item> <item>AccountingTransactionConstraint</item>
</portal_type> </portal_type>
<portal_type id="Accounting Transaction Balance Constraint">
<item>ConstraintType</item>
</portal_type>
<portal_type id="Accounting Transaction Line"> <portal_type id="Accounting Transaction Line">
<item>AccountingTransactionLineConstraint</item> <item>AccountingTransactionLineConstraint</item>
</portal_type> </portal_type>
......
Account Type Constraint | ConstraintType
Accounting Transaction Balance Constraint | ConstraintType
Accounting Transaction Line | AccountingTransactionLineConstraint Accounting Transaction Line | AccountingTransactionLineConstraint
Accounting Transaction | AccountingTransactionConstraint Accounting Transaction | AccountingTransactionConstraint
Balance Transaction Line | AccountingTransactionLineConstraint Balance Transaction Line | AccountingTransactionLineConstraint
......
<property_sheet_list>
<portal_type id="Missing Category Document Constraint">
<item>ConstraintType</item>
</portal_type>
</property_sheet_list>
\ No newline at end of file
Missing Category Document Constraint | ConstraintType
\ No newline at end of file
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
<item>DefaultImage</item> <item>DefaultImage</item>
<item>Reference</item> <item>Reference</item>
</portal_type> </portal_type>
<portal_type id="Resource Measures Consistency Constraint">
<item>ConstraintType</item>
</portal_type>
<portal_type id="Service Individual Variation"> <portal_type id="Service Individual Variation">
<item>DefaultImage</item> <item>DefaultImage</item>
</portal_type> </portal_type>
......
...@@ -4,5 +4,6 @@ Measure Cell | Amount ...@@ -4,5 +4,6 @@ Measure Cell | Amount
Product Individual Variation | DefaultImage Product Individual Variation | DefaultImage
Product Individual Variation | Reference Product Individual Variation | Reference
Product | DefaultImage Product | DefaultImage
Resource Measures Consistency Constraint | ConstraintType
Service Individual Variation | DefaultImage Service Individual Variation | DefaultImage
Supply Cell | Reference Supply Cell | Reference
\ No newline at end of file
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
<portal_type id="Delivery Node"> <portal_type id="Delivery Node">
<item>DeliveryNode</item> <item>DeliveryNode</item>
</portal_type> </portal_type>
<portal_type id="Duplicate Inventory Constraint">
<item>ConstraintType</item>
</portal_type>
<portal_type id="Internal Packing List"> <portal_type id="Internal Packing List">
<item>DeliveryCausalityStateConstraint</item> <item>DeliveryCausalityStateConstraint</item>
</portal_type> </portal_type>
...@@ -31,6 +34,9 @@ ...@@ -31,6 +34,9 @@
<portal_type id="Sale Trade Condition"> <portal_type id="Sale Trade Condition">
<item>PaymentCondition</item> <item>PaymentCondition</item>
</portal_type> </portal_type>
<portal_type id="Trade Model Line Cell Consistency Constraint">
<item>ConstraintType</item>
</portal_type>
<portal_type id="Trade Model Path"> <portal_type id="Trade Model Path">
<item>PaymentCondition</item> <item>PaymentCondition</item>
</portal_type> </portal_type>
......
Business Process | Reference Business Process | Reference
Business Process | Version Business Process | Version
Delivery Node | DeliveryNode Delivery Node | DeliveryNode
Duplicate Inventory Constraint | ConstraintType
Internal Packing List | DeliveryCausalityStateConstraint Internal Packing List | DeliveryCausalityStateConstraint
Inventory Report | Arrow Inventory Report | Arrow
Inventory Report | InventoryReport Inventory Report | InventoryReport
...@@ -10,4 +11,5 @@ Returned Sale Packing List | DeliveryCausalityStateConstraint ...@@ -10,4 +11,5 @@ Returned Sale Packing List | DeliveryCausalityStateConstraint
Sale Order | PaymentCondition Sale Order | PaymentCondition
Sale Packing List | DeliveryCausalityStateConstraint Sale Packing List | DeliveryCausalityStateConstraint
Sale Trade Condition | PaymentCondition Sale Trade Condition | PaymentCondition
Trade Model Line Cell Consistency Constraint | ConstraintType
Trade Model Path | PaymentCondition Trade Model Path | PaymentCondition
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment