Amit (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-kanban-views into lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kanban-views/+merge/77448
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kanban-views/+merge/77448
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-kanban-views.
=== modified file 'hr/__openerp__.py'
--- hr/__openerp__.py	2011-07-18 08:34:24 +0000
+++ hr/__openerp__.py	2011-09-29 05:51:51 +0000
@@ -38,7 +38,7 @@
     'author': 'OpenERP SA',
     'website': 'http://www.openerp.com',
     'images': ['images/hr_department.jpeg', 'images/hr_employee.jpeg','images/hr_job_position.jpeg'],
-    'depends': ['base_setup', 'resource', 'board'],
+    'depends': ['base_setup','mail', 'resource', 'board'],
     'init_xml': [],
     'update_xml': [
         'security/hr_security.xml',

=== modified file 'hr/hr.py'
--- hr/hr.py	2011-09-15 13:01:51 +0000
+++ hr/hr.py	2011-09-29 05:51:51 +0000
@@ -154,7 +154,9 @@
         'coach_id': fields.many2one('hr.employee', 'Coach'),
         'job_id': fields.many2one('hr.job', 'Job'),
         'photo': fields.binary('Photo'),
-        'passport_id':fields.char('Passport No', size=64)
+        'passport_id':fields.char('Passport No', size=64),
+        'color': fields.integer('Color Index'),
+        'city': fields.related('address_id', 'city', type='char', string='City'),
     }
 
     def unlink(self, cr, uid, ids, context=None):
@@ -203,6 +205,7 @@
         'active': 1,
         'photo': _get_photo,
         'marital': 'single',
+        'color': 0,
     }
 
     def _check_recursion(self, cr, uid, ids, context=None):

=== modified file 'hr/hr_view.xml'
--- hr/hr_view.xml	2011-09-20 10:10:01 +0000
+++ hr/hr_view.xml	2011-09-29 05:51:51 +0000
@@ -125,7 +125,70 @@
                 </search>
              </field>
          </record>
-
+        <!-- HR Kanban View  -->
+    <record model="ir.ui.view" id="hr_kanban_view_employees">
+        <field name="name">HR - Employess Kanban</field>
+        <field name="model">hr.employee</field>
+        <field name="type">kanban</field>
+        <field name="arch" type="xml">
+            <kanban default_group_by="department_id">
+                <templates>
+                    <t t-name="kanban-box">
+                        <t t-set="color" t-value="kanban_color(record.color.raw_value || record.name.raw_value)"/>
+                        <div t-att-class="color + (record.color.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
+                            <div class="oe_kanban_box oe_kanban_color_border">
+                                <div class="oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
+                                    <table class="oe_kanban_table">
+                                        <tr>
+                                            <td class="oe_kanban_title1" align="left" valign="middle"><field name="name"/></td>
+                                            <td valign="top" width="22">
+                                                <img t-att-src="kanban_gravatar(record.user_id.value, 22)" class="oe_kanban_gravatar"/>
+                                            </td>
+                                        </tr>
+                                    </table>
+                                </div>
+                                <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
+                                    <table class="oe_kanban_table">
+                                        <tr>
+                                            <td valign="top" width="22">
+                                                <t t-if="record.photo.raw_value">
+                                                    <img t-att-src="'data:image/png;base64,'+record.photo.raw_value" width='48' height='48'/>
+                                                </t>
+                                                <t t-if="!record.photo.raw_value">
+                                                    <img src="/web/static/src/img/employee.png"/>
+                                                </t> 
+                                            </td>
+                                            <td>
+                                                <div class="oe_kanban_title2"><field name="job_id"/></div>
+                                                <div class="oe_kanban_title3">
+                                                    <field name="department_id"/>
+                                                    <t t-if="record.department_id.raw_value &amp;&amp; record.city.raw_value">,</t>
+                                                    <field name="city"/>
+                                                </div>
+                                                <div class="oe_kanban_title3">
+                                                    <i><field name="work_email"/>
+                                                    <t t-if="record.work_phone.raw_value &amp;&amp; record.work_email.raw_value">,</t>
+                                                    <field name="work_phone"/></i>
+                                                </div>
+                                            </td>
+                                        </tr>
+                                    </table>
+                                </div>
+                                <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
+                                    <div class="oe_kanban_left">
+                                        <a string="Edit" icon="gtk-edit" type="edit"/>                                    
+                                        <a string="Change Color" icon="color-picker" type="color" name="color"/>
+                                        <a string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
+                                    </div>
+                                    <br class="oe_kanban_clear"/>
+                                </div>
+                            </div>
+                        </div>
+                    </t>
+                </templates>
+            </kanban>
+        </field>
+    </record>
         <record id="open_view_employee_tree" model="ir.actions.act_window">
             <field name="name">Employees Structure</field>
             <field name="res_model">hr.employee</field>
