diff --git a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M0Constraint.py b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M0Constraint.py index ea0b2a36aa1e450a3b5416a93d7a7911060633d5..851687fbdd22525092fdbf0e85ef05c462fa1568 100644 --- a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M0Constraint.py +++ b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M0Constraint.py @@ -36,14 +36,12 @@ class M0Constraint: 'type' : 'PropertyExistence', 'title' : None, 'message_no_such_property': 'The naming must be defined', - 'message_property_not_set': 'The naming must be defined', }, { 'id' : 'name_existence', 'description' : 'Property name must be definied', 'type' : 'PropertyExistence', 'name' : None, 'message_no_such_property': 'The commercial name must be defined', - 'message_property_not_set': 'The commercial name must be defined', }, { 'id' : 'head_office_address_existence', 'description' : 'Property address must be definied', diff --git a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M2Constraint.py b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M2Constraint.py index 56dbd33e0afac293f4d68aed61a7042ee5643274..3d8586be5382001fad2ffc78a4b5ead6cd9bfa9d 100644 --- a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M2Constraint.py +++ b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M2Constraint.py @@ -41,7 +41,6 @@ class M2Constraint: # 'type' : 'PropertyExistence', # 'corporate_registration_code' : None, # 'message_no_such_property': 'The corporate registration must be defined', -# 'message_property_not_set': 'The corporate registration must be defined', # }, # { 'id' : 'old_headquarters_existence', # 'description' : 'Property old_headquarters must be definied', diff --git a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M4Constraint.py b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M4Constraint.py index aef79478fb6d811dada21470500f1f7a124ce047..b2f975a1f54d7c4323957e9fced7764290d6e66f 100644 --- a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M4Constraint.py +++ b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/M4Constraint.py @@ -36,7 +36,6 @@ class M4Constraint: 'type' : 'PropertyExistence', 'title' : None, 'message_no_such_property': 'The naming must be defined', - 'message_property_not_set': 'The naming must be defined', }, { 'id' : 'corporate_registration_code_existence', 'description' : 'Property corporate registration code must be definied', diff --git a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P0Constraint.py b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P0Constraint.py index 9dd9df05a2f295af729b71894dcb94072542c92e..05e83b9e6700d2d36026cb5509139032b0769048 100644 --- a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P0Constraint.py +++ b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P0Constraint.py @@ -36,14 +36,12 @@ class P0Constraint: 'type' : 'PropertyExistence', 'last_name' : None, 'message_no_such_property': 'The last name must be defined', - 'message_property_not_set': 'The last name must be defined', }, { 'id' : 'first_name_existence', 'description' : 'Property first name code must be definied', 'type' : 'PropertyExistence', 'first_name' : None, 'message_no_such_property': 'The first name address must be defined', - 'message_property_not_set': 'The first name address must be defined', }, { 'id' : 'date_exitence', 'description' : 'Property date must be definied', @@ -166,6 +164,5 @@ class P0Constraint: 'previous_activity_corporate_registration_code' : None, 'condition' : 'python: object.getActivityRestartCheck() ==1', 'message_no_such_property': 'for a restart activity you must define the previous registration code', - 'message_property_not_set': 'for a restart activity you must define the previous registration code', }, ) diff --git a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P2Constraint.py b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P2Constraint.py index 7923ed3aeaffb25f38c9100754621544080c818e..cec9151c412ba51a30b0ad7e42836d6a267a4cc9 100644 --- a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P2Constraint.py +++ b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P2Constraint.py @@ -36,14 +36,12 @@ class P2Constraint: 'type' : 'PropertyExistence', 'owner_last_name' : None, 'message_no_such_property': 'The owner last name must be defined', - 'message_property_not_set': 'The owner last name must be defined', }, { 'id' : 'owner_first_name_existence', 'description' : 'Property owner first name code must be definied', 'type' : 'PropertyExistence', 'owner_first_name' : None, 'message_no_such_property': 'The owner first name address must be defined', - 'message_property_not_set': 'The owner first name address must be defined', }, { 'id' : 'date_existence', 'description' : 'Property date must be definied', @@ -80,7 +78,6 @@ class P2Constraint: 'company_corporate_registration_code' : None, 'condition' : 'python: object.getCompanyModifications() != None', 'message_no_such_property': 'for an orgnisation modification you must define the company registration code', - 'message_property_not_set': 'for an orgnisation modification you must define the company registration code', }, { 'id' : 'establishment_corporate_registration_code_existence', 'description' : 'Property must be definied', @@ -88,6 +85,5 @@ class P2Constraint: 'establishment_corporate_registration_code' : None, 'condition' : 'python: object.getEstablishmentModification() != None', 'message_no_such_property': 'for an establishment modification you must define the establishment registration code', - 'message_property_not_set': 'for an establishment modification you must define the establishment registration code', }, ) diff --git a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P4Constraint.py b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P4Constraint.py index 4f252fbfbe3c6dbf0bb1e62fe2723cddb3d4f073..74ebe7e5a8a1609b792700c7c9d6258f10b53dd4 100644 --- a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P4Constraint.py +++ b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/P4Constraint.py @@ -36,14 +36,12 @@ class P4Constraint: 'type' : 'PropertyExistence', 'owner_last_name' : None, 'message_no_such_property': 'The owner last name must be defined', - 'message_property_not_set': 'The owner last name must be defined', }, { 'id' : 'owner_first_name_existence', 'description' : 'Property owner first name code must be definied', 'type' : 'PropertyExistence', 'owner_first_name' : None, 'message_no_such_property': 'The owner first name address must be defined', - 'message_property_not_set': 'The owner first name address must be defined', }, { 'id' : 'corporate_registration_code_existence', 'description' : 'Property corporate registration code must be definied', diff --git a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/S1Constraint.py b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/S1Constraint.py index 81dc49e0f2d53c690174b02c00d4e8c5a7ce717c..23851faa84ce9ebd6d2412afe9e97609e631fc4a 100644 --- a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/S1Constraint.py +++ b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/S1Constraint.py @@ -36,7 +36,6 @@ class S1Constraint: 'type' : 'PropertyExistence', 'title' : None, 'message_no_such_property': 'The denomination must be defined', - 'message_property_not_set': 'The denomination must be defined', }, { 'id' : 'hypothecation_person_title_existence', 'description' : 'Property hypothecation person title must be definied', diff --git a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/S5Constraint.py b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/S5Constraint.py index 247211c302f7f3dafafbd4a53ea2993ccfaceb9f..2185a4308906959bc1be5b48d14eed8e2cf21134 100644 --- a/bt5/erp5_registry_ohada/PropertySheetTemplateItem/S5Constraint.py +++ b/bt5/erp5_registry_ohada/PropertySheetTemplateItem/S5Constraint.py @@ -36,7 +36,6 @@ class S5Constraint: 'type' : 'PropertyExistence', 'title' : None, 'message_no_such_property': 'The denomination must be defined', - 'message_property_not_set': 'The denomination must be defined', }, { 'id' : 'inscription_person_title_existence', 'description' : 'Property inscription person title must be definied', diff --git a/bt5/erp5_registry_ohada/bt/revision b/bt5/erp5_registry_ohada/bt/revision index 7e4cc17117820a4baa52971bb84298fd6af14f7b..9597ee0e6b5efb51990180c8f920e7905c9a3b64 100644 --- a/bt5/erp5_registry_ohada/bt/revision +++ b/bt5/erp5_registry_ohada/bt/revision @@ -1 +1 @@ -934 \ No newline at end of file +935 \ No newline at end of file diff --git a/bt5/erp5_trade/PropertySheetTemplateItem/InventoryConstraint.py b/bt5/erp5_trade/PropertySheetTemplateItem/InventoryConstraint.py index 33765e8f004588ec0344fc843c5b823c0eacaebb..3f53d6e1ef639a97cc6c962165e7f9295bc4ea2a 100644 --- a/bt5/erp5_trade/PropertySheetTemplateItem/InventoryConstraint.py +++ b/bt5/erp5_trade/PropertySheetTemplateItem/InventoryConstraint.py @@ -54,7 +54,6 @@ class InventoryConstraint: 'description' : 'Start Date must be defined', 'type' : 'PropertyExistence', 'start_date' : 1, - 'message_property_not_set': 'Inventory Date must be defined', 'message_no_such_property': 'Inventory Date must be defined', }, { 'id' : 'resource_on_line', diff --git a/bt5/erp5_trade/bt/revision b/bt5/erp5_trade/bt/revision index e50f8eba35c7106e6174bc966bc996385de98272..8b37c8cfe6af5c68d4fa42f58ec2e3902cb94fdd 100644 --- a/bt5/erp5_trade/bt/revision +++ b/bt5/erp5_trade/bt/revision @@ -1 +1 @@ -1096 \ No newline at end of file +1097 \ No newline at end of file diff --git a/bt5/vifib_base/PropertySheetTemplateItem/SoftwareInstanceConstraint.py b/bt5/vifib_base/PropertySheetTemplateItem/SoftwareInstanceConstraint.py index b402ffedc0b30faacda2888621db22a11d2583a5..810f82d40493c7cf819ecb43a0700b525846297e 100644 --- a/bt5/vifib_base/PropertySheetTemplateItem/SoftwareInstanceConstraint.py +++ b/bt5/vifib_base/PropertySheetTemplateItem/SoftwareInstanceConstraint.py @@ -33,14 +33,12 @@ class SoftwareInstanceConstraint: 'description' : 'Property text content must be defined', 'type' : 'PropertyExistence', 'text_content' : None, - "message_property_not_set" : 'XML must be set', "message_no_such_property" : 'XML must be set' }, { 'id' : 'property_existence', 'description' : 'Property reference must be defined', 'type' : 'PropertyExistence', 'reference' : None, - "message_property_not_set" : 'Reference must be set', "message_no_such_property" : 'Reference must be set' }, { 'id' : 'text_content_validation', diff --git a/bt5/vifib_base/bt/revision b/bt5/vifib_base/bt/revision index 12e255591973bdba2df68092427a8e1f954f18dc..6fc1e6e18c45e38dba6c96fe27ed3514edfbb064 100644 --- a/bt5/vifib_base/bt/revision +++ b/bt5/vifib_base/bt/revision @@ -1 +1 @@ -177 \ No newline at end of file +178 \ No newline at end of file diff --git a/product/ERP5PropertySheetLegacy/PropertySheet/AccountingTransactionConstraint.py b/product/ERP5PropertySheetLegacy/PropertySheet/AccountingTransactionConstraint.py index c710da8619bfbabdd5eece8e45480badb0848449..a921b6cff4f7c3d8b51fdc8171472cf5f4beb5d4 100644 --- a/product/ERP5PropertySheetLegacy/PropertySheet/AccountingTransactionConstraint.py +++ b/product/ERP5PropertySheetLegacy/PropertySheet/AccountingTransactionConstraint.py @@ -45,7 +45,6 @@ class AccountingTransactionConstraint: { 'id': 'date_existence', 'description': 'Date must be defined', - 'message_property_not_set': 'Date must be defined', 'message_no_such_property': 'Date must be defined', 'condition' : 'python: object.getSimulationState() not' ' in ("cancelled", "deleted")' @@ -56,7 +55,6 @@ class AccountingTransactionConstraint: { 'id': 'date_existence_purchase', 'description': 'Date must be defined', - 'message_property_not_set': 'Date must be defined', 'message_no_such_property': 'Date must be defined', 'condition' : 'python: object.getSimulationState() not' ' in ("cancelled", "deleted")' diff --git a/product/ERP5PropertySheetLegacy/PropertySheet/BugConstraint.py b/product/ERP5PropertySheetLegacy/PropertySheet/BugConstraint.py index 3bbc3c3329e58d4cf8283a6e4f87304f041e9de7..bfcdf3137e6e93b9a2e5ae8ee612ea9bb57d3352 100644 --- a/product/ERP5PropertySheetLegacy/PropertySheet/BugConstraint.py +++ b/product/ERP5PropertySheetLegacy/PropertySheet/BugConstraint.py @@ -37,7 +37,6 @@ class BugConstraint: 'description' : 'Title must be defined', 'type' : 'PropertyExistence', 'title' : None, - 'message_property_not_set': 'Title must be defined', 'message_no_such_property' : 'Title must be defined', }, { 'id' : 'tested_existence', @@ -45,7 +44,6 @@ class BugConstraint: 'type' : 'PropertyExistence', 'tested' : 0, 'condition' : "python: object.getSimulationState() in ['ready','stopped']" , - 'message_property_not_set': 'Tested is unchecked, Must have a Unit/Funcional test for this', 'message_no_such_property' : 'Tested is unchecked, Must have a Unit/Funcional test for this', }, { 'id' : 'source_project_category_membership_arity', @@ -61,7 +59,6 @@ class BugConstraint: 'description' : 'Property start_date must be defined', 'type' : 'PropertyExistence', 'start_date' : None, - 'message_property_not_set': 'Begin Date must be defined', 'message_no_such_property' : 'Begin Date must be defined' }, { 'id' : 'date_coherency', diff --git a/product/ERP5PropertySheetLegacy/PropertySheet/CalendarPeriodConstraint.py b/product/ERP5PropertySheetLegacy/PropertySheet/CalendarPeriodConstraint.py index e834925985163db8bc0979062b2670be60c82ec8..5b55c315871f68d7b836df9e1fafbcc16cd7f78f 100644 --- a/product/ERP5PropertySheetLegacy/PropertySheet/CalendarPeriodConstraint.py +++ b/product/ERP5PropertySheetLegacy/PropertySheet/CalendarPeriodConstraint.py @@ -35,7 +35,6 @@ class CalendarPeriodConstraint: { 'id': 'start_date_existence', 'description': 'Date must be defined', - 'message_property_not_set': 'Start date must be defined', 'message_no_such_property': 'Start date must be defined', 'type': 'PropertyExistence', 'start_date' : 1, @@ -43,7 +42,6 @@ class CalendarPeriodConstraint: { 'id': 'stop_date_existence', 'description': 'Date must be defined', - 'message_property_not_set': 'Stop date must be defined', 'message_no_such_property': 'Stop date must be defined', 'type': 'PropertyExistence', 'stop_date' : 1, diff --git a/product/ERP5PropertySheetLegacy/PropertySheet/ProductionOrder.py b/product/ERP5PropertySheetLegacy/PropertySheet/ProductionOrder.py index f350acc7fc007129b5ba079155ec2a187ee9200d..c95bca5c9db9dbd752e239caf8a0deef8cc64516 100644 --- a/product/ERP5PropertySheetLegacy/PropertySheet/ProductionOrder.py +++ b/product/ERP5PropertySheetLegacy/PropertySheet/ProductionOrder.py @@ -64,7 +64,6 @@ class ProductionOrder: 'type' : 'PropertyExistence', 'start_date' : 1, 'message_no_such_property' : "Shipping Date must be defined", - 'message_property_not_set' : "Shipping Date must be defined", }, { 'id' : 'date_coherency', 'description' : 'Stop Date must be after Start Date', diff --git a/product/ERP5PropertySheetLegacy/PropertySheet/TaskConstraint.py b/product/ERP5PropertySheetLegacy/PropertySheet/TaskConstraint.py index e26223973e65aade7ad909e27695f3b2d32851d0..bdf46377f131ad1b8fdf6f065e6c07f37ba1a1b1 100644 --- a/product/ERP5PropertySheetLegacy/PropertySheet/TaskConstraint.py +++ b/product/ERP5PropertySheetLegacy/PropertySheet/TaskConstraint.py @@ -55,7 +55,6 @@ class TaskConstraint: 'description' : 'Property start_date must be defined', 'type' : 'PropertyExistence', 'start_date' : None, - 'message_property_not_set': 'Begin Date must be defined', 'message_no_such_property' : 'Begin Date must be defined' }, { 'id' : 'date_coherency', diff --git a/product/ERP5PropertySheetLegacy/PropertySheet/TaskLineConstraint.py b/product/ERP5PropertySheetLegacy/PropertySheet/TaskLineConstraint.py index 8d171eef940232d486dfe03cb1ff474587d4fcee..5b5755c12616ee327c6cab04305a6cb58f17279a 100644 --- a/product/ERP5PropertySheetLegacy/PropertySheet/TaskLineConstraint.py +++ b/product/ERP5PropertySheetLegacy/PropertySheet/TaskLineConstraint.py @@ -35,7 +35,6 @@ class TaskLineConstraint: 'description' : 'Property quantity must be defined', 'type' : 'PropertyExistence', 'quantity' : None, - "message_property_not_set" : 'Quantity must be defined in lines', "message_no_such_property" : 'Quantity must be defined in lines' }, { 'id' : 'resource', diff --git a/product/ERP5PropertySheetLegacy/PropertySheet/TradeConditionConstraint.py b/product/ERP5PropertySheetLegacy/PropertySheet/TradeConditionConstraint.py index cd2e7e4d6b2ad7d83dd3b3c943f0ead1063e022a..eaea4ae926bebf9692d7ddac1c23154eb83fed78 100644 --- a/product/ERP5PropertySheetLegacy/PropertySheet/TradeConditionConstraint.py +++ b/product/ERP5PropertySheetLegacy/PropertySheet/TradeConditionConstraint.py @@ -35,7 +35,6 @@ class TradeConditionConstraint: 'description' : 'Property reference must be defined', 'type' : 'PropertyExistence', 'reference' : None, - "message_property_not_set" : 'Reference must be defined', "message_no_such_property" : 'Reference must be defined' }, { 'id' : 'date_coherency', @@ -51,7 +50,6 @@ class TradeConditionConstraint: 'description' : 'Version must be defined', 'type' : 'PropertyExistence', 'version' : None, - 'message_property_not_set': 'Version must be defined', 'message_no_such_property' : 'Version must be defined', }, ) diff --git a/product/ERP5PropertySheetLegacy/PropertySheet/TradeModelLineConstraint.py b/product/ERP5PropertySheetLegacy/PropertySheet/TradeModelLineConstraint.py index fdb1ecb328f8fe93904d1ba5034866704b0f42d4..6d272a360c18e0c9ff11d2f2e0aab4939dd37012 100644 --- a/product/ERP5PropertySheetLegacy/PropertySheet/TradeModelLineConstraint.py +++ b/product/ERP5PropertySheetLegacy/PropertySheet/TradeModelLineConstraint.py @@ -35,7 +35,6 @@ class TradeModelLineConstraint: 'description' : 'Property reference must be defined', 'type' : 'PropertyExistence', 'reference' : None, - "message_property_not_set" : 'Reference must be defined in lines', "message_no_such_property" : 'Reference must be defined in lines' }, { 'id' : 'resource', diff --git a/product/ERP5PropertySheetLegacy/PropertySheet/TradeOrder.py b/product/ERP5PropertySheetLegacy/PropertySheet/TradeOrder.py index 166fe88bcecf92da0077f5ae879ac7050b0fd0c4..a601e1b07e5f301012ac6b73c9abfc1165c417e9 100644 --- a/product/ERP5PropertySheetLegacy/PropertySheet/TradeOrder.py +++ b/product/ERP5PropertySheetLegacy/PropertySheet/TradeOrder.py @@ -86,7 +86,6 @@ class TradeOrder: 'type' : 'PropertyExistence', 'start_date' : 1, 'message_no_such_property' : "Shipping Date must be defined", - 'message_property_not_set' : "Shipping Date must be defined", }, { 'id' : 'date_coherency', 'description' : 'Stop Date must be after Start Date', diff --git a/product/ERP5Type/Constraint/PropertyExistence.py b/product/ERP5Type/Constraint/PropertyExistence.py index 2dad680cc2052a02c364427bf0882a1f2fc2ddca..40d29df80e3b840b1c23a39cea081db128b34228 100644 --- a/product/ERP5Type/Constraint/PropertyExistence.py +++ b/product/ERP5Type/Constraint/PropertyExistence.py @@ -45,11 +45,13 @@ class PropertyExistence(Constraint): """ _message_id_list = ['message_no_such_property', + # Only keeping this message for backward-compatibility + # as it was meaningless to call a getProperty() after + # hasProperty() failed 'message_property_not_set'] message_no_such_property = "Property existence error for property "\ - "${property_id}, this document has no such property" - message_property_not_set = "Property existence error for property "\ - "${property_id}, this property is not defined" + "${property_id}, this document has no such property or the "\ + "property has never been set" def _checkConsistency(self, obj, fixit=0): """Check the object's consistency. @@ -61,10 +63,6 @@ class PropertyExistence(Constraint): mapping = dict(property_id=property_id) if not obj.hasProperty(property_id): error_message_id = "message_no_such_property" - elif obj.getProperty(property_id) is None: - # If value is '', attribute is considered a defined - # XXX is this the default API ? - error_message_id = "message_property_not_set" else: error_message_id = None