diff --git a/bt5/erp5_mrp/ActionTemplateItem/portal_types/Production%20Order%20Module/production_order_module_planning.xml b/bt5/erp5_mrp/ActionTemplateItem/portal_types/Production%20Order%20Module/production_order_module_planning.xml new file mode 100644 index 0000000000000000000000000000000000000000..5fa1b2ca8edbbe0ce80499a7e20f789b3fda21b8 --- /dev/null +++ b/bt5/erp5_mrp/ActionTemplateItem/portal_types/Production%20Order%20Module/production_order_module_planning.xml @@ -0,0 +1,101 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_button</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>production_order_module_planning</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>2.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Production Order Module Planning Box</string> </value> + </item> + <item> + <key> <string>visible</string> </key> + <value> <int>1</int> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <tuple> + <global name="Expression" module="Products.CMFCore.Expression"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${object_url}/ProductionOrderModule_viewPlanning</string> </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <tuple> + <global name="Expression" module="Products.CMFCore.Expression"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>text</string> </key> + <value> <string>string:${portal_url}/images/planningbox.png</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/PathTemplateItem/portal_domains/production_order_module_specialise_domain.xml b/bt5/erp5_mrp/PathTemplateItem/portal_domains/production_order_module_specialise_domain.xml new file mode 100644 index 0000000000000000000000000000000000000000..2fead2c3632c3cbdc1149ab3ea2697a8c34e9ac7 --- /dev/null +++ b/bt5/erp5_mrp/PathTemplateItem/portal_domains/production_order_module_specialise_domain.xml @@ -0,0 +1,67 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="BaseDomain" module="Products.ERP5Type.Document.BaseDomain"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_identity_criterion</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_range_criterion</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>domain_generator_method_id</string> </key> + <value> <string>ProductionOrderModule_generateSpecialiseDomain</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>production_order_module_specialise_domain</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Base Domain</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Production Order Module Specialise Domain</string> </value> + </item> + <item> + <key> <string>uid</string> </key> + <value> + <none/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionDelivery_getSimulationStateColorText.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionDelivery_getSimulationStateColorText.xml new file mode 100644 index 0000000000000000000000000000000000000000..60d02f56af74554df84c2120821d416950620822 --- /dev/null +++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionDelivery_getSimulationStateColorText.xml @@ -0,0 +1,168 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>simulation_method = getattr(delivery, \'getSimulationState\', None)\n +if simulation_method is None:\n + return \'#D1E8FF\'\n +\n +simulation_state = simulation_method()\n +\n +color_dict = {\n + \'draft\': \'#a7d7ae\',\n + \'planned\': \'#ffff00\',\n + \'ordered\': \'#ff8e56\',\n + \'confirmed\': \'#ff0000\',\n + \'started\': \'#ff00ff\',\n + \'stopped\': \'#00b8ff\',\n + \'delivered\': \'#3deb3d\',\n +}\n +return color_dict.get(simulation_state, \'#D1E8FF\')\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>delivery=None</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>delivery</string> + <string>getattr</string> + <string>None</string> + <string>simulation_method</string> + <string>simulation_state</string> + <string>color_dict</string> + <string>_getattr_</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <tuple> + <none/> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ProductionDelivery_getSimulationStateColorText</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_generateSpecialiseDomain.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_generateSpecialiseDomain.xml new file mode 100644 index 0000000000000000000000000000000000000000..907421efa9bdb47ab5bad9ac7b652a7d845ad371 --- /dev/null +++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_generateSpecialiseDomain.xml @@ -0,0 +1,179 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Python_magic</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>request = context.REQUEST\n +domain_list = []\n +supply_chain_module = context.getPortalObject().supply_chain_module\n +if depth == 0:\n + category_list = [q.getObject() for q in supply_chain_module.searchFolder()]\n +\n +else:\n + return domain_list\n +\n +for category in category_list:\n + domain = parent.generateTempDomain(id = \'sub\' + category.getId() )\n + domain.edit(title = category.getTitle(),\n + membership_criterion_base_category = (\'specialise\', ), \n + membership_criterion_category = (category.getRelativeUrl(),),\n + domain_generator_method_id = script.id,\n + uid = category.getUid())\n + \n + domain_list.append(domain)\n +\n +return domain_list\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_filepath</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>depth, parent, **kw</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>2</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>depth</string> + <string>parent</string> + <string>kw</string> + <string>_getattr_</string> + <string>context</string> + <string>request</string> + <string>domain_list</string> + <string>supply_chain_module</string> + <string>append</string> + <string>$append0</string> + <string>_getiter_</string> + <string>q</string> + <string>category_list</string> + <string>category</string> + <string>domain</string> + <string>script</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ProductionOrderModule_generateSpecialiseDomain</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_viewPlanning.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_viewPlanning.xml new file mode 100644 index 0000000000000000000000000000000000000000..6ae2b7c5f8d560345fb3aad2653d5c7990705e59 --- /dev/null +++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_viewPlanning.xml @@ -0,0 +1,135 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ERP5Form" module="Products.ERP5Form.Form"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary/> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> <string>Base_editUnrestricted</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>edit_order</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>enctype</string> </key> + <value> <string>multipart/form-data</string> </value> + </item> + <item> + <key> <string>group_list</string> </key> + <value> + <list> + <string>bottom</string> + </list> + </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <dictionary> + <item> + <key> <string>bottom</string> </key> + <value> + <list> + <string>planning_box</string> + </list> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ProductionOrderModule_viewPlanning</string> </value> + </item> + <item> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>ProductionOrderModule_viewPlanning</string> </value> + </item> + <item> + <key> <string>pt</string> </key> + <value> <string>form_report</string> </value> + </item> + <item> + <key> <string>row_length</string> </key> + <value> <int>4</int> </value> + </item> + <item> + <key> <string>stored_encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Production Order Module Planning</string> </value> + </item> + <item> + <key> <string>unicode_mode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>update_action</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_viewPlanning/planning_box.xml b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_viewPlanning/planning_box.xml new file mode 100644 index 0000000000000000000000000000000000000000..a1724b8558b4c3eafb93622503161517dd24f46c --- /dev/null +++ b/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderModule_viewPlanning/planning_box.xml @@ -0,0 +1,146 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>title</string> + <string>report_root_list</string> + <string>selection_name</string> + <string>portal_types</string> + <string>color_script</string> + <string>round_script</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>planning_box</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>color_script</string> </key> + <value> <string>ProductionDelivery_getSimulationStateColorText</string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>planning_box</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>portal_types</string> </key> + <value> + <list> + <tuple> + <string>Production Order</string> + <string>Production Order</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>report_root_list</string> </key> + <value> + <list> + <tuple> + <string>production_order_module_specialise_domain</string> + <string>Supply Chain</string> + </tuple> + <tuple> + <string>parent</string> + <string>Production Order</string> + </tuple> + </list> + </value> + </item> + <item> + <key> <string>round_script</string> </key> + <value> <string>Planning_roundBoundToMinute</string> </value> + </item> + <item> + <key> <string>selection_name</string> </key> + <value> <string>production_order_module_supply_chain_planning_selection</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Production Order Module Planning</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_mrp/bt/change_log b/bt5/erp5_mrp/bt/change_log index b3027d5c358f413df28679e72c3190c34c45784a..9e4e281c24c3907f3db5164038f18556da05c8bb 100644 --- a/bt5/erp5_mrp/bt/change_log +++ b/bt5/erp5_mrp/bt/change_log @@ -1,3 +1,6 @@ +2008-07-10 luke +* production planning using planning box + 2008-07-07 luke * added material and service consumption views diff --git a/bt5/erp5_mrp/bt/revision b/bt5/erp5_mrp/bt/revision index 235adf8bd8fe3b9844d65f77956d73f5fed04ede..52f6c1a7a0e6648b65c77f6cfff32f6b5034ee55 100644 --- a/bt5/erp5_mrp/bt/revision +++ b/bt5/erp5_mrp/bt/revision @@ -1 +1 @@ -349 \ No newline at end of file +352 \ No newline at end of file diff --git a/bt5/erp5_mrp/bt/template_action_path_list b/bt5/erp5_mrp/bt/template_action_path_list index ad36e6c53eafa24f7483573223d17fc4c08d9d60..1b440c2815b957fb58672f0ec35c4efaeafb7dbd 100644 --- a/bt5/erp5_mrp/bt/template_action_path_list +++ b/bt5/erp5_mrp/bt/template_action_path_list @@ -2,6 +2,7 @@ Production Order Cell | view Production Order Line | price_view Production Order Line | quantity_view Production Order Line | view +Production Order Module | production_order_module_planning Production Order Module | view Production Order Rule | view Production Order | jump_to_related_production_packing_list diff --git a/bt5/erp5_mrp/bt/template_path_list b/bt5/erp5_mrp/bt/template_path_list index a17f80283ed8d931bcd008a2a86b5291d1855215..fa502fd83bac4faaefb150fe3b1e56da748881f5 100644 --- a/bt5/erp5_mrp/bt/template_path_list +++ b/bt5/erp5_mrp/bt/template_path_list @@ -1,5 +1,6 @@ portal_deliveries/production_packing_list_builder portal_deliveries/production_report_builder +portal_domains/production_order_module_specialise_domain portal_rules/default_production_order_rule portal_rules/default_production_order_rule/** portal_rules/default_transformation_rule