@@ -149,13 +212,27 @@
             <field name="name">Employees</field>
             <field name="res_model">hr.employee</field>
             <field name="view_type">form</field>
-            <field name="view_mode">tree,form</field>
+            <field name="view_mode">tree,form,kanban</field>
             <field name="domain">[]</field>
             <field name="context">{"search_default_department_id": department_id,"search_default_active":eval('True')}</field>
             <field name="view_id" ref="view_employee_tree"/>
             <field name="search_view_id" ref="view_employee_filter"/>
             <field name="help">Here you can manage your work force by creating employees and assigning them specific properties in the system. Maintain all employee related information and keep track of anything that needs to be recorded for them. The personal information tab will help you maintain their identity data. The Categories tab gives you the opportunity to assign them related employee categories depending on their position and activities within the company. A category can be a seniority level within the company or a department. The Timesheets tab allows to assign them a specific timesheet and analytic journal where they will be able to enter time through the system. In the note tab, you can enter text data that should be recorded for a specific employee.</field>
         </record>
+        
+        <record id="open_view_employee_list_my_tree2" model="ir.actions.act_window.view">
+            <field name="sequence" eval="1"/>
+            <field name="view_mode">tree</field>
+            <field name="view_id" ref="view_employee_tree"/>
+            <field name="act_window_id" ref="open_view_employee_list_my"/>
+        </record>
+        
+        <record id="open_view_employee_list_my_form2" model="ir.actions.act_window.view">
+            <field name="sequence" eval="2"/>
+            <field name="view_mode">form</field>
+            <field name="view_id" ref="view_employee_form"/>
+            <field name="act_window_id" ref="open_view_employee_list_my"/>
+        </record> 
 
         <menuitem action="open_view_employee_list_my" id="menu_open_view_employee_list_my" sequence="3" parent="menu_hr_main"/>
 

=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py	2011-09-24 14:20:21 +0000
+++ hr_recruitment/hr_recruitment.py	2011-09-29 05:51:51 +0000
@@ -180,6 +180,7 @@
                                 multi='day_open', type="float", store=True),
         'day_close': fields.function(_compute_day, string='Days to Close', \
                                 multi='day_close', type="float", store=True),
+        'color': fields.integer('Color Index'),
     }
 
     def _get_stage(self, cr, uid, context=None):
@@ -194,6 +195,7 @@
         'priority': lambda *a: '',
         'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
         'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
+        'color': 0,
     }
 
     def onchange_job(self,cr, uid, ids, job, context=None):
@@ -442,6 +444,21 @@
         res = super(hr_applicant, self).case_reset(cr, uid, ids, *args)
         self.write(cr, uid, ids, {'date_open': False, 'date_closed': False})
         return res
+    
+    def set_priority(self, cr, uid, ids, priority):
+        """Set lead priority
+        """
+        return self.write(cr, uid, ids, {'priority' : priority})
+
+    def set_high_priority(self, cr, uid, ids, *args):
+        """Set lead priority to high
+        """
+        return self.set_priority(cr, uid, ids, '1')
+
+    def set_normal_priority(self, cr, uid, ids, *args):
+        """Set lead priority to normal
+        """
+        return self.set_priority(cr, uid, ids, '3')
 
     def write(self, cr, uid, ids, vals, context=None):
         if 'stage_id' in vals and vals['stage_id']:

=== modified file 'hr_recruitment/hr_recruitment_menu.xml'
--- hr_recruitment/hr_recruitment_menu.xml	2011-08-16 12:21:44 +0000
+++ hr_recruitment/hr_recruitment_menu.xml	2011-09-29 05:51:51 +0000
@@ -6,7 +6,7 @@
          <record model="ir.actions.act_window" id="crm_case_categ0_act_job">
             <field name="name">Applicants</field>
             <field name="res_model">hr.applicant</field>
-            <field name="view_mode">tree,form,graph,calendar</field>
+            <field name="view_mode">tree,form,graph,calendar,kanban</field>
             <field name="view_id" ref="crm_case_tree_view_job"/>
             <field name="context">{"search_default_user_id":uid, 'search_default_current': 1,"search_default_department_id": department_id}</field>
             <field name="search_view_id" ref="view_crm_case_jobs_filter"/>

