Commit b24039c3 authored by Jérome Perrin's avatar Jérome Perrin

Make related keys against stock instead of movement when possible

parent 9279e90f
......@@ -8,8 +8,7 @@
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1</string> </value>
<value> <string>table_0</string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
......@@ -23,8 +22,7 @@ table_1</string> </value>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
accounting_transaction.uid = <dtml-var table_0>.explanation_uid\n
AND <dtml-var table_0>.uid = <dtml-var table_1>.uid
accounting_transaction.uid = <dtml-var table_0>.explanation_uid
]]></string> </value>
</item>
......
<key_list>
<key>accounting_transaction_line_node_uid | movement,stock/node_uid/z_related_accounting_transaction_stock_line</key>
<key>accounting_transaction_line_total_price | movement,stock/total_price/z_related_accounting_transaction_stock_line</key>
<key>accounting_transaction_line_node_uid | stock/node_uid/z_related_accounting_transaction_stock_line</key>
<key>accounting_transaction_line_total_price | stock/total_price/z_related_accounting_transaction_stock_line</key>
<key>accounting_transaction_mirror_section_title | catalog/title/z_related_accounting_transaction_mirror_section</key>
<key>accounting_transaction_payment_title | catalog/title/z_related_accounting_transaction_payment</key>
<key>accounting_transaction_project_title | catalog/title/z_related_accounting_transaction_project</key>
......
3
\ No newline at end of file
4
\ No newline at end of file
accounting_transaction_mirror_section_title | catalog/title/z_related_accounting_transaction_mirror_section
accounting_transaction_project_title | catalog/title/z_related_accounting_transaction_project
accounting_transaction_payment_title | catalog/title/z_related_accounting_transaction_payment
accounting_transaction_line_node_uid | movement,stock/node_uid/z_related_accounting_transaction_stock_line
accounting_transaction_line_total_price | movement,stock/total_price/z_related_accounting_transaction_stock_line
\ No newline at end of file
accounting_transaction_line_node_uid | stock/node_uid/z_related_accounting_transaction_stock_line
accounting_transaction_line_total_price | stock/total_price/z_related_accounting_transaction_stock_line
\ No newline at end of file
......@@ -80,7 +80,6 @@ for x in context.portal_simulation.getCurrentInventoryList(\n
group_by_variation=1,\n
group_by_node=0,\n
at_date=at_date,\n
# XXX resourceType= uses movement table.\n
# resource_portal_type= does not work with cells (because resource is acquired from line)\n
resourceType=context.getPortalProductTypeList(), **kw):\n
if positive_stock and negative_stock and not zero_stock and x.inventory == 0:\n
......
......@@ -41,7 +41,7 @@ table_1</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_related_resource_from_movement</string> </value>
<value> <string>z_related_resource_from_stock</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
......
......@@ -3,9 +3,9 @@
<key>career_skill_id | category,catalog,catalog/id/z_related_career_skill</key>
<key>career_skill_title | category,catalog,catalog/title/z_related_career_skill</key>
<key>children_reference | catalog/reference/z_related_children</key>
<key>deliveryLineType | movement,catalog/portal_type/z_related_uid_or_parent_uid</key>
<key>explanation_portal_type | movement,catalog/portal_type/z_related_explanation</key>
<key>explanation_simulation_state | movement,catalog/simulation_state/z_related_explanation</key>
<key>deliveryLineType | stock,catalog/portal_type/z_related_uid_or_parent_uid</key>
<key>explanation_portal_type | stock,catalog/portal_type/z_related_explanation</key>
<key>explanation_simulation_state | stock,catalog/simulation_state/z_related_explanation</key>
<key>grand_grand_grand_grand_grand_parent_simulation_state | catalog,catalog,catalog,catalog,catalog,catalog/simulation_state/z_related_grand_grand_grand_grand_grand_parent</key>
<key>grand_grand_grand_grand_parent_specialise_portal_type | category,catalog,catalog,catalog,catalog,catalog/portal_type/z_related_grand_grand_grand_grand_parent_specialise</key>
<key>grand_grand_grand_grand_parent_specialise_reference | category,catalog,catalog,catalog,catalog,catalog/reference/z_related_grand_grand_grand_grand_parent_specialise</key>
......@@ -33,7 +33,7 @@
<key>predicate_category_category_uid | predicate_category/category_uid/z_related_predicate_category</key>
<key>predicate_uid | predicate/uid/z_related_predicate</key>
<key>related_resource_from_use_category_uid | category,category/category_uid/z_related_resource_from_use</key>
<key>resourceType | movement,catalog/portal_type/z_related_resource_from_movement</key>
<key>resourceType | stock,catalog/portal_type/z_related_resource_from_stock</key>
<key>stock_function_category_strict_membership_uid | category/category_uid/z_related_strict_membership_function_uid_from_stock</key>
<key>stock_function_category_uid | category/category_uid/z_related_function_uid_from_stock</key>
<key>stock_funding_category_strict_membership_uid | category/category_uid/z_related_strict_membership_funding_uid_from_stock</key>
......
244
\ No newline at end of file
251
\ No newline at end of file
......@@ -109,7 +109,7 @@ erp5_mysql_innodb/z_related_payment_uid_from_stock
erp5_mysql_innodb/z_related_predicate
erp5_mysql_innodb/z_related_predicate_category
erp5_mysql_innodb/z_related_project_uid_from_stock
erp5_mysql_innodb/z_related_resource_from_movement
erp5_mysql_innodb/z_related_resource_from_stock
erp5_mysql_innodb/z_related_resource_from_use
erp5_mysql_innodb/z_related_resource_uid_from_item
erp5_mysql_innodb/z_related_resource_uid_from_stock
......
......@@ -6,8 +6,8 @@ translated_opportunity_state | translation/translated_message/z_related_translat
translated_opportunity_state_title | translation/translated_message/z_related_translated_opportunity_state_title
career_skill_title | category,catalog,catalog/title/z_related_career_skill
stock_payment_category_uid | category/category_uid/z_related_payment_uid_from_stock
explanation_portal_type | movement,catalog/portal_type/z_related_explanation
explanation_simulation_state | movement,catalog/simulation_state/z_related_explanation
explanation_portal_type | stock,catalog/portal_type/z_related_explanation
explanation_simulation_state | stock,catalog/simulation_state/z_related_explanation
stock_payment_category_strict_membership_uid | category/category_uid/z_related_strict_membership_payment_uid_from_stock
stock_resource_category_strict_membership_uid | category/category_uid/z_related_strict_membership_resource_uid_from_stock
translated_portal_type | translation/translated_message/z_related_translated_portal_type
......@@ -30,11 +30,11 @@ stock_function_category_strict_membership_uid | category/category_uid/z_related_
stock_function_category_uid | category/category_uid/z_related_function_uid_from_stock
stock_project_category_strict_membership_uid | category/category_uid/z_related_strict_membership_project_uid_from_stock
stock_project_category_uid | category/category_uid/z_related_project_uid_from_stock
deliveryLineType | movement,catalog/portal_type/z_related_uid_or_parent_uid
deliveryLineType | stock,catalog/portal_type/z_related_uid_or_parent_uid
item_section_category_uid | category/category_uid/z_related_section_uid_from_item
parent_specialise_portal_type | category,catalog/portal_type/z_related_parent_specialise
parent_relative_url | catalog/relative_url/z_related_parent
resourceType | movement,catalog/portal_type/z_related_resource_from_movement
resourceType | stock,catalog/portal_type/z_related_resource_from_stock
grand_parent_portal_type | catalog,catalog/portal_type/z_related_grand_parent
variationCategory | category/category_uid/z_related_uid
translated_validation_state | translation/translated_message/z_related_translated_validation_state
......
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