Showing posts with label State. Show all posts
Showing posts with label State. Show all posts

parse a comma seperated string in different nodes #xslt 2.0



Below is the XML input:



<performer>
<assignedEntity classCode="ASSIGNED">
<id root="123"/>
<addr>219 city, state, DE, 199</addr>
<assignedPerson classCode="PSN">
<name>Last , First , Middle, 12345</name>
</assignedPerson>
</assignedEntity>
</performer>


Expected XML output:



<Provider>
<ID>12345</ID>
<FName>First</Fname>
<Lname>Last</Lname>
</Provider>


Please give a generalized solution, the above example that I gave does not have fixed text values, these are subject to change.


Thanks,


Read more ...

How to write onchange function for state and country in OpenERP




_coloumns={'state_id': fields.many2one("res.country.state", 'State',required=True),
'country_id': fields.many2one('res.country', 'Country',required=True),
} # in my python file

# my xml file contains this code
<group col="4" colspan="4">
<field name="permanent_address" colspan="4"/>
<field name="birthday"/>
<!--<field name="department_id" on_change="onchange_department_id(department_id)"/>-->
<field name="unit"/>
<!--<field name="vertical_id"/>-->
<field name="gender"/>
<field name="city1"/>
<field name="state_id"/>
<field name="country_id"/>
<field name="mobile"/>
<field name="email"/>
<field name="blood_group"/>
<field name="pan_no"/>
<field name="marital"/>
<field name="anniversary_date" attrs="{'invisible':[('marital','!=','married')]}"/>
</group>


I need output like: `if i type state name(maharastra) in a field the country automatically filled with the country name (india)' enter code here


Read more ...