=== modified file 'hr_recruitment/hr_recruitment_view.xml'
--- hr_recruitment/hr_recruitment_view.xml	2011-09-25 02:13:39 +0000
+++ hr_recruitment/hr_recruitment_view.xml	2011-09-29 05:51:51 +0000
@@ -277,7 +277,81 @@
         </field>
     </record>
 
+	<!-- hr Applicant Kanban View -->
 
+	<record model="ir.ui.view" id="hr_kanban_view_applicant">
+        <field name="name">Hr Applicants kanban</field>
+        <field name="model">hr.applicant</field>
+        <field name="type">kanban</field>
+        <field name="arch" type="xml">
+            <kanban default_group_by="stage_id">
+                <templates>
+                    <t t-name="kanban-box">
+                        <t t-set="color" t-value="kanban_color(record.color.raw_value || record.state.raw_value)"/>
+                        <div t-att-class="color + (record.priority.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
+                            <div class="oe_kanban_box oe_kanban_color_border">
+                                <div class="oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
+                                    <table class="oe_kanban_table">
+                                        <tr>
+                                            <td class="oe_kanban_title1" align="left" valign="middle">
+                                                <a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority" />
+                                                <a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
+                                                <field name="partner_name"/>
+                                            </td>
+                                            <td valign="top" width="22">
+                                                <img t-att-src="kanban_gravatar(record.user_id.value, 22)" class="oe_kanban_gravatar"/>
+                                            </td>
+                                        </tr>
+                                    </table>
+                                </div>
+                                <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
+                                    <table class="oe_kanban_table">
+                                        <tr>
+                                            <td>
+                                                <div class="oe_kanban_right oe_kanban_small">
+                                                    <field name="user_id"/>
+                                                </div>
+                                                <div class="oe_kanban_title2">
+                                                    <field name="job_id"/>
+                                                    <t t-if="record.priority.raw_value == 0"></t>
+                                                    <t t-if="record.priority.raw_value == 5">(Not Good)</t>
+                                                    <t t-if="record.priority.raw_value == 4">(On Average)</t>
+                                                    <t t-if="record.priority.raw_value == 3">(Good)</t>
+                                                    <t t-if="record.priority.raw_value == 2">(Very Good)</t>
+                                                    <t t-if="record.priority.raw_value == 1">(Excellent)</t>
+                                                </div>
+                                                <div class="oe_kanban_title3">
+                                                    <field name="type_id"/>
+                                                </div>
+                                                <div class="oe_kanban_title3">
+                                                    <i><field name="date_action"/><field name="title_action"/></i>
+                                                </div>
+                                            </td>
+                                        </tr>
+                                    </table>
+                                </div>
+                                <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
+                                    <div class="oe_kanban_left">
+                                        <a string="Edit" icon="gtk-edit" type="edit"/>
+                                        <a string="Change Color" icon="color-picker" type="color" name="color"/>
+                                        <a string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
+                                        <a string="Add Internal Note" name="%(crm.action_crm_add_note)d" context="{'model': 'crm.lead' }" icon="terp-document-new" type="action"/>
+                                        <a name="action_makeMeeting" type="object" string="Schedule Meeting" icon="gtk-redo" />
+                                        <a t-if="record.survey.raw_value" name="action_print_survey" type="object" string="Print Interview" icon="gtk-print" />
+                                    </div>
+                                    <div class="oe_kanban_right">
+                                        <a name="case_open" string="Mark Won" states="pending,draft" type="object" icon="lead-stage-won" />
+                                        <a name="case_pending" string="Mark Lost" states="draft,open" type="object" icon="lead-stage-lost" />
+                                    </div>
+                                    <br class="oe_kanban_clear"/>
+                                </div>
+                            </div>
+                        </div>
+                    </t>
+                </templates>
+            </kanban>
+        </field>
+    </record>
     # ------------------------------------------------------
     # HR Job
     # ------------------------------------------------------

=== added file 'product/images/product.png'
Binary files product/images/product.png	1970-01-01 00:00:00 +0000 and product/images/product.png	2011-09-29 05:51:51 +0000 differ
=== modified file 'product/product.py'
--- product/product.py	2011-09-25 22:15:43 +0000
+++ product/product.py	2011-09-29 05:51:51 +0000
@@ -460,6 +460,7 @@
         'active': lambda *a: 1,
         'price_extra': lambda *a: 0.0,
         'price_margin': lambda *a: 1.0,
