diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/movement_resource_interaction_workflow/scripts/Movement_copyQuantityUnitFromResource.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/movement_resource_interaction_workflow/scripts/Movement_copyQuantityUnitFromResource.xml index 595865de219b55b6cde52ec3d59829bfe8481962..32fb735fc56f40ae8a1f31a6362c841a0f2016f6 100644 --- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/movement_resource_interaction_workflow/scripts/Movement_copyQuantityUnitFromResource.xml +++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/movement_resource_interaction_workflow/scripts/Movement_copyQuantityUnitFromResource.xml @@ -54,10 +54,13 @@ \n resource = movement.getResourceValue()\n if resource is not None:\n - # if the movement already have a quantity unit which is valid for this resource, don\'t change it\n - movement_quantity_unit = movement.getQuantityUnit()\n - if movement_quantity_unit and movement_quantity_unit in resource.getQuantityUnitList():\n - return\n + # quantity unit can be acquired from resource.\n + # (Amount class has getQuantityUnit method for backward compatibility and it tries to acquire value from resource).\n + if movement.hasCategory(\'quantity_unit\'):\n + # if the movement already have a quantity unit which is valid for this resource, don\'t change it\n + movement_quantity_unit = movement.getQuantityUnit()\n + if movement_quantity_unit and movement_quantity_unit in resource.getQuantityUnitList():\n + return\n # otherwise initialise to the default quantity unit\n movement.setQuantityUnit(resource.getDefaultQuantityUnit())\n </string> </value> diff --git a/bt5/erp5_base/bt/change_log b/bt5/erp5_base/bt/change_log index 6f9f41ec2fd9b60fd335bd79604d646f8517e964..0a6f86c4331266a4c1ff649456261f9c16f5e899 100644 --- a/bt5/erp5_base/bt/change_log +++ b/bt5/erp5_base/bt/change_log @@ -1,3 +1,6 @@ +2010-09-30 yusei +* Update movement_resource_interaction_workflow and set quantity unit value to movement forcedly if current value is acquired from resource. + 2010-09-28 tatuya * Fix a issue that all the base contribution are not copied when change the resource on a movement. diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision index e39afc8dd2d0b830e59372f6e3c0549322c0a24e..354d30ba65ad042b77fcc8e08062c000a1a2e624 100644 --- a/bt5/erp5_base/bt/revision +++ b/bt5/erp5_base/bt/revision @@ -1 +1 @@ -868 \ No newline at end of file +869 \ No newline at end of file