Commit ae85c4c1 authored by Thierry's avatar Thierry

new


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@79 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2cfdd4a4
## Script (Python) "modele_pri_matrix_item_list"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=base_category_list=[]
##title=
##
modele = context
first_list = modele.getVariationCategoryItemList(base_category_list=base_category_list)
final_list = []
for list_item in first_list :
final_list.append((list_item[1],list_item[0]))
if len(final_list)==0 :
final_list.append((None,None))
return final_list
<?xml version="1.0" encoding="iso-8859-1"?>
<form>
<title>Modle</title>
<name>modele_pri_view</name>
<action>base_edit</action>
<enctype></enctype>
<method>POST</method>
<pt>form_view</pt>
<groups>
<group>
<title>left</title>
<fields>
<field><id>my_id</id> <type>StringField</type>
<values>
<alternate_name></alternate_name>
<css_class></css_class>
<default></default>
<description></description>
<display_maxwidth></display_maxwidth>
<display_width type="int">20</display_width>
<external_validator></external_validator>
<extra></extra>
<hidden type="int">0</hidden>
<max_length></max_length>
<required type="int">1</required>
<title>Modle</title>
<truncate type="int">0</truncate>
</values>
<tales>
</tales>
<messages>
<message name="external_validator_failed">The input failed the external validator.</message>
<message name="required_not_found">Input is required but no input given.</message>
<message name="too_long">Too much input was given.</message>
</messages>
</field>
</fields>
</group>
<group>
<title>right</title>
<fields>
</fields>
</group>
<group>
<title>center</title>
<fields>
</fields>
</group>
<group>
<title>bottom</title>
<fields>
<field><id>matrixbox</id> <type>MatrixBox</type>
<values>
<all_editable_attributes type="list">[('pri', 'pri'), ('predicate_value', 'predicate_value')]</all_editable_attributes>
<alternate_name></alternate_name>
<cell_base_id>pri</cell_base_id>
<cell_range type="list">[]</cell_range>
<columns type="list">[('None', 'None')]</columns>
<css_class></css_class>
<default></default>
<description></description>
<editable_attributes type="list">[('pri', 'pri'), ('predicate_value', 'predicate_value')]</editable_attributes>
<external_validator></external_validator>
<getter_method></getter_method>
<global_attributes type="list">[('domain_base_category_list', 'domain_base_category_list'), ('mapped_value_property_list', 'mapped_value_propertyr_list'), ('predicate_operator', 'predicate_operator')]</global_attributes>
<hidden type="int">0</hidden>
<lines type="list">[('None', 'None')]</lines>
<setter_method></setter_method>
<tabs type="list">[('None', 'None')]</tabs>
<title>matrixbox</title>
<update_cell_range type="int">1</update_cell_range>
</values>
<tales>
<columns>python:here.modele_pri_matrix_item_list(base_category_list=('taille',))</columns>
<lines>python:here.modele_pri_matrix_item_list(base_category_list=('coloris',))</lines>
<tabs>python:[(None,None)]</tabs>
</tales>
<messages>
<message name="external_validator_failed">The input failed the external validator.</message>
</messages>
</field>
<field><id>domain_base_category_list</id> <type>LinesField</type>
<values>
<alternate_name></alternate_name>
<css_class></css_class>
<default type="list">[]</default>
<description></description>
<external_validator></external_validator>
<extra></extra>
<height type="int">5</height>
<hidden type="int">1</hidden>
<max_length></max_length>
<max_linelength></max_linelength>
<max_lines></max_lines>
<required type="int">0</required>
<title>Valid Domain</title>
<width type="int">40</width>
</values>
<tales>
<default>python:filter(lambda x:x in ('coloris', 'taille'),here.getVariationBaseCategoryList())</default>
</tales>
<messages>
<message name="external_validator_failed">The input failed the external validator.</message>
<message name="required_not_found">Input is required but no input given.</message>
<message name="too_many_lines">You entered too many lines.</message>
<message name="line_too_long">A line was too long.</message>
<message name="too_long">You entered too many characters.</message>
</messages>
</field>
<field><id>predicate_operator</id> <type>StringField</type>
<values>
<alternate_name></alternate_name>
<css_class></css_class>
<default>SUPERSET_OF</default>
<description></description>
<display_maxwidth></display_maxwidth>
<display_width type="int">20</display_width>
<external_validator></external_validator>
<extra></extra>
<hidden type="int">1</hidden>
<max_length></max_length>
<required type="int">0</required>
<title>Operator</title>
<truncate type="int">0</truncate>
</values>
<tales>
</tales>
<messages>
<message name="external_validator_failed">The input failed the external validator.</message>
<message name="required_not_found">Input is required but no input given.</message>
<message name="too_long">Too much input was given.</message>
</messages>
</field>
<field><id>mapped_value_property_list</id> <type>LinesField</type>
<values>
<alternate_name></alternate_name>
<css_class></css_class>
<default type="list">['pri']</default>
<description></description>
<external_validator></external_validator>
<extra></extra>
<height type="int">5</height>
<hidden type="int">1</hidden>
<max_length></max_length>
<max_linelength></max_linelength>
<max_lines></max_lines>
<required type="int">0</required>
<title>Modified categories</title>
<width type="int">40</width>
</values>
<tales>
</tales>
<messages>
<message name="external_validator_failed">The input failed the external validator.</message>
<message name="required_not_found">Input is required but no input given.</message>
<message name="too_many_lines">You entered too many lines.</message>
<message name="line_too_long">A line was too long.</message>
<message name="too_long">You entered too many characters.</message>
</messages>
</field>
</fields>
</group>
<group>
<title>hidden</title>
<fields>
<field><id>matrixbox_predicate_value</id> <type>LinesField</type>
<values>
<alternate_name></alternate_name>
<css_class></css_class>
<default type="list">[]</default>
<description></description>
<external_validator></external_validator>
<extra></extra>
<height type="int">5</height>
<hidden type="int">1</hidden>
<max_length></max_length>
<max_linelength></max_linelength>
<max_lines></max_lines>
<required type="int">0</required>
<title>matrixbox_predicate_value</title>
<width type="int">40</width>
</values>
<tales>
<default>python:filter(lambda x: x is not None,cell_index)</default>
</tales>
<messages>
<message name="external_validator_failed">The input failed the external validator.</message>
<message name="required_not_found">Input is required but no input given.</message>
<message name="too_many_lines">You entered too many lines.</message>
<message name="line_too_long">A line was too long.</message>
<message name="too_long">You entered too many characters.</message>
</messages>
</field>
<field><id>matrixbox_pri</id> <type>FloatField</type>
<values>
<alternate_name></alternate_name>
<css_class></css_class>
<default></default>
<description></description>
<display_maxwidth></display_maxwidth>
<display_width type="int">10</display_width>
<external_validator></external_validator>
<extra></extra>
<hidden type="int">0</hidden>
<required type="int">0</required>
<title>Prix de revient</title>
</values>
<tales>
<default>python:cell.getProperty(key='pri')</default>
</tales>
<messages>
<message name="external_validator_failed">The input failed the external validator.</message>
<message name="required_not_found">Input is required but no input given.</message>
<message name="not_float">You did not enter a floating point number.</message>
</messages>
</field>
</fields>
</group>
</groups>
</form>
\ No newline at end of file
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