Commit 4775eaac authored by Romain Courteaud's avatar Romain Courteaud

Do not modify existing specialise value.

Prevent accessing ZODB objects by filtering more with MySQL.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34789 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9498b936
master afs afs-manifest afs_fix allow_login_change allow_login_change_differentiate_id_and_login allow_login_change_wip arnau arnau-kns arnau-kns-without-property-mapping arnau-merge arnau-poc auto_extend_select_list autoflake backup_erp5_workflow bk_erp5ish_actions_tool bk_sqlcatalog boc-interaction-drop cache catalog_fulltext catalog_fulltext_old cedric cedriclen cedriclen-eos certificate_authority change_http_exchange_api cherry-pick-4a8e045d cleanJSByJSLint clean_up_upgrader cleanup_acquisition_base_category compact_title_no_reference couscous credential_update_action datetimefield deferred_listbox douglas_forum dream_distributor drop-legacy-simulation dsn-phase3 eos-dev erp5-component erp5-data-notebook erp5-forum erp5-preference erp5-release erp5-slapos-upgrade erp5-util-testing erp5-vifib erp5-vifib-cleanup erp5_calendar erp5_catalog erp5_ci erp5_corporate_identity erp5_free_subscription erp5_payslip_migration erp5_recruiting erp5_web_forwarder erp5_web_templates erp5_workflow erp5testnode_max_timeout feat/no_getPrice_on_edit feat/no_useless_records_in_predicate_table feat/wendelin-py-data fix/allowing_in_restricted fix/clone_transformation fix/inventory_api_variation_category fix/login_validate_check_consistency fix_system_processes_ownership for_testrunner_1 for_testrunner_2 formbox gabriel gabriel-fix-rounding-in-accounting-generation gabriel-fix-rounding-in-accounting-generation2 gadget-json-value http_cache_fix improve_default_caching_policy_manager interaction-drop isDeletable item_tracking_graph_editor ivan jerome-bt-reference-doc jerome-test jerome_events jerome_graph_editor_renderjs jerome_new_style_solve_divergence jerome_promise_in_tests jerome_user_preference_time_zone jio jm/form-action-guard joblib-activity kns kns-kr lazy_simulation_causality lignan lingnan listbox-generator mame mame-bt5-cleanup mame-erp5_project-cleanup mame-naming-convention mame-naming-convention-list_method mame-test-stock-indexation mame-work mame2 master-erp5-test-result-scalability master-erp5-test-result-scalability-rebase master-test-fix-additionalbt5path master_calendar_wip_patches master_calendar_wip_patches_extend_security master_no_guard_on_workflow_transition master_no_guard_on_workflow_transition_plus_calendar_wip_patchs merge_xhtml_jquery mmariani-inventory mrp new-render-presentation nexedi-erp5-jp no_longer_simulated_state officejs officejs_clean pere portal_callables portal_solver_process_security_configuration presentation rebased_mrp reindex_calendar_after_change_calendar_exception reverse_logistics rewrite_test_21_AcquiredPortalType romain-fulltext scalability-master2 scalability-master2-rebase scalability-rebase shop-box simulation sms_more_than_140_characters strict_catalog syncml taskdistribution-xmlrpc-binary test_page testnode_software_link timezones tmp/getInstalledBusinessTemplate_never_installed_bt tristan tristan-merge tristan-performance ttr ttrm upgradeSite view-aggregated-amounts vivekpab_erp5webrenderjs_layoutconfig vivekpab_jabberclient vivekpab_renderjs_interfaces wenjie wenjie_branch wip_erp5_event yryr yryr-components-cp yryr-inventory-cache yryr-test yryr-with-components yusei erp5.util-0.4.46 erp5.util-0.4.44 erp5.util-0.4.43 erp5.util-0.4.41 erp5.util-0.4.40 erp5.util-0.4.37 erp5.util-0.4.1 erp5.util-0.4 erp5.util-0.3 erp5.util-0.2 erp5.util-0.1
No related merge requests found
......@@ -54,16 +54,18 @@
<item>
<key> <string>_body</string> </key>
<value> <string>production_order_line = state_change[\'object\']\n
portal = production_order_line.getPortalObject()\n
\n
transformation = None\n
resource = production_order_line.getResourceValue()\n
if resource is not None:\n
transformation_list = [q for q in resource.getResourceRelatedValueList(portal_type=portal.getPortalTransformationTypeList()) \\\n
if q.getProperty(\'validation_state\',\'default\') != \'invalidated\']\n
if len(transformation_list) == 1:\n
transformation = transformation_list[0].getRelativeUrl()\n
production_order_line.setSpecialise(transformation)\n
if not production_order_line.hasSpecialise():\n
portal = production_order_line.getPortalObject()\n
resource = production_order_line.getResourceValue()\n
if resource is not None:\n
transformation_list = portal.portal_catalog(\n
portal_type=portal.getPortalTransformationTypeList(),\n
validation_state="!=invalidated",\n
resource_value=resource)\n
if len(transformation_list) == 1:\n
transformation = transformation_list[0].getRelativeUrl()\n
production_order_line.setSpecialise(transformation)\n
</string> </value>
</item>
<item>
......@@ -105,15 +107,11 @@ production_order_line.setSpecialise(transformation)\n
<string>production_order_line</string>
<string>_getattr_</string>
<string>portal</string>
<string>None</string>
<string>transformation</string>
<string>resource</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>q</string>
<string>None</string>
<string>transformation_list</string>
<string>len</string>
<string>transformation</string>
</tuple>
</value>
</item>
......
435
\ No newline at end of file
438
\ 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