+        'color': 0,
     }
 
     _name = "product.product"
@@ -486,8 +487,10 @@
         'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Sale Price')),
         'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
         'name_template': fields.related('product_tmpl_id', 'name', string="Name", type='char', size=128, store=True),
+        'color': fields.integer('Color Index'),
+        'product_image': fields.binary('Image'),
     }
-
+    
     def unlink(self, cr, uid, ids, context=None):
         unlink_ids = []
         unlink_product_tmpl_ids = []

=== modified file 'product/product_view.xml'
--- product/product_view.xml	2011-09-15 12:03:44 +0000
+++ product/product_view.xml	2011-09-29 05:51:51 +0000
@@ -69,7 +69,7 @@
             <field eval="7" name="priority"/>
             <field name="arch" type="xml">
                 <form string="Product">
-                   <group colspan="4" col="6">
+                   <group colspan="4" col="8">
                     <group colspan="4" col="2">
                         <separator string="Name" colspan="2"/>
                         <field name="name"/>
@@ -85,6 +85,9 @@
                         <field name="sale_ok"/>
                         <field name="purchase_ok"/>
                     </group>
+                    <group colspan="1" col="1">
+                        <field name="product_image" widget='image' nolabel="1"/>
+                    </group> 
                    </group>
 
                     <notebook colspan="4">
@@ -191,6 +194,68 @@
                 </form>
             </field>
         </record>
+        
+        <!-- Product Kanban View  -->
+        <record model="ir.ui.view" id="product_kanban_view">
+            <field name="name">Product Kanban</field>
+            <field name="model">product.product</field>
+            <field name="type">kanban</field>
+            <field name="arch" type="xml">
+                <kanban default_group_by="type">
+                    <templates>
+                        <t t-name="kanban-box">
+                            <t t-set="color" t-value="kanban_color(record.color.raw_value || record.type.raw_value)"/>
+                            <div t-att-class="color + (record.color.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
+                                <div class="oe_kanban_box oe_kanban_color_border">
+                                    <table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
+                                        <tr>
+                                            <td class="oe_kanban_title1" align="left" valign="middle">
+                                                <t t-if="record.default_code.raw_value">[<field name="default_code"/>]</t>
+                                                <field name="name"/>
+                                            </td>
+                                            <td align="right" valign="top" width="22">
+                                                <img t-att-src="kanban_gravatar(record.product_manager.raw_value, 22)" class="oe_kanban_gravatar"/>
+                                            </td>
+                                        </tr>
+                                    </table>
+                                    <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
+                                        <table class="oe_kanban_table">
+                                            <tr>
+                                                <td valign="top" width="22">
+                                                    <t t-if="record.product_image.raw_value">
+                                                        <img t-att-src="'data:image/png;base64,'+record.product_image.raw_value" width='48' height='48'/>
+                                                    </t>
+                                                    <t t-if="!record.product_image.raw_value">
+                                                        <img src="/web/static/src/img/product_default.png"/>
+                                                    </t> 
+                                                </td>
+                                                <td>
+                                                    <div class="oe_kanban_title2">
+                                                        <t t-if="record.type.raw_value=='service'">No Stock</t>
+                                                        <t t-if="record.type.raw_value!='service'">
+                                                            <div><field name="qty_available"/> On Hand , <field name="virtual_available"/> Available</div>
+                                                            <div><t t-if="record.list_price.raw_value!=0">Public Price : <field name="lst_price"/> ,</t> Cost : <field name="standard_price"/></div>
+                                                        </t>
+                                                    </div>
+                                                </td>
+                                            </tr>
+                                        </table>
+                                    </div>
+                                    <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
+                                        <div class="oe_kanban_left">
+                                            <a string="Edit" icon="gtk-edit" type="edit"/>
+                                            <a string="Change Color" icon="color-picker" type="color" name="color"/>
+                                         </div>
+                                        <br class="oe_kanban_clear"/>
+                                    </div>
+                                </div>
+                            </div>
+                        </t>
+                    </templates>
+                </kanban>
+            </field>
+        </record>
+        
         <record id="product_normal_action" model="ir.actions.act_window">
             <field name="name">Products</field>
             <field name="type">ir.actions.act_window</field>
@@ -204,12 +269,27 @@
             <field name="name">Products</field>
             <field name="type">ir.actions.act_window</field>
             <field name="res_model">product.product</field>
