


<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iBCScorp.com &#187; Keerthi Bandara</title>
	<atom:link href="http://www.ibcscorp.com/author/keerthi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ibcscorp.com</link>
	<description>Internet Business Consulting Services Corporation</description>
	<lastBuildDate>Mon, 06 Feb 2012 00:17:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>OpenERP Custom Sample Module Development &#8211; OpenERP Quick Start Guide</title>
		<link>http://www.ibcscorp.com/application-integration-customization/erp/openerp-2/openerp-custom-module-development-quick-start-guide/</link>
		<comments>http://www.ibcscorp.com/application-integration-customization/erp/openerp-2/openerp-custom-module-development-quick-start-guide/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 09:21:21 +0000</pubDate>
		<dc:creator>Keerthi Bandara</dc:creator>
				<category><![CDATA[OpenERP]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Custom Module]]></category>
		<category><![CDATA[openerp]]></category>

		<guid isPermaLink="false">http://www.ibcscorp.com/?p=2956</guid>
		<description><![CDATA[Introduction This article will explain the basic steps involved in developing custom OpenERP modules. It is a “Hello World” kind of guideline, therefore you won&#8217;t be able to find out all the theories behind OpenObject ]]></description>
			<content:encoded><![CDATA[<h2><em><strong>Introduction</strong></em></h2>
<p>This article will explain the basic steps involved in developing custom OpenERP modules. It is a “Hello World” kind of guideline, therefore you won&#8217;t be able to find out all the theories behind OpenObject platform here. Instead you will get all the necessary information to get started with.</p>
<p>Sample module given here is fully functional and tested on OpenERP version 6.0-RC2 (with Web Client on Chrome browser). You will be able to download the complete source code at the end of this article.</p>
<h2><em><strong>Module Description</strong></em></h2>
<p>The sample module we are going to develop is a simple Notebook application. It helps to take down notes and contains just three fields namely &#8220;Title&#8221;, &#8220;Note&#8221; and &#8220;Date&#8221; in its data model.</p>
<h2><em><strong>Module Structure</strong></em></h2>
<p>An OpenERP module consists of some basic elements as explained below. Note that what is explained here is only the basic files required and structure will be more complex in real world applications.</p>
<ul>
<li><strong>module_name.py</strong> &#8211; contains the application logic and database table structure definition.</li>
<li><strong>__init__.py</strong> &#8211; init script will load the application&#8217;s main python-module and related in application initialization.</li>
<li><strong>view_name.xml</strong> &#8211; contains the application interface definition and menu structure.</li>
<li><strong>__openerp__.py</strong> &#8211; is the module descriptor file. In previous versions of OpenERP this was known as &#8220;__terp__.py&#8221;</li>
</ul>
<h2><em><strong>File Contents</strong></em></h2>
<div>Even though there is no specific order, I am going to start with the main python class (module) of our OpenERP module. This will handle the core functionality of the module and also will generate the database table to store related data.</div>
<h3>[ notebook.py ]</h3>
<p>[python]</p>
<p>from osv import fields, osv<br />
import time</p>
<p>class notebook(osv.osv):<br />
	_name = &quot;notebook&quot;<br />
	_description = &quot;Simple Notebook&quot;<br />
	_columns = {<br />
		&#8216;title&#8217; : fields.char(&#8216;Title&#8217;, size=30, required=True),<br />
		&#8216;note&#8217; : fields.text(&#8216;Note&#8217;),<br />
		&#8216;note_date&#8217; : fields.date(&#8216;Date&#8217;),<br />
	}</p>
<p>notebook()</p>
<p>[/python]</p>
<p>Next we import the python module we created in application initialization script.</p>
<h3>[ __init__.py ]</h3>
<p>[python]</p>
<p>import notebook</p>
<p>[/python]</p>
<p>After that we define the view and menu structure of our module.</p>
<h3>[ notebook_view.xml ]</h3>
<p>[xml]</p>
<p>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />
&lt;openerp&gt;<br />
    &lt;data&gt;<br />
        &lt;record model=&quot;ir.ui.view&quot; id=&quot;notebook_tree_view&quot;&gt;<br />
            &lt;field name=&quot;name&quot;&gt;notebook.tree&lt;/field&gt;<br />
            &lt;field name=&quot;model&quot;&gt;notebook&lt;/field&gt;<br />
            &lt;field name=&quot;type&quot;&gt;tree&lt;/field&gt;<br />
            &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;<br />
                &lt;tree string=&quot;Notebook&quot;&gt;<br />
                    &lt;field name=&quot;title&quot;/&gt;<br />
                    &lt;field name=&quot;note&quot;/&gt;<br />
                    &lt;field name=&quot;note_date&quot;/&gt;<br />
                &lt;/tree&gt;<br />
            &lt;/field&gt;<br />
        &lt;/record&gt;</p>
<p>        &lt;record model=&quot;ir.ui.view&quot; id=&quot;notebook_form_view&quot;&gt;<br />
            &lt;field name=&quot;name&quot;&gt;notebook.form&lt;/field&gt;<br />
            &lt;field name=&quot;model&quot;&gt;notebook&lt;/field&gt;<br />
            &lt;field name=&quot;type&quot;&gt;form&lt;/field&gt;<br />
            &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt;<br />
                &lt;form string=&quot;Notebook&quot;&gt;<br />
                    &lt;field name=&quot;title&quot;/&gt;<br />
                    &lt;field name=&quot;note&quot;/&gt;<br />
                    &lt;field name=&quot;note_date&quot;/&gt;<br />
                &lt;/form&gt;<br />
            &lt;/field&gt;<br />
        &lt;/record&gt;</p>
<p>        &lt;record model=&quot;ir.actions.act_window&quot; id=&quot;action_notebook_form&quot;&gt;<br />
            &lt;field name=&quot;name&quot;&gt;notebook&lt;/field&gt;<br />
            &lt;field name=&quot;res_model&quot;&gt;notebook&lt;/field&gt;<br />
        &lt;/record&gt;</p>
<p>        &lt;menuitem name=&quot;Notebook&quot; icon=&quot;terp-project&quot; id=&quot;notebook_menu&quot;/&gt;</p>
<p>        &lt;menuitem name=&quot;Notes&quot; parent=&quot;notebook_menu&quot; id=&quot;notebook_menu_mainform&quot; action=&quot;action_notebook_form&quot;/&gt;<br />
    &lt;/data&gt;<br />
&lt;/openerp&gt;</p>
<p>[/xml]</p>
<p>Finally create the application descriptor as follows.</p>
<h3>[ __openerp__.py ]</h3>
<p>[python]</p>
<p>{<br />
	&quot;name&quot; : &quot;notebook&quot;,<br />
	&quot;version&quot; : &quot;0.1&quot;,<br />
	&quot;author&quot; : &quot;Keerthi Bandara @ iBCScorp&quot;,<br />
	&quot;website&quot; : &quot;http://www.ibcscorp.com/&quot;,<br />
	&quot;category&quot; : &quot;Generic Modules/Others&quot;,<br />
	&quot;depends&quot; : [&quot;base&quot;],<br />
	&quot;description&quot; : &quot;Simple demo module&quot;,<br />
	&quot;init_xml&quot; : [&quot;notebook_view.xml&quot;],<br />
	&quot;demo_xml&quot; : [],<br />
	&quot;update_xml&quot; : [],<br />
	&quot;active&quot;: False,<br />
	&quot;installable&quot;: True<br />
}</p>
<p>[/python]</p>
<h2><em><strong>Packaging and Installing New Module</strong></em></h2>
<p>To prepare your module for installation, you may simply compress the module directory into a zip archive (e.g. notebook.zip).</p>
<p>Once your module archive is ready, you can continue the installation by following the given path below.</p>
<p>1. Login to OpenERP admin view and open &#8220;Import Module&#8221; screen under &#8220;Modules&#8221; section in &#8220;Administration&#8221; area.  Select newly created module archive and click &#8220;Import Module&#8221; button.</p>
<p><strong>Note:</strong> Sometimes on OpenERP V6 (RC2), the message &#8221;Loading..&#8221; will be continuously displayed, even though your module is successfully imported. In that case simply close the message window and continue to next step.</p>
<p><a href="http://www.ibcscorp.com/wp-content/uploads/2011/01/importing-module.png"><img class="alignnone size-medium wp-image-2977" title="Importing Module" src="http://www.ibcscorp.com/wp-content/uploads/2011/01/importing-module-300x153.png" alt="" width="300" height="153" /></a></p>
<p>2. After importing new module, it will appear under OpenERP &#8220;Modules&#8221; list. It can be easily located by Searching for the module name. Once you found the module, mark it for installation, then select the check box in front of the module and click &#8220;Apply Scheduled Upgrades&#8221; link.</p>
<p><a href="http://www.ibcscorp.com/wp-content/uploads/2011/01/search-module.png"><img class="alignnone size-medium wp-image-2981" title="Search Module" src="http://www.ibcscorp.com/wp-content/uploads/2011/01/search-module-300x149.png" alt="" width="300" height="149" /></a> <a href="http://www.ibcscorp.com/wp-content/uploads/2011/01/applying-changes.png"><img class="alignnone size-medium wp-image-2976" title="Applying Changes" src="http://www.ibcscorp.com/wp-content/uploads/2011/01/applying-changes-300x146.png" alt="" width="300" height="146" /></a></p>
<p>Click on &#8220;Start update&#8221; to continue the installation.</p>
<p><a href="http://www.ibcscorp.com/wp-content/uploads/2011/01/installing-module.png"><img class="alignnone size-medium wp-image-2978" title="Installing Module" src="http://www.ibcscorp.com/wp-content/uploads/2011/01/installing-module-300x146.png" alt="" width="300" height="146" /></a></p>
<h2><em>Accessing Your Module</em></h2>
<div style="padding: 0px; margin: 0px;">After installing your module successfully, it will appear on the home screen of your OpenERP client as follows.</div>
<div id="_mcePaste" style="padding: 0px; margin: 0px;"><a href="http://www.ibcscorp.com/wp-content/uploads/2011/01/new-module-in-home-screen.png"><img class="alignnone size-medium wp-image-2980" title="new-module-in-home-screen" src="http://www.ibcscorp.com/wp-content/uploads/2011/01/new-module-in-home-screen-300x152.png" alt="" width="300" height="152" /></a> <a href="http://www.ibcscorp.com/wp-content/uploads/2011/01/module-in-action.png"><img class="alignnone size-medium wp-image-2979" title="module-in-action" src="http://www.ibcscorp.com/wp-content/uploads/2011/01/module-in-action-300x146.png" alt="" width="300" height="146" /></a></div>
<div style="padding: 0px; margin: 0px; margin-top: 10px; margin-bottom: 10px;">The sample source code explained above is available <a style="color: #0071bb; outline-style: none; outline-width: initial; outline-color: initial; padding: 0px; margin: 0px;" href="http://www.ibcscorp.com/wp-content/uploads/2011/01/notebook.zip">here</a>.</div>
<h2><em><strong>Conclusion</strong></em></h2>
<div id="_mcePaste">Motivation behind preparing this article was the difficulty I have faced in finding out a proper start up guide in custom OpenERP module development. Even official <a href="http://doc.openerp.com/developer/2_4_module_development/4_3_create_module.html" target="_blank">documentation</a> appeared to be incomplete/inconsistent at the moment of writing this article.</div>
<div id="_mcePaste">Anyway there is a lot more to explore in OpenERP module development. As an OpenERP partner, iBCScorp is always willing to help you in your OpenERP implementation project. If you found this post useful just leave a comment and do not hesitate to contact us on any OpenERP related issue.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ibcscorp.com/application-integration-customization/erp/openerp-2/openerp-custom-module-development-quick-start-guide/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CakePHP Samples</title>
		<link>http://www.ibcscorp.com/custom-programming/cake-php/cakephp-samples/</link>
		<comments>http://www.ibcscorp.com/custom-programming/cake-php/cakephp-samples/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 16:13:12 +0000</pubDate>
		<dc:creator>Keerthi Bandara</dc:creator>
				<category><![CDATA[Cake PHP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://www.ibcscorp.com/?p=2043</guid>
		<description><![CDATA[This post provides some sample source code segment, extracted from our previously developed systems. The intention here is to depict the coding practices we apply within iBCScorp. Samples given below are based on CakePHP MVC ]]></description>
			<content:encoded><![CDATA[<p>This post provides some sample source code segment, extracted from our previously developed systems. The intention here is to depict the coding practices we apply within iBCScorp.</p>
<p>Samples given below are based on CakePHP MVC framework. iBCScorp has involved in CakePHP development since the version 1.1. After that we have continued with 1.2.x releases and then absorbed 1.3.x releases into our developments later on.</p>
<p>iBCScorp started using CakePHP 1.3 in projects since its pre-stable releases. Adopting the new version early helped iBCScorp to keep its source code clean and tight with new syntactical improvements, while avoiding version upgrades in near future.</p>
<p>FreedomTravel4You.com is one of the sites built on CakePHP 1.3. Following code segment is extracted from its codebase. (agent_tree_controller.php).</p>
<p>[php]<br />
&lt;?php<br />
	/**<br />
	 * Short description for file<br />
	 * This file handles the Agent Tree View functionality<br />
	 *<br />
	 * PHP versions &gt; 5.0, CakePHP versions &gt; 1.3<br />
	 *<br />
	 * @package    FreedomTravel4You.com<br />
	 * @author     iBCScorp.<br />
	 * @copyright  iBCScorp.<br />
	 * @license    As described below<br />
	 * @version    1.0.0<br />
	 * @since      File available since Release 1.1.0 dt. Friday, 04 December, 2009<br />
	 */<br />
	/*********************************************************<br />
	* Licence:<br />
	* This file is sole property of the installer.<br />
	* Any type of copy or reproduction without the consent<br />
	* of owner is prohibited.<br />
	* If in any case used leave this part intact without<br />
	* any modification.<br />
	* All Rights Reserved<br />
	* Copyright 2009 Owner<br />
	*******************************************************/</p>
<p>class AgentTreeController extends AppController {</p>
<p>	var $name = &#8216;AgentTree&#8217;;</p>
<p>	var $uses = array(&#8216;User&#8217;, &#8216;UserTree&#8217;);<br />
	var $components = array(&#8216;Auth&#8217;);</p>
<p>	var $helpers = array(&#8216;Html&#8217;, &#8216;Javascript&#8217;, &#8216;TreeView&#8217;);</p>
<p>	function beforeFilter() {</p>
<p>		if($this-&gt;Session-&gt;read(&#8216;user_info.admin&#8217;)){<br />
			$this-&gt;set(&#8216;menu_type&#8217;, &#8216;admin&#8217;);<br />
		} else {<br />
			$this-&gt;set(&#8216;menu_type&#8217;, &#8216;agent&#8217;);<br />
		}</p>
<p>		$this-&gt;set(&#8216;show_side_bar&#8217;, 0);<br />
	}</p>
<p>	function index($element_id = null) {</p>
<p>		$this-&gt;common_tree_info($element_id);</p>
<p>		$this-&gt;set(&#8216;page_title&#8217;, &#8216;Agent&#8217;);<br />
	}</p>
<p>	// Action to display unassigned users for logged in agent<br />
	function assign_agent() {</p>
<p>		$curr_user_id = $this-&gt;Session-&gt;read(&#8216;Auth.User.id&#8217;);</p>
<p>		$unassigned_childrens = $this-&gt;User-&gt;get_unassigned_children($curr_user_id);<br />
		$this-&gt;set(&#8216;unassigned_childrens&#8217;, $unassigned_childrens);<br />
		$this-&gt;set(&#8216;page_title&#8217;, &#8216;Agent&#8217;);<br />
	}</p>
<p>	// Display tree view to assign new agents to tree<br />
	function add_to_tree($element_id = null) {</p>
<p>		$new_child_id;</p>
<p>		if(isset($this-&gt;params['form']['child_id'])){<br />
			$new_child_id = $this-&gt;params['form']['child_id'];</p>
<p>			// Store selected child-id to be assigned to tree<br />
			$this-&gt;Session-&gt;write(&#8216;child_to_be_assigned&#8217;, $new_child_id);</p>
<p>		} elseif($this-&gt;Session-&gt;check(&#8216;child_to_be_assigned&#8217;)) {<br />
			$new_child_id = $this-&gt;Session-&gt;read(&#8216;child_to_be_assigned&#8217;);<br />
		} else {<br />
			$this-&gt;redirect(&#8216;/agent_tree/assign_agent&#8217;);<br />
			exit(0);<br />
		}</p>
<p>		// get the child name for particular id<br />
		$new_child_info = $this-&gt;User-&gt;find(&#8216;first&#8217;, array(<br />
									&#8216;conditions&#8217; =&gt; array(&#8216;id&#8217; =&gt; $new_child_id),<br />
									&#8216;fields&#8217; =&gt; array(&#8216;first_name&#8217;)<br />
									));</p>
<p>		// Call the common function to initialize tree<br />
		$this-&gt;common_tree_info($element_id);</p>
<p>		$this-&gt;set(&#8216;new_agent_name&#8217;, $new_child_info['User']['first_name']);<br />
		$this-&gt;set(&#8216;page_title&#8217;, &#8216;Agent&#8217;);<br />
	}</p>
<p>	// Funtion to apend child to tree (last step)<br />
	function append_child() {</p>
<p>		$child = explode(&quot;_&quot;, trim($this-&gt;params['form']['child_id']));</p>
<p>		$tree_data = array();</p>
<p>		$tree_data['UserTree']['parent_id'] = $child[0];<br />
		$tree_data['UserTree']['child_position'] = $child[1];<br />
		$tree_data['UserTree']['child_id'] = $child[2]; // Tree ID of the new Agent</p>
<p>		$this-&gt;UserTree-&gt;create();<br />
		$this-&gt;UserTree-&gt;save($tree_data);</p>
<p>		$new_user_id = $this-&gt;Session-&gt;read(&#8216;child_to_be_assigned&#8217;);</p>
<p>		$this-&gt;User-&gt;id = $new_user_id;<br />
		$this-&gt;User-&gt;saveField(&#8216;tree_id&#8217;, $child[2]);</p>
<p>		$this-&gt;redirect(&#8216;/agent_tree/index&#8217;);</p>
<p>		exit(0);<br />
	}</p>
<p>	// Common function to initialize tree view.<br />
	private function common_tree_info($element_id = null) {</p>
<p>		// Get user tree ID<br />
		$curr_user_id = $this-&gt;Session-&gt;read(&#8216;Auth.User.id&#8217;);<br />
		$curr_user_info = $this-&gt;User-&gt;find(&#8216;first&#8217;, array(<br />
											&#8216;conditions&#8217; =&gt; array(&#8216;id&#8217;=&gt; $curr_user_id),<br />
											&#8216;fields&#8217; =&gt;<br />
												array(&#8216;first_name&#8217;, &#8216;tree_id&#8217;, &#8216;parent_available&#8217;)<br />
											));</p>
<p>		// If this user is not yet appended to the tree disable this functionality<br />
		if($curr_user_info['User']['parent_available'] == 0) {<br />
			$this-&gt;redirect(&#8216;/agent_tree/user_not_assigned&#8217;);<br />
			exit(0);<br />
		}</p>
<p>		$tree_id  = &#8221;;	// tree id of the current root node</p>
<p>		// Get the user info for root element i.e. logged in or requested<br />
		if(isset($element_id)){<br />
			$tree_id = $element_id;<br />
		} else {<br />
			$tree_id = $curr_user_info['User']['tree_id'];<br />
		}</p>
<p>		$root_info = $this-&gt;User-&gt;get_root_node_info($tree_id);</p>
<p>		//reference_id of the current user or requested root element<br />
		$this-&gt;set(&#8216;root_reference_id&#8217;, $root_info['u']['reference_id']);</p>
<p>		// first name of the current root element<br />
		$root_name  = $root_info['u']['first_name'] . &#8216; &#8216; . $root_info['u']['last_name'];<br />
		$this-&gt;set(&#8216;root_name&#8217;, $root_name);</p>
<p>		//id of the current root node<br />
		$this-&gt;set(&#8216;root_id&#8217;, $root_info['u']['id']);</p>
<p>		//logged in user&#8217;s id<br />
		$this-&gt;set(&#8216;user_id&#8217;, $curr_user_id);</p>
<p>		//tree_id of the current user or requested root element<br />
		$this-&gt;set(&#8216;root_node&#8217;, $root_info['u']['tree_id']);</p>
<p>		// Used to display move up link<br />
		$this-&gt;set(&#8216;up_level_id&#8217;, $root_info['t']['parent_id']);</p>
<p>	}</p>
<p>	// Action to display on tree view, when logged in user is not assigned to the tree<br />
	function user_not_assigned() {<br />
		$this-&gt;set(&#8216;page_title&#8217;, &#8216;Agent&#8217;);<br />
	}</p>
<p>	function search_agent() {<br />
		$this-&gt;layout = &#8216;ajax&#8217;;<br />
		Configure::write(&#8216;debug&#8217;, 0);</p>
<p>		$search_value = trim($this-&gt;params['named']['q']);</p>
<p>		// Check the type of search criteria<br />
		$search_type = &#8221;;</p>
<p>		// Check whether it is an email<br />
		if(stripos($search_value, &#8216;@&#8217;) !== FALSE) {<br />
			$search_type = &#8216;TYPE_EMAIL&#8217;;<br />
		} elseif (!is_numeric(substr($search_value, 0 , 2)) &amp;&amp;<br />
								is_numeric(substr($search_value, 2 , 6))){ // Check for reference number<br />
			$search_type = &#8216;TYPE_REF&#8217;;<br />
		} else { // Value is a name<br />
			$search_type = &#8216;TYPE_NAME&#8217;;<br />
		}</p>
<p>		$conditions = array();</p>
<p>		// Check whether email or reference # to be searched<br />
		if($search_type == &#8216;TYPE_REF&#8217;) { // ref #<br />
			$conditions['and'] = array(<br />
									&#8216;reference_id&#8217; =&gt; $search_value,<br />
									&#8216;tree_id not&#8217; =&gt; &#8216;NULL&#8217;<br />
								);</p>
<p>		} elseif($search_type == &#8216;TYPE_EMAIL&#8217;) { // email</p>
<p>			$conditions['and'] = array(<br />
									&#8216;email&#8217; =&gt; $search_value,<br />
									&#8216;tree_id not&#8217; =&gt; &#8216;NULL&#8217;<br />
								);</p>
<p>		} elseif($search_type == &#8216;TYPE_NAME&#8217;) {</p>
<p>			$conditions['and'] = array(<br />
										&#8216;or&#8217; =&gt; array(&#8216;first_name like&#8217; =&gt; &#8216;%&#8217; . $search_value . &#8216;%&#8217;,<br />
														&#8216;last_name like&#8217; =&gt; &#8216;%&#8217; . $search_value . &#8216;%&#8217;<br />
												),<br />
										&#8216;tree_id not&#8217; =&gt; &#8216;NULL&#8217;<br />
								);<br />
		}</p>
<p>		$result = $this-&gt;User-&gt;find(&#8216;all&#8217;, array(<br />
										&#8216;fields&#8217; =&gt; array(&#8216;reference_id&#8217;, &#8216;first_name&#8217;,<br />
															&#8216;last_name&#8217;, &#8216;email&#8217;, &#8216;tree_id&#8217;),<br />
										&#8216;conditions&#8217; =&gt; $conditions<br />
									));</p>
<p>		$output = &quot;&quot;;</p>
<p>		if(sizeof($result)) {<br />
			foreach($result as $r) {<br />
				$output .= $r['User']['tree_id'] . &quot;|&quot; .<br />
							$r['User']['first_name'] . &quot; &quot; . $r['User']['last_name'] . &quot;|&quot; .<br />
							$r['User']['email'] . &quot;|&quot; .<br />
							$r['User']['reference_id'];</p>
<p>				$output .= &#8216;^&#8217;;<br />
			}</p>
<p>			$output = rtrim($output, &#8216;^&#8217;); // Removing the trailing ^ character at the end of output text</p>
<p>		} else {<br />
			$output = &quot;NO&quot;;<br />
		}</p>
<p>		$this-&gt;set(&#8216;search_result&#8217;, $output);</p>
<p>	}</p>
<p>}</p>
<p>?&gt;</p>
<p>[/php]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ibcscorp.com/custom-programming/cake-php/cakephp-samples/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenERP : Customizing Task View &#8211; Project Management Module</title>
		<link>http://www.ibcscorp.com/application-integration-customization/erp/openerp-2/openerp-customizing-task-view-project-management-module/</link>
		<comments>http://www.ibcscorp.com/application-integration-customization/erp/openerp-2/openerp-customizing-task-view-project-management-module/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 14:24:13 +0000</pubDate>
		<dc:creator>Keerthi Bandara</dc:creator>
				<category><![CDATA[OpenERP]]></category>
		<category><![CDATA[openerp]]></category>
		<category><![CDATA[OpenERP Customization]]></category>
		<category><![CDATA[Project Management]]></category>

		<guid isPermaLink="false">http://www.ibcscorp.com/?p=1454</guid>
		<description><![CDATA[Adding Task Creator to Project / Task View OpenERP Project Management module provides great set of features in managing daily tasks within the organization. By default, the Task Detail page does not display the person ]]></description>
			<content:encoded><![CDATA[<h2>Adding Task Creator to Project / Task View</h2>
<p>OpenERP Project Management module provides great set of features in managing daily tasks within the organization.</p>
<p>By default, the Task Detail page does not display the person who created the task. As the task assigner, it is really important to identify the person who has created/assigned a particular task.</p>
<p>With the OpenERP&#8217;s rich support/flexibility in customizations, this can be resolved in no time.</p>
<p><span id="more-1454"></span></p>
<p>In the database, the OpenERP task table (project_task) already contains a field to store the ID of the person who created particular record. We can use this field in implementing our requirement.</p>
<p style="padding-left: 30px;"><strong><span style="color: #800000;">Table : project_task<br />
Column : create_uid</span></strong></p>
<p>We start customization from the model, then move on to the view.</p>
<h2>Modifying Model</h2>
<ul>
<li>Find out the model related to Project-Task. As it is used as a default OpenERP installation on Ubuntu, path used here appears like this.</li>
</ul>
<p style="padding-left: 30px;"><strong><span style="color: #800000;">/usr/lib/openerp-server/addons/project/project.py</span></strong></p>
<p style="padding-left: 30px;">Note that whatever the way you installed OpenERP server, all the modules go in side the ‘addons’ directory in your installation directory.</p>
<ul>
<li>Locate the class definition for Task.</li>
</ul>
<p style="padding-left: 30px;"><span style="color: #800000;"><strong>i.e. class task(osv.osv):</strong></span></p>
<ul>
<li>Append a new column definition to the columns declaration in task class as follows.  (i.e. _columns)</li>
</ul>
<p style="padding-left: 30px;"><strong><span style="color: #800000;">&#8216;create_uid&#8217;: fields.many2one(&#8216;res.users&#8217;, &#8216;Created By&#8217;),</span></strong></p>
<p style="padding-left: 30px;">Save the file.</p>
<ul>
<li>It might be necessary to reload/restart OpenERP server to apply the change made.</li>
</ul>
<p>Now changing Model is done and we can continue to View part.</p>
<h2>Modifying View</h2>
<ul>
<li>Login to the system through Web-Client as the administrator.</li>
</ul>
<ul>
<li>There are alternatives, but one path followed is given below.</li>
</ul>
<p style="padding-left: 30px;"><span style="color: #800000;"><strong>Project Mangement (from main menu)   &gt;&gt;   Tasks   &gt;&gt;   All Tasks</strong></span></p>
<ul>
<li>On the “All Tasks” page, you’d be able to locate a small button/link named [CUSTOMIZE] at the left-bottom corner of the page (just below the “import | export” links). Click on it, small menu will appear.</li>
</ul>
<p><a href="http://www.ibcscorp.com/wp-content/uploads/2010/09/OpenERP-Customize-View.png"><img class="alignnone size-large wp-image-1456" src="http://www.ibcscorp.com/wp-content/uploads/2010/09/OpenERP-Customize-View-1024x237.png" alt="OpenERP Customize View" width="1024" height="237" /></a></p>
<ul>
<li>Select “Manage View”.</li>
</ul>
<ul>
<li>Select the view name “project.task.form” from the pop-up window then click Edit.</li>
</ul>
<ul>
<li>To add the new field below the progress bar in task description page, click on the (+) sign in front of progress-bar XML element.</li>
</ul>
<p style="padding-left: 30px;">(i.e. &lt;field name=&#8221;progress&#8221;&gt;). Small pop-up window will appear.</p>
<p><a href="http://www.ibcscorp.com/wp-content/uploads/2010/09/OpenERP-View-Editor-Project-Task.png"><img class="alignnone size-medium wp-image-1458" src="http://www.ibcscorp.com/wp-content/uploads/2010/09/OpenERP-View-Editor-Project-Task-300x208.png" alt="OpenERP View Editor Project Task" width="300" height="208" /></a></p>
<ul>
<li> Select Node type “Field”, then “create_uid” in next drop down, then select “Update” link.</li>
</ul>
<ul>
<li>On the Properties window that appears next, custom field properties accordingly. Also, selecting the correct group will be necessary.</li>
</ul>
<p>That’s all. Click on a task and move to Task Detail view. Newly added field should appear there (anyway it should be read-only property).</p>
<p><a href="http://www.ibcscorp.com/wp-content/uploads/2010/09/OpenERP-Task-Details.png"><img class="alignnone size-medium wp-image-1457" src="http://www.ibcscorp.com/wp-content/uploads/2010/09/OpenERP-Task-Details-300x176.png" alt="" width="300" height="176" /></a></p>
<h2>Conclusion</h2>
<p>What is explained above is a simple illustration of OpenERP&#8217;s flexibility in customization. Similarly it is possible to introduce new fields to the system according to the organizational needs. In this case specifically for the Project Management Module.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ibcscorp.com/application-integration-customization/erp/openerp-2/openerp-customizing-task-view-project-management-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determine the best way to automate Sitemaps</title>
		<link>http://www.ibcscorp.com/web-marketing/determine-the-best-way-to-automate-sitemaps/</link>
		<comments>http://www.ibcscorp.com/web-marketing/determine-the-best-way-to-automate-sitemaps/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 12:17:09 +0000</pubDate>
		<dc:creator>Keerthi Bandara</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Marketing]]></category>
		<category><![CDATA[Ask.com]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Bing]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Site maps]]></category>
		<category><![CDATA[Sitemaps]]></category>
		<category><![CDATA[Sitemaps Generator]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://ibcscorp.com/?p=200</guid>
		<description><![CDATA[In simple terms, a sitemap (or site map) is a list of all the pages in your website. Sitemaps provide two benefits: easier navigation (for visitors of your site) and better visibility by search engines. ]]></description>
			<content:encoded><![CDATA[<p>In simple terms, a sitemap (or site map) is a list of all the pages in your website. Sitemaps provide two benefits:  easier navigation (for visitors of your site) and better visibility by search engines. </p>
<p>With the rise of modern SEO techniques the importance of the sitemap has been growing. Sitemaps are the best way to inform search engines about changes on your website.</p>
<p>As a development company, we always apply current SEO techniques on our customer&#8217;s websites to ensure that they get top ranking on search engines. Not only on Google, but Yahoo, Bing and Ask.com etc. as well. </p>
<p>Including sitemaps is one of the important tasks we perform when developing sites for our clients. And this is done either manually or dynamically according to the customer needs.</p>
<p>Typically a good site with lots of content changes regularly.  In this case it is expensive and tedious to continually update the site map.  For this reason, we feel that in some cases it is important to be able to auto generate a sitemap.</p>
<p>We evaluated some sitemap auto generating tools and following are some of the solutions we like:</p>
<ul>
<li><a href="http://wordpress.org/extend/plugins/google-sitemap-generator/">Google XML Sitemaps [ http://wordpress.org/extend/plugins/google-sitemap-generator/ ]</a>
<ul>
<li>It is a plugin for WordPress sites, which automatically updates the sitemap and notifies all major search engines every time you create a new post/content.</li>
</ul>
</li>
</ul>
<ul>
<li><a href="http://www.addme.com/ror-sitemap-generator.htm">Addme.com [ http://www.addme.com/ror-sitemap-generator.htm ].</a>
<ul>
<li>An online tool dedicated for sites developed using Ruby on Rails (ROR)</li>
</ul>
</li>
</ul>
<ul>
<li><a href="http://www.neuroticweb.com/recursos/sitemap/">Google Site Map Generator [ http://www.neuroticweb.com/recursos/sitemap/ ]</a>
<ul>
<li>Another simple online tool to generate site maps.</li>
</ul>
</li>
</ul>
<ul>
<li><a href="http://www.phpclasses.org/browse/package/2612.html">PHPClasses.org [ http://www.phpclasses.org/browse/package/2612.html ]</a>
<ul>
<li>A class library which can be integrated with PHP sites.</li>
</ul>
</li>
</ul>
<p>It is obvious that selecting a sitemap generating mechanism is depending on several facts such as the nature of the site, sever side technology used etc. So making the correct decision is up to your experience in SEO and web development team.</p>
<p>Contact us if you would like help generating a sitemap for your site, have general web marketing, seo, or web design questions&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ibcscorp.com/web-marketing/determine-the-best-way-to-automate-sitemaps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

