asset_vehicle: Load product from vehicle category

This commit is contained in:
Sergi Almacellas Abellana 2015-04-23 12:07:24 +02:00
parent 84df8d556e
commit 908a40460c
1 changed files with 16 additions and 419 deletions

View File

@ -113,7 +113,7 @@
</attributes>
</connection>
<order>
<hop> <from>Select values</from><to>Table output</to><enabled>N</enabled> </hop> <hop> <from>Select values</from><to>target</to><enabled>Y</enabled> </hop> <hop> <from>Table input</from><to>source</to><enabled>N</enabled> </hop> <hop> <from>create_uid</from><to>write_uid</to><enabled>Y</enabled> </hop> <hop> <from>source</from><to>create_uid</to><enabled>Y</enabled> </hop> <hop> <from>target</from><to>Table output</to><enabled>N</enabled> </hop> <hop> <from>write_uid</from><to>Add constants</to><enabled>Y</enabled> </hop> <hop> <from>Add constants</from><to>write_uid 2</to><enabled>Y</enabled> </hop> <hop> <from>write_uid 2</from><to>template sequence</to><enabled>Y</enabled> </hop> <hop> <from>template sequence</from><to>Templates</to><enabled>Y</enabled> </hop> <hop> <from>Templates</from><to>product sequence</to><enabled>Y</enabled> </hop> <hop> <from>product sequence</from><to>products</to><enabled>Y</enabled> </hop> <hop> <from>products</from><to>Code</to><enabled>Y</enabled> </hop> <hop> <from>Row Normaliser</from><to>Stream lookup</to><enabled>Y</enabled> </hop> <hop> <from>Stream lookup</from><to>prep</to><enabled>Y</enabled> </hop> <hop> <from>fields</from><to>Stream lookup</to><enabled>Y</enabled> </hop> <hop> <from>prep</from><to>property</to><enabled>Y</enabled> </hop> <hop> <from>Templates</from><to>Row Normaliser</to><enabled>Y</enabled> </hop> <hop> <from>Code</from><to>Select values</to><enabled>Y</enabled> </hop> </order>
<hop> <from>Select values</from><to>Table output</to><enabled>N</enabled> </hop> <hop> <from>Select values</from><to>target</to><enabled>Y</enabled> </hop> <hop> <from>Table input</from><to>source</to><enabled>N</enabled> </hop> <hop> <from>create_uid</from><to>write_uid</to><enabled>Y</enabled> </hop> <hop> <from>source</from><to>create_uid</to><enabled>Y</enabled> </hop> <hop> <from>target</from><to>Table output</to><enabled>N</enabled> </hop> <hop> <from>write_uid</from><to>Add constants</to><enabled>Y</enabled> </hop> <hop> <from>Add constants</from><to>product lookup</to><enabled>Y</enabled> </hop> <hop> <from>Code</from><to>Select values</to><enabled>Y</enabled> </hop> <hop> <from>product lookup</from><to>Code</to><enabled>Y</enabled> </hop> </order>
<step>
<name>Add constants</name>
<type>Constant</type>
@ -125,61 +125,6 @@
<schema_name/>
</partitioning>
<fields>
<field>
<name>type</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif>assets</nullif>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>product_active</name>
<type>Boolean</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif>Y</nullif>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>uom_symbol</name>
<type>String</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif>u</nullif>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>list_price</name>
<type>Number</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif>0</nullif>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>cost_price</name>
<type>Number</type>
<format/>
<currency/>
<decimal/>
<group/>
<nullif>0</nullif>
<length>-1</length>
<precision>-1</precision>
</field>
<field>
<name>company</name>
<type>Integer</type>
@ -233,37 +178,12 @@
<max_value>999999999</max_value>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>946</xloc>
<xloc>593</xloc>
<yloc>222</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Row Normaliser</name>
<type>Normaliser</type>
<description/>
<distribute>Y</distribute>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<typefield>field</typefield>
<fields> <field> <name>list_price</name>
<value>list_price</value>
<norm>value</norm>
</field> <field> <name>cost_price</name>
<value>cost_price</value>
<norm>value</norm>
</field> </fields> <cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>686</xloc>
<yloc>103</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Select values</name>
<type>SelectValues</type>
@ -277,14 +197,6 @@
<fields> <select_unspecified>N</select_unspecified>
<remove> <name>create_uid</name>
</remove> <remove> <name>write_uid</name>
</remove> <remove> <name>product_active</name>
</remove> <remove> <name>type</name>
</remove> <remove> <name>uom</name>
</remove> <remove> <name>uom_symbol</name>
</remove> <remove> <name>template_id</name>
</remove> <remove> <name>cost_price</name>
</remove> <remove> <name>list_price</name>
</remove> <remove> <name>company</name>
</remove> <meta> <name>create_uid_target</name>
<rename>create_uid</rename>
<type>Integer</type>
@ -335,47 +247,12 @@
<storage_type/>
</meta> </fields> <cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>1042</xloc>
<xloc>689</xloc>
<yloc>220</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Stream lookup</name>
<type>StreamLookup</type>
<description/>
<distribute>Y</distribute>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<from>fields</from>
<input_sorted>N</input_sorted>
<preserve_memory>Y</preserve_memory>
<sorted_list>N</sorted_list>
<integer_pair>N</integer_pair>
<lookup>
<key>
<name>field</name>
<field>name</field>
</key>
<value>
<name>id</name>
<rename>field_id</rename>
<default/>
<type>Integer</type>
</value>
</lookup>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>777</xloc>
<yloc>105</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Table input</name>
<type>TableInput</type>
@ -391,12 +268,12 @@
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<variables_active>Y</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>138</xloc>
<yloc>374</yloc>
<xloc>136</xloc>
<yloc>351</yloc>
<draw>Y</draw>
</GUI>
</step>
@ -432,69 +309,12 @@
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>1143</xloc>
<xloc>790</xloc>
<yloc>343</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>Templates</name>
<type>TableOutput</type>
<description/>
<distribute>N</distribute>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>target</connection>
<schema/>
<table>product_template</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>N</use_batch>
<specify_fields>Y</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field>template</return_field>
<fields>
<field>
<column_name>id</column_name>
<stream_name>template_id</stream_name>
</field>
<field>
<column_name>name</column_name>
<stream_name>name</stream_name>
</field>
<field>
<column_name>active</column_name>
<stream_name>product_active</stream_name>
</field>
<field>
<column_name>type</column_name>
<stream_name>type</stream_name>
</field>
<field>
<column_name>default_uom</column_name>
<stream_name>uom</stream_name>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>683</xloc>
<yloc>222</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>create_uid</name>
<type>DBLookup</type>
@ -536,201 +356,6 @@
</GUI>
</step>
<step>
<name>fields</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>target</connection>
<sql>select f.id,f.name
from ir_model_field f
join ir_model m on m.id = f.model
where m.model = &apos;product.template&apos; and f.name like &apos;%_price&apos;; </sql>
<limit>0</limit>
<lookup/>
<execute_each_row>N</execute_each_row>
<variables_active>N</variables_active>
<lazy_conversion_active>N</lazy_conversion_active>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>777</xloc>
<yloc>29</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>prep</name>
<type>ScriptValueMod</type>
<description/>
<distribute>Y</distribute>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<compatible>N</compatible>
<optimizationLevel>9</optimizationLevel>
<jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
<jsScript_name>Script 1</jsScript_name>
<jsScript_script>&#47;&#47;Script here
var res = &apos;product.template,&apos;+template_id;
var value = &apos;,&apos;+value;</jsScript_script>
</jsScript> </jsScripts> <fields> <field> <name>res</name>
<rename>res</rename>
<type>String</type>
<length>-1</length>
<precision>-1</precision>
<replace>N</replace>
</field> <field> <name>value</name>
<rename>value</rename>
<type>String</type>
<length>-1</length>
<precision>-1</precision>
<replace>Y</replace>
</field> </fields> <cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>850</xloc>
<yloc>100</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>product sequence</name>
<type>Sequence</type>
<description/>
<distribute>Y</distribute>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<valuename>product_id</valuename>
<use_database>N</use_database>
<connection/>
<schema/>
<seqname>SEQ_</seqname>
<use_counter>Y</use_counter>
<counter_name/>
<start_at>50000</start_at>
<increment_by>1</increment_by>
<max_value>999999999</max_value>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>775</xloc>
<yloc>221</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>products</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>target</connection>
<schema/>
<table>product_product</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>N</use_batch>
<specify_fields>Y</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>N</return_keys>
<return_field>product</return_field>
<fields>
<field>
<column_name>id</column_name>
<stream_name>product_id</stream_name>
</field>
<field>
<column_name>template</column_name>
<stream_name>template_id</stream_name>
</field>
<field>
<column_name>active</column_name>
<stream_name>product_active</stream_name>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>861</xloc>
<yloc>220</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>property</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>target</connection>
<schema/>
<table>ir_property</table>
<commit>1000</commit>
<truncate>N</truncate>
<ignore_errors>N</ignore_errors>
<use_batch>N</use_batch>
<specify_fields>Y</specify_fields>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_field/>
<partitioning_daily>N</partitioning_daily>
<partitioning_monthly>Y</partitioning_monthly>
<tablename_in_field>N</tablename_in_field>
<tablename_field/>
<tablename_in_table>Y</tablename_in_table>
<return_keys>Y</return_keys>
<return_field>party</return_field>
<fields>
<field>
<column_name>res</column_name>
<stream_name>res</stream_name>
</field>
<field>
<column_name>value</column_name>
<stream_name>value</stream_name>
</field>
<field>
<column_name>company</column_name>
<stream_name>company</stream_name>
</field>
<field>
<column_name>field</column_name>
<stream_name>field_id</stream_name>
</field>
</fields>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>941</xloc>
<yloc>99</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>source</name>
<type>Dummy</type>
@ -761,40 +386,12 @@ var value = &apos;,&apos;+value;</jsScript_script>
</partitioning>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>1129</xloc>
<xloc>776</xloc>
<yloc>216</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>template sequence</name>
<type>Sequence</type>
<description/>
<distribute>Y</distribute>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<valuename>template_id</valuename>
<use_database>N</use_database>
<connection/>
<schema/>
<seqname>SEQ_</seqname>
<use_counter>Y</use_counter>
<counter_name/>
<start_at>50000</start_at>
<increment_by>1</increment_by>
<max_value>999999999</max_value>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>587</xloc>
<yloc>222</yloc>
<draw>Y</draw>
</GUI>
</step>
<step>
<name>write_uid</name>
<type>DBLookup</type>
@ -837,7 +434,7 @@ var value = &apos;,&apos;+value;</jsScript_script>
</step>
<step>
<name>write_uid 2</name>
<name>product lookup</name>
<type>DBLookup</type>
<description/>
<distribute>Y</distribute>
@ -846,32 +443,32 @@ var value = &apos;,&apos;+value;</jsScript_script>
<method>none</method>
<schema_name/>
</partitioning>
<connection>target</connection>
<connection>source</connection>
<cache>Y</cache>
<cache_load_all>N</cache_load_all>
<cache_size>0</cache_size>
<lookup>
<schema/>
<table>product_uom</table>
<table>vehicle_category</table>
<orderby/>
<fail_on_multiple>N</fail_on_multiple>
<eat_row_on_failure>N</eat_row_on_failure>
<key>
<name>uom_symbol</name>
<field>symbol</field>
<name>category</name>
<field>id</field>
<condition>=</condition>
<name2/>
</key>
<value>
<name>id</name>
<rename>uom</rename>
<name>hour_product</name>
<rename>product_id</rename>
<default/>
<type>Integer</type>
</value>
</lookup>
<cluster_schema/>
<remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
<xloc>477</xloc>
<xloc>490</xloc>
<yloc>221</yloc>
<draw>Y</draw>
</GUI>