+            <field name="view_mode">tree,form,kanban</field>
             <field name="view_type">form</field>
             <field name="context">{"search_default_filter_to_sell":1}</field>
             <field name="view_id" ref="product_product_tree_view"/>  
             <field name="search_view_id" ref="product_search_form_view"/>            
             <field name="help">You must define a Product for everything you buy or sell. Products can be raw materials, stockable products, consumables or services. The Product form contains detailed information about your products related to procurement logistics, sales price, product category, suppliers and so on.</field>
         </record>
+        
+        <record id="open_view_product_tree1" model="ir.actions.act_window.view">
+            <field name="sequence" eval="1"/>
+            <field name="view_mode">tree</field>
+           <field name="view_id" ref="product_product_tree_view"/>
+            <field name="act_window_id" ref="product_normal_action_sell"/>
+        </record>
+        
+        <record id="open_view_product_form1" model="ir.actions.act_window.view">
+            <field name="sequence" eval="2"/>
+            <field name="view_mode">form</field>
+            <field name="view_id" ref="product_normal_form_view"/>
+            <field name="act_window_id" ref="product_normal_action_sell"/>
+        </record> 
 
         <menuitem id="base.menu_product" name="Products" parent="base.menu_base_partner" sequence="9"/>
         <menuitem action="product.product_normal_action_sell" id="product.menu_products" parent="base.menu_product" sequence="1"/>

=== modified file 'project/project.py'
--- project/project.py	2011-09-22 06:14:19 +0000
+++ project/project.py	2011-09-29 05:51:51 +0000
@@ -470,6 +470,7 @@
         'manager_id': fields.related('project_id', 'analytic_account_id', 'user_id', type='many2one', relation='res.users', string='Project Manager'),
         'company_id': fields.many2one('res.company', 'Company'),
         'id': fields.integer('ID'),
