Commit 2d961150 authored by Boxiang Sun's avatar Boxiang Sun Committed by Rafael Monnerat
parent 4270184f
...@@ -13,17 +13,16 @@ portal_type = "Internal Packing List" ...@@ -13,17 +13,16 @@ portal_type = "Internal Packing List"
source_project = context.Item_getCurrentProjectValue() source_project = context.Item_getCurrentProjectValue()
source_section = context.Item_getCurrentOwnerValue() source_section = context.Item_getCurrentOwnerValue()
resource_value = context.Item_getResourceValue()
if destination_project is None and source_project is not None: if destination_project is None and source_project is not None:
destination_project = source_project.getRelativeUrl() destination_project = source_project.getRelativeUrl()
if destination_section is None:
destination_section = source_section.getRelativeUrl()
if source_section is None: if source_section is None:
source_section = context.getSourceAdministration() source_section = context.getSourceAdministration()
if destination_section is None:
destination_section = source_section
source = context.getSourceAdministration() source = context.getSourceAdministration()
destination = context.getSourceAdministration() destination = context.getSourceAdministration()
...@@ -48,7 +47,7 @@ delivery = module.newContent(title="Transfer %s to %s" % (context.getTitle(), de ...@@ -48,7 +47,7 @@ delivery = module.newContent(title="Transfer %s to %s" % (context.getTitle(), de
delivery_line = delivery.newContent( delivery_line = delivery.newContent(
portal_type=line_portal_type, portal_type=line_portal_type,
title=context.getReference(), title=context.getReference(),
quantity_unit=context.getQuantityUnit(), quantity_unit=resource_value.getQuantityUnit(),
resource_value=resource_value) resource_value=resource_value)
delivery_line.edit( delivery_line.edit(
......
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