diff --git a/product/ERP5/Document/BusinessProcess.py b/product/ERP5/Document/BusinessProcess.py index e73eba9074ccf6856945a42596c5d20e9e726b5a..498fd63674ed209a3e6972a4b758e6bff36309cd 100644 --- a/product/ERP5/Document/BusinessProcess.py +++ b/product/ERP5/Document/BusinessProcess.py @@ -796,8 +796,7 @@ class BusinessProcess(Path, XMLObject): property_dict['start_date'], property_dict['stop_date'] = \ self.getExpectedTradeModelPathStartAndStopDate( explanation, trade_model_path, delay_mode=delay_mode) - else: - raise TypeError("Explanation must be an Applied Rule in expand process") # Nothing to do + # Else, nothing to do. This method can be used without Applied Rule. return property_dict # IBusinessProcess global API diff --git a/product/ERP5/Document/PaySheetTransaction.py b/product/ERP5/Document/PaySheetTransaction.py index 4d21f6a5525b206fbf70e0dc4c62fb02faafe79a..61672d2215f9c29fd31860de87131319236f738c 100644 --- a/product/ERP5/Document/PaySheetTransaction.py +++ b/product/ERP5/Document/PaySheetTransaction.py @@ -205,14 +205,16 @@ class PaySheetTransaction(Invoice): for trade_phase in movement_list_trade_phase_dic.keys(): business_link_list = business_process.getBusinessLinkValueList(trade_phase=\ trade_phase) - # XXX-Aurel - # must convert amount into simulation movement - # by calling method BusinessProcess.getTradePhaseMovementList - # for now delivery builder will fail because it calls setDeliveryValue - # which does not exists on amount + + movement_list = [] + for amount in movement_list_trade_phase_dic[trade_phase]: + variation_dict = dict([tuple(x.split('/',1)) for x in amount.getVariationCategoryList()]) + movement_list.extend( + business_process.getTradePhaseMovementList( + self, amount, trade_phase, update_property_dict=variation_dict)) for business_link in business_link_list: builder_list = [portal.restrictedTraverse(url) for url in\ business_link.getDeliveryBuilderList()] for builder in builder_list: builder.build(delivery_relative_url_list=[self.getRelativeUrl(),], - movement_list = movement_list_trade_phase_dic[trade_phase]) + movement_list = movement_list) diff --git a/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/PaySheetModel/same_total_quantity_property.xml b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/PaySheetModel/same_total_quantity_property.xml new file mode 100644 index 0000000000000000000000000000000000000000..d33dec0c8a2fddecf0b885d40a8415183209cf7d --- /dev/null +++ b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/PaySheetModel/same_total_quantity_property.xml @@ -0,0 +1,53 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Standard Property" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_local_properties</string> </key> + <value> + <tuple> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>mode</string> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>string</string> </value> + </item> + </dictionary> + </tuple> + </value> + </item> + <item> + <key> <string>categories</string> </key> + <value> + <tuple> + <string>elementary_type/boolean</string> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>same_total_quantity_property</string> </value> + </item> + <item> + <key> <string>mode</string> </key> + <value> <string>w</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Standard Property</string> </value> + </item> + <item> + <key> <string>property_default</string> </key> + <value> <string>python: True</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_property_sheets/bt/change_log b/product/ERP5/bootstrap/erp5_property_sheets/bt/change_log index 5c12a8d47f9aa1637ca0cc0281818cf22b35d497..c4c8cb0c38c932d47a83b61e8a876b893a12a1fc 100644 --- a/product/ERP5/bootstrap/erp5_property_sheets/bt/change_log +++ b/product/ERP5/bootstrap/erp5_property_sheets/bt/change_log @@ -1,3 +1,6 @@ +2011-11-09 tatuya +* Add same_total_quantity into PaySheetModel. + 2011-10-12 tatuya * Add preferred_accounting_bank_account_display_method into AccountingPreference to select the way to display bank account. diff --git a/product/ERP5/bootstrap/erp5_property_sheets/bt/revision b/product/ERP5/bootstrap/erp5_property_sheets/bt/revision index ac4213d6e97d9cfeb1d7bc8f948c06114a56de18..d2e1cefe89e17269cf846b1b537654757ac8b735 100644 --- a/product/ERP5/bootstrap/erp5_property_sheets/bt/revision +++ b/product/ERP5/bootstrap/erp5_property_sheets/bt/revision @@ -1 +1 @@ -43 \ No newline at end of file +44 \ No newline at end of file