+        'color': fields.integer('Color Index'),
     }
 
     _defaults = {
@@ -485,6 +486,21 @@
 
     _order = "sequence,priority, date_start, name, id"
 
+    def set_priority(self, cr, uid, ids, priority):
+        """Set task priority
+        """
+        return self.write(cr, uid, ids, {'priority' : priority})
+
+    def set_high_priority(self, cr, uid, ids, *args):
+        """Set task priority to high
+        """
+        return self.set_priority(cr, uid, ids, '1')
+
+    def set_normal_priority(self, cr, uid, ids, *args):
+        """Set task priority to normal
+        """
+        return self.set_priority(cr, uid, ids, '3')
+
     def _check_recursion(self, cr, uid, ids, context=None):
         for id in ids:
             visited_branch = set()

=== modified file 'project/project_view.xml'
--- project/project_view.xml	2011-09-24 09:10:37 +0000
+++ project/project_view.xml	2011-09-29 05:51:51 +0000
@@ -313,62 +313,71 @@
             </field>
         </record>
 
-
-
-        <record id="view_task_kanban" model="ir.ui.view">
+	
+        <!-- Project Task Kanban View  -->
+        <record model="ir.ui.view" id="view_task_kanban">
             <field name="name">project.task.kanban</field>
             <field name="model">project.task</field>
             <field name="type">kanban</field>
             <field name="arch" type="xml">
-                <kanban>
-                <field name="state"/>
+                <kanban default_group_by="type_id" >
                     <templates>
                         <t t-name="kanban-box">
-                            <t t-set="color">#fff</t>
-                            <t t-if="state.raw_value == 'done'" t-set="color">#dfd</t>
-                            <t t-if="state.raw_value == 'open'" t-set="color">lightcyan</t>
-                            <t t-if="state.raw_value == 'cancel' and total_hours.raw_value gt 0" t-set="color">red</t>
-                            <div t-attf-style="background: #{color}">
-                                <table>
-                                    <tr>
-                                        <td>Title :</td>
-                                        <td><field name="name"/></td>
-                                    </tr>
-                                    <tr>
-                                        <td>Progress :</td>
-                                        <td><field name="progress"/></td>
-                                    </tr>
-                                    <tr>
-                                        <td><button data-type="action" data-name="%(action_project_task_reevaluate)d">Reevaluate</button><button data-type="edit" >Edit</button></td>
-                                        <td><button data-type="object" data-name="prev_type">Previous phase</button></td>
-                                    </tr>
-                                    <tr>
-                                        <td>Project name:</td>
-                                        <td colspan="2"><field name="project_id"/></td>
-                                    </tr>
-                                    <tr>
-                                        <td>Phase</td>
-                                        <td colspan="2"><field name="type_id"/></td>
-                                    </tr>
-                                    <tr>
-                                        <td>Remain Time :</td>
-                                        <td colspan="2"><field name="remaining_hours"/></td>
-                                    </tr>
-                                    <tr>
-                                        <td>Spent Time :</td>
-                                        <td colspan="2"><field name="remaining_hours"/></td>
-                                    </tr>
-                                    <tr>
-                                        <td>Remain Time :</td>
-                                        <td colspan="2"><field name="remaining_hours"/></td>
-                                    </tr>
-                                </table>
+                            <t t-set="color" t-value="kanban_color(record.color.raw_value || record.type_id.raw_value)"/>
+                            <div t-att-class="color + (record.priority.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
+                                <div class="oe_kanban_box oe_kanban_color_border">
+                                    <table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
+                                        <tr>
+                                            <td class="oe_kanban_title1" align="left" valign="middle">
+                                                <a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority"/>
+                                                <a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
+                                                <field name="name"/>
+                                            </td>
+                                            <td valign="top" width="22">
+                                                <img t-att-src="kanban_gravatar(record.user_id.value, 22)" class="oe_kanban_gravatar"/>
+                                            </td>
+                                        </tr>
+                                    </table>
+                                    <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
+                                        <div class="oe_kanban_right oe_kanban_small">
+                                            <field name="user_id"/>
+                                        </div>
+                                        <div class="oe_kanban_title2">
+                                            <field name="project_id"/>
+                                        </div>
+                                        <div class="oe_kanban_small">
+                                            <a target="_blank" t-att-href="'http://pad.openerp.com/'+record.name.raw_value.toLowerCase().replace(' ','-')">
+                                                http://pad.openerp.com/<t t-esc="record.name.raw_value.toLowerCase().replace(' ','-')"/>
+                                            </a>
+                                        </div>
+                                        <div class="oe_kanban_small">
+                                            <i><field name="date_deadline"/></i>
+                                        </div>
+                                    </div>
+                                    <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
+                                        <div class="oe_kanban_left">
+                                            <a string="Edit" icon="gtk-edit" type="edit"/>                                               
+                                            <a string="Change Color" icon="color-picker" type="color" name="color"/>
+                                            <a string="" />
+                                            <a title="OpenERP Pad" icon="pad-openerp" target="_blank" t-att-href="'http://pad.openerp.com/'+record.name.value" style="text-decoration: none;" >
+                                                <img src="/web/static/src/img/icons/pad-openerp.png" border="0" width="16" height="16"/>
+                                            </a>                                                
+                                            <a name="%(action_project_task_delegate)d" string="Delegate" states="pending,open,draft" type="action" icon="gtk-sort-descending" />
+                                        </div>
+                                        <div class="oe_kanban_right">
+                                            <a name="do_cancel" string="Mark Lost" states="draft,open,pending" type="object" icon="lead-stage-lost"/>
+                                            <a name="do_pending" string="Pending"  states="open" type="object" icon="gtk-media-pause"/>        
+                                            <a name="action_close" string="Mark Won"  states="pending,open" type="object" icon="lead-stage-won"/>
+                                        </div>
+                                        <br class="oe_kanban_clear"/>
+                                    </div>
+                                </div>
                             </div>
                         </t>
                     </templates>
                 </kanban>
             </field>
-        </record>
+         </record>
 
         <record id="view_task_tree2" model="ir.ui.view">
             <field name="name">project.task.tree</field>
@@ -502,6 +511,21 @@
             <field name="search_view_id" ref="view_task_search_form"/>
             <field name="help">A task represents a work that has to be done. Each user works in his own list of tasks where he can record his task work in hours. He can work and close the task itself or delegate it to another user. If you delegate a task to another user, you get a new task in pending state, which will be reopened when you have to review the work achieved. If you install the project_timesheet module, task work can be invoiced based on the project configuration. With the project_mrp module, sales orders can create tasks automatically when they are confirmed.</field>
         </record>
+        
+        <record id="action_view_task_tree" model="ir.actions.act_window.view">
+            <field name="sequence" eval="1"/>
+            <field name="view_mode">tree</field>
+            <field name="view_id" ref="view_task_tree2"/>
+            <field name="act_window_id" ref="action_view_task"/>
+        </record>
+        
+        <record id="action_view_task_form" model="ir.actions.act_window.view">
+            <field name="sequence" eval="2"/>
+            <field name="view_mode">form</field>
+            <field name="view_id" ref="view_task_form2"/>
+            <field name="act_window_id" ref="action_view_task"/>
+        </record>        
+ 
         <menuitem action="action_view_task" id="menu_action_view_task" parent="project.menu_project_management" sequence="3"/>
 
         <record id="action_view_task_overpassed_draft" model="ir.actions.act_window">

=== modified file 'project_issue/project_issue.py'
--- project_issue/project_issue.py	2011-09-22 06:14:19 +0000
+++ project_issue/project_issue.py	2011-09-29 05:51:51 +0000
@@ -226,6 +226,7 @@
                                 multi='compute_day', type="float", store=True),
         'inactivity_days': fields.function(_compute_day, string='Days since last action', \
                                 multi='compute_day', type="integer", help="Difference in days between last action and current date"),
