diff --git a/bt5/erp5_pdm/PortalTypeTemplateItem/portal_types/Internal%20Supply%20Line.xml b/bt5/erp5_pdm/PortalTypeTemplateItem/portal_types/Internal%20Supply%20Line.xml index e27f92d38e78fc5a2f9cafcd5854f3d6cd74ca0b..145e6c4b834632d0957a626a3c02d8434cd160d0 100644 --- a/bt5/erp5_pdm/PortalTypeTemplateItem/portal_types/Internal%20Supply%20Line.xml +++ b/bt5/erp5_pdm/PortalTypeTemplateItem/portal_types/Internal%20Supply%20Line.xml @@ -76,7 +76,7 @@ </item> <item> <key> <string>init_script</string> </key> - <value> <string>SaleSupplyLine_init</string> </value> + <value> <string>InternalSupplyLine_init</string> </value> </item> <item> <key> <string>permission</string> </key> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/InternalSupplyLine_init.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/InternalSupplyLine_init.xml index 42496f5f68f24034ec693c53909cefe889bc0119..98ae0a827141b4c9716b30bef512e65afece7d31 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/InternalSupplyLine_init.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/InternalSupplyLine_init.xml @@ -53,18 +53,7 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string># XXX Set a resource for the supply line inside a resource\n -if context.getParentValue().getPortalType() in \\\n - context.getPortalResourceTypeList():\n - context.setResourceValue(context.getParentValue())\n -# Predicate ?\n -context.setMappedValuePropertyList([\n - \'base_price\', \'additional_price\',\n - \'discount_ratio\', \'exclusive_discount_ratio\',\n - \'surcharge_ratio\', \'variable_additional_price\',\n - \'non_discountable_additional_price\',\n - \'priced_quantity\',\n -])\n + <value> <string>return context.SupplyLine_init(**kw)\n </string> </value> </item> <item> @@ -102,6 +91,7 @@ context.setMappedValuePropertyList([\n <value> <tuple> <string>kw</string> + <string>_apply_</string> <string>_getattr_</string> <string>context</string> </tuple> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/PurchaseSupplyLine_init.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/PurchaseSupplyLine_init.xml index c9aab8cc004ecc9d2f6326b0fa940fa036f0811b..b95aedace6f5819aaceb069270498b9954563462 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/PurchaseSupplyLine_init.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/PurchaseSupplyLine_init.xml @@ -53,18 +53,7 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string># XXX Set a resource for the supply line inside a resource\n -if context.getParentValue().getPortalType() in \\\n - context.getPortalResourceTypeList():\n - context.setResourceValue(context.getParentValue())\n -# Predicate ?\n -context.setMappedValuePropertyList([\n - \'base_price\', \'additional_price\',\n - \'discount_ratio\', \'exclusive_discount_ratio\',\n - \'surcharge_ratio\', \'variable_additional_price\',\n - \'non_discountable_additional_price\',\n - \'priced_quantity\', \'base_unit_price\',\n -])\n + <value> <string>return context.SupplyLine_init(**kw)\n </string> </value> </item> <item> @@ -102,6 +91,7 @@ context.setMappedValuePropertyList([\n <value> <tuple> <string>kw</string> + <string>_apply_</string> <string>_getattr_</string> <string>context</string> </tuple> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SaleSupplyLine_init.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SaleSupplyLine_init.xml index dd4abc88d00b18bf585738a374d3724a28c54297..3d3549edcf95e4a309f57ac8ece2fe11560e0587 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SaleSupplyLine_init.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SaleSupplyLine_init.xml @@ -53,18 +53,7 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string># XXX Set a resource for the supply line inside a resource\n -if context.getParentValue().getPortalType() in \\\n - context.getPortalResourceTypeList():\n - context.setResourceValue(context.getParentValue())\n -# Predicate ?\n -context.setMappedValuePropertyList([\n - \'base_price\', \'additional_price\',\n - \'discount_ratio\', \'exclusive_discount_ratio\',\n - \'surcharge_ratio\', \'variable_additional_price\',\n - \'non_discountable_additional_price\',\n - \'priced_quantity\', \'base_unit_price\',\n -])\n + <value> <string>return context.SupplyLine_init(**kw)\n </string> </value> </item> <item> @@ -102,6 +91,7 @@ context.setMappedValuePropertyList([\n <value> <tuple> <string>kw</string> + <string>_apply_</string> <string>_getattr_</string> <string>context</string> </tuple> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SupplyLine_init.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SupplyLine_init.xml index a5d68bf4168b79529336b2f4906e41c07f340800..99a3428cff0c658b4f3a99b585109918c906606c 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SupplyLine_init.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SupplyLine_init.xml @@ -54,16 +54,16 @@ <item> <key> <string>_body</string> </key> <value> <string># XXX Set a resource for the supply line inside a resource\n -if context.getParentValue().getPortalType() in \\\n - context.getPortalResourceTypeList():\n - context.setResourceValue(context.getParentValue())\n +parent_value = context.getParentValue()\n +if parent_value.getPortalType() in context.getPortalResourceTypeList():\n + context.setResourceValue(parent_value)\n # Predicate ?\n context.setMappedValuePropertyList([\n \'base_price\', \'additional_price\',\n \'discount_ratio\', \'exclusive_discount_ratio\',\n \'surcharge_ratio\', \'variable_additional_price\',\n \'non_discountable_additional_price\',\n - \'priced_quantity\',\n + \'priced_quantity\', \'base_unit_price\',\n ])\n </string> </value> </item> @@ -104,6 +104,7 @@ context.setMappedValuePropertyList([\n <string>kw</string> <string>_getattr_</string> <string>context</string> + <string>parent_value</string> </tuple> </value> </item> diff --git a/bt5/erp5_pdm/bt/revision b/bt5/erp5_pdm/bt/revision index 2415c065944e9ce572ac4d79cc79e621e9dee039..1f704ce60d70b1e318447b4e22ecbe575e4f5cb3 100644 --- a/bt5/erp5_pdm/bt/revision +++ b/bt5/erp5_pdm/bt/revision @@ -1 +1 @@ -448 \ No newline at end of file +449 \ No newline at end of file