+         'color': fields.integer('Color Index'),
         'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
         'date_action_last': fields.datetime('Last Action', readonly=1),
         'date_action_next': fields.datetime('Next Action', readonly=1),
@@ -258,7 +259,22 @@
         'priority': crm.AVAILABLE_PRIORITIES[2][0],
         'project_id':_get_project,
         'categ_id' : lambda *a: False,
-    }
+         }
+
+    def set_priority(self, cr, uid, ids, priority):
+        """Set lead priority
+        """
+        return self.write(cr, uid, ids, {'priority' : priority})
+
+    def set_high_priority(self, cr, uid, ids, *args):
+        """Set lead priority to high
+        """
+        return self.set_priority(cr, uid, ids, '1')
+
+    def set_normal_priority(self, cr, uid, ids, *args):
+        """Set lead priority to normal
+        """
+        return self.set_priority(cr, uid, ids, '3')
 
     def convert_issue_task(self, cr, uid, ids, context=None):
         case_obj = self.pool.get('project.issue')

=== modified file 'project_issue/project_issue_menu.xml'
--- project_issue/project_issue_menu.xml	2011-09-23 17:22:47 +0000
+++ project_issue/project_issue_menu.xml	2011-09-29 05:51:51 +0000
@@ -8,7 +8,7 @@
         <field name="name">Issues</field>
         <field name="res_model">project.issue</field>
         <field name="view_type">form</field>
-        <field name="view_mode">tree,calendar</field>
+        <field name="view_mode">tree,calendar,kanban</field>
         <field name="view_id" ref="project_issue_tree_view"/>
         <field name="domain" eval=""/>
         <field name="context">{"search_default_user_id": uid, "search_default_draft": 1, "search_default_project_id":project_id}</field>

=== modified file 'project_issue/project_issue_view.xml'
--- project_issue/project_issue_view.xml	2011-09-25 02:13:39 +0000
+++ project_issue/project_issue_view.xml	2011-09-29 05:51:51 +0000
@@ -260,6 +260,83 @@
             </field>
         </record>
 
+
+	<!-- Project Issue Karban View-->
+
+	<record model="ir.ui.view" id="project_issue_kanban_view">
+        <field name="name">Project Issue Kanban</field>
+        <field name="model">project.issue</field>
+        <field name="type">kanban</field>
+        <field name="arch" type="xml">
+            <kanban default_group_by="type_id">
+		<templates>
+                    <t t-name="kanban-box">
+                        <t t-set="color" t-value="kanban_color(record.color.raw_value || record.state.raw_value)"/>
+                        <div t-att-class="color + (record.priority.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
+                            <div class="oe_kanban_box oe_kanban_color_border">
+                                <div class="oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
+                                    <table class="oe_kanban_table">
+                                        <tr>
+                                            <td class="oe_kanban_title1" align="left" valign="middle">
+                                                <a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority" />
+                                                <a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
+                                                <field name="name"/>
+                                            </td>
+                                            <td valign="top" width="22">
+                                                <img t-att-src="kanban_gravatar(record.user_id.value, 22)" class="oe_kanban_gravatar"/>
+                                            </td>
+                                        </tr>
+                                    </table>
+                                </div>
+                                <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
+                                    <table class="oe_kanban_table">
+                                        <tr>
+                                            <td>
+                                                <div class="oe_kanban_right oe_kanban_small">
+                                                    <field name="user_id"/>
+                                                </div>
+                                                <div class="oe_kanban_title2">
+                                                    <field name="partner_id"/>
+                                                </div>
+                                                <div class="oe_kanban_title3">
+                                                    <field name="project_id"/>
+                                                </div>
+                                                <div class="oe_kanban_title3">
+                                                    <i><field name="version_id"/></i>
+                                                </div>
+                                            </td>
+                                        </tr>
+                                    </table>
+                                </div>
+                                <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
+                                    <div class="oe_kanban_left">
+                                        <a string="Edit" icon="gtk-edit" type="edit"/>
+                                        <a string="Change Color" icon="color-picker" type="color" name="color"/>
+                                        <a string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
+                                        <a string="Add Internal Note" name="%(crm.action_crm_add_note)d" context="{'model': 'crm.lead' }" icon="terp-document-new" type="action"/>
+                                        <a string="Escalate" name="case_escalate"  icon="gtk-go-up" type="object"/>
+					<a string="Convert To Task" name="convert_issue_task" icon="gtk-index" type="object"/> 
+                                    </div>
+                                    <div class="oe_kanban_right">
+                                        <a name="case_open" string="Open" states="draft,pending" type="object" icon="lead-stage-won" />
+                                       	<a name="case_pending" string="Pending" states="draft,open" type="object" icon="lead-stage-pending"/>
+                                        <a name="case_close" string="Close" states="open,draft,pending" type="object" icon="lead-stage-lost"/>
+                                    </div>
+                                    <br class="oe_kanban_clear"/>
+                                </div>
+                            </div>
+                        </div>
+                    </t>
+                </templates>
+            </kanban>
+        </field>
+    </record>
+
+
+
+
+
+
         # ------------------------------------------------------
         # Feature Requests
         # ------------------------------------------------------

=== modified file 'stock/product_view.xml'
--- stock/product_view.xml	2011-09-07 09:32:31 +0000
+++ stock/product_view.xml	2011-09-29 05:51:51 +0000
@@ -120,6 +120,67 @@
                 </group>
             </field>
         </record>
+        
+        <record model="ir.ui.view" id="product.product_kanban_view">
+            <field name="name">Product Kanban</field>
+            <field name="model">product.product</field>
+            <field name="type">kanban</field>
+            <field name="arch" type="xml">
+                <kanban default_group_by="type">
+                    <templates>
+                        <t t-name="kanban-box">
+                            <t t-set="color" t-value="kanban_color(record.color.raw_value || record.type.raw_value)"/>
+                            <div t-att-class="color + (record.color.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
+                                <div class="oe_kanban_box oe_kanban_color_border">
+                                    <table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
+                                        <tr>
+                                            <td class="oe_kanban_title1" align="left" valign="middle">
+                                                <t t-if="record.default_code.raw_value">[<field name="default_code"/>]</t>
+                                                <field name="name"/>
+                                            </td>
+                                            <td align="right" valign="top" width="22">
+                                                <img t-att-src="kanban_gravatar(record.product_manager.raw_value, 22)" class="oe_kanban_gravatar"/>
+                                            </td>
+                                        </tr>
+                                    </table>
+                                    <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
+                                        <table class="oe_kanban_table">
+                                            <tr>
+                                                <td valign="top" width="22">
+                                                    <t t-if="record.product_image.raw_value">
+                                                        <img t-att-src="'data:image/png;base64,'+record.product_image.raw_value" width='48' height='48'/>
+                                                    </t>
+                                                    <t t-if="!record.product_image.raw_value">
+                                                        <img src="/web/static/src/img/product_default.png"/>
+                                                    </t> 
+                                                </td>
+                                                <td>
+                                                    <div class="oe_kanban_title2">
+                                                        <t t-if="record.type.raw_value=='service'">No Stock</t>
+                                                        <t t-if="record.type.raw_value!='service'">
+                                                            <div><field name="qty_available"/> On Hand , <field name="virtual_available"/> Available</div>
+                                                            <div><t t-if="record.list_price.raw_value!=0">Public Price : <field name="lst_price"/> ,</t> Cost : <field name="standard_price"/></div>
+                                                        </t>
+                                                    </div>
+                                                </td>
+                                            </tr>
+                                        </table>
+                                    </div>
+                                    <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
+                                        <div class="oe_kanban_left">
+                                            <a string="Edit" icon="gtk-edit" type="edit"/>
+                                            <a string="Change Color" icon="color-picker" type="color" name="color"/>
+                                            <a string="Update Stock" name="%(stock.action_view_change_product_quantity)d" icon="gtk-execute" type="action"/> 
+                                         </div>
+                                        <br class="oe_kanban_clear"/>
+                                    </div>
+                                </div>
+                            </div>
+                        </t>
+                    </templates>
+                </kanban>
+            </field>
+        </record>
 
         <record id="view_normal_property_form" model="ir.ui.view">
             <field name="name">product.normal.stock.property.form.inherit</field>

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to