Devishree Brahmbhatt (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-all-home-page-dbr into 
lp:openobject-addons.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-all-home-page-dbr/+merge/103692

Hello,

I have done changes for home page improvements as well as set all application 
dashboard in to setting > reporting menu.

kindly, review this.

Thanks,
DBR
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-all-home-page-dbr/+merge/103692
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-addons/trunk-all-home-page-dbr into 
lp:openobject-addons.
=== modified file 'account/account_invoice_view.xml'
--- account/account_invoice_view.xml	2012-04-25 13:40:18 +0000
+++ account/account_invoice_view.xml	2012-04-26 13:39:22 +0000
@@ -431,6 +431,9 @@
             <field name="help">With Customer Invoices you can create and manage sales invoices issued to your customers. OpenERP can also generate draft invoices automatically from sales orders or deliveries. You should only confirm them before sending them to your customers.</field>
         </record>
 
+        <menuitem icon="terp-account" id="account.menu_finance" name="Accounting" sequence="14" 
+		groups="group_account_user,group_account_manager,group_account_invoice"
+		action="action_invoice_tree1"/>
 
         <record id="action_invoice_tree1_view1" model="ir.actions.act_window.view">
             <field eval="1" name="sequence"/>

=== modified file 'account/board_account_view.xml'
--- account/board_account_view.xml	2012-04-10 14:05:57 +0000
+++ account/board_account_view.xml	2012-04-26 13:39:22 +0000
@@ -63,7 +63,7 @@
 
         <menuitem id="menu_dashboard_acc" name="Accounting" sequence="30" parent="base.menu_reporting_dashboard" groups="group_account_user,group_account_manager"/>
         <menuitem action="open_board_account" icon="terp-graph" id="menu_board_account" parent="menu_dashboard_acc" sequence="1"/>
-        <menuitem icon="terp-account" id="account.menu_finance" name="Accounting" sequence="14" action="open_board_account"/>
+       <!-- <menuitem icon="terp-account" id="account.menu_finance" name="Accounting" sequence="14" action="open_board_account"/>-->
 
 
     </data>

=== modified file 'board/board_data_admin.xml'
--- board/board_data_admin.xml	2012-04-19 21:47:19 +0000
+++ board/board_data_admin.xml	2012-04-26 13:39:22 +0000
@@ -53,7 +53,7 @@
         </record>
 
         <!-- bind adminitration dashboard to the root administration -->
-        <menuitem id="base.menu_administration" name="Settings" action="open_board_administration_form"/>
+       <!-- <menuitem id="base.menu_administration" icon="terp-administration"  name="Settings" sequence="50" action="open_board_administration_form"/> -->
 
         <!-- add a menu item in adminitration/reporting/dashboards -->
         <menuitem id="base.menu_reporting_admin" name="Administration" parent="base.menu_reporting_dashboard" groups="base.group_system"/>

=== modified file 'crm/res_partner.py'
--- crm/res_partner.py	2012-03-30 09:08:37 +0000
+++ crm/res_partner.py	2012-04-26 13:39:22 +0000
@@ -20,10 +20,29 @@
 ##############################################################################
 
 from osv import fields,osv
+from tools.translate import _
 
 class res_partner(osv.osv):
     """ Inherits partner and adds CRM information in the partner form """
     _inherit = 'res.partner'
+    
+    def _total_oppo(self, cr, uid, ids, field_name, arg, context=None):
+        total_oppo={}
+        oppo_pool=self.pool.get('crm.lead')
+        for id in ids:
+            oppo_ids = oppo_pool.search(cr, uid, [('partner_id', '=', id)])
+            total_oppo[id] = len(oppo_ids)
+        return total_oppo
+
+    def _total_meeting(self, cr, uid, ids, field_name, arg, context=None):
+        total_meeting={}
+        meeting_pool=self.pool.get('crm.meeting')
+        for id in ids:
+            meeting_ids = meeting_pool.search(cr, uid, [('partner_id', '=', id)])
+            total_meeting[id] = len(meeting_ids)
+        return total_meeting
+    
+    
     _columns = {
         'section_id': fields.many2one('crm.case.section', 'Sales Team'),
         'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
@@ -32,6 +51,13 @@
             'Meetings'),
         'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
             'Phonecalls'),
+        'total_oppo': fields.function(_total_oppo , type='integer',string="Total Opportunity"),
+        'total_meeting': fields.function(_total_meeting , type='integer',string="Total Meeting"),
+    }
+
+    _defaults = {
+        'total_oppo': 0,
+        'total_meeting': 0,
     }
 
     def redirect_partner_form(self, cr, uid, partner_id, context=None):
@@ -49,6 +75,32 @@
         }
         return value
 
+    def get_opportunity(self, cr, uid, ids, context=None):
+        if context is None:
+            context = {}
+        models_data = self.pool.get('ir.model.data')
+
+        form_view = models_data.get_object_reference(cr, uid, 'crm', 'crm_case_form_view_oppor')
+        tree_view = models_data.get_object_reference(cr, uid, 'crm', 'crm_case_tree_view_oppor')
+        search_view = models_data.get_object_reference(cr, uid, 'crm', 'view_crm_case_opportunities_filter')
+        partner_id = self.browse(cr, uid, ids[0], context=context)
+        domain =[('partner_id', '=', partner_id.id)]
+
+        return {
+                'name': _('Opportunity'),
+                'view_type': 'form',
+                'view_mode': 'tree, form',
+                'res_model': 'crm.lead',
+                'domain': domain,
+                'view_id': False,
+                'views': [(tree_view and tree_view[1] or False, 'tree'),
+                          (form_view and form_view[1] or False, 'form'),
+                          (False, 'calendar'), (False, 'graph')],
+                'type': 'ir.actions.act_window',
+                'search_view_id': search_view and search_view[1] or False,
+                'nodestroy': True,
+        }
+
     def make_opportunity(self, cr, uid, ids, opportunity_summary, planned_revenue=0.0, probability=0.0, partner_id=None, context=None):
         categ_obj = self.pool.get('crm.case.categ')
         categ_ids = categ_obj.search(cr, uid, [('object_id.model','=','crm.lead')])

=== modified file 'crm/res_partner_view.xml'
--- crm/res_partner_view.xml	2012-04-25 11:51:39 +0000
+++ crm/res_partner_view.xml	2012-04-26 13:39:22 +0000
@@ -42,6 +42,35 @@
                 </field>
         </record>
 
+       <!-- Partner kanban view inherte -->
+
+        <record model="ir.ui.view" id="crm_lead_partner_kanban_view">
+            <field name="name">res.partner.kanban.inherit</field>
+            <field name="model">res.partner</field>
+            <field name="type">kanban</field>
+            <field name="inherit_id" ref="base.res_partner_kanban_view"/>
+            <field name="arch" type="xml">
+                <field name="mobile" position="after">
+                    <field name="opportunity_ids"/>
+                    <field name="meeting_ids"/>
+                    <field name="total_oppo"/>
+                    <field name="total_meeting"/>
+                </field>
+                 <xpath expr="//div[@class='oe_partner_desc']//h4[@class='oe_partner_heading']" position="after">
+                        <a name="get_opportunity" type="object">
+                            (<t t-esc="record.total_oppo.value"/>)
+                            <t t-if="record.total_oppo.value &lt;= 1">Opportunity</t>
+                            <t t-if="record.total_oppo.value > 1"> Opportunities</t>
+                        </a>
+                        <a name="%(crm.crm_case_categ_meet)d" type="action">
+                            (<t t-esc="record.total_meeting.value"/>)
+                            <t t-if="record.total_meeting.value &lt;= 1">Meeting</t>
+                            <t t-if="record.total_meeting.value > 1">Meetings</t>
+                        </a>
+                </xpath>
+            </field>
+        </record>
+
         <!-- Add History tabs to res.partner form -->
         <record id="view_crm_partner_info_form1" model="ir.ui.view">
             <field name="name">res.partner.crm.info.inherit1</field>

=== modified file 'document/board_document_view.xml'
--- document/board_document_view.xml	2012-04-10 14:05:57 +0000
+++ document/board_document_view.xml	2012-04-26 13:39:22 +0000
@@ -49,8 +49,8 @@
             id="menu_reports_document_manager"
             icon="terp-graph"/>
 
-         <menuitem name="Knowledge" icon="terp-stock" id="knowledge.menu_document"
-            sequence="19" groups="base.group_system,base.group_document_user" action="open_board_document_manager"/>
+       <!--  <menuitem name="Knowledge" icon="terp-stock" id="knowledge.menu_document"
+            sequence="19" groups="base.group_system,base.group_document_user" action="open_board_document_manager"/> -->
 
         <record model="ir.ui.view" id="board_document_manager_form1">
             <field name="name">board.document.manager.form1</field>

=== modified file 'document/document_view.xml'
--- document/document_view.xml	2012-04-25 14:29:46 +0000
+++ document/document_view.xml	2012-04-26 13:39:22 +0000
@@ -354,6 +354,10 @@
         action="action_document_file_form"
         id="menu_document_files"
         parent="menu_document_doc"/>
+		
+    <menuitem name="Knowledge" icon="terp-stock" id="knowledge.menu_document"
+              sequence="19" groups="base.group_system,base.group_document_user" action="action_document_file_form"/>
+			  		
 
     <record model="ir.actions.act_window" id="action_document_file_directory_form">
         <field name="type">ir.actions.act_window</field>

=== modified file 'event/event_view.xml'
--- event/event_view.xml	2012-04-25 14:35:28 +0000
+++ event/event_view.xml	2012-04-26 13:39:22 +0000
@@ -304,6 +304,8 @@
            <field name="help">Event is the low level object used by meeting and others documents that should be synchronized with mobile devices or calendar applications through caldav. Most of the users should work in the Calendar menu, and not in the list of events.</field>
        </record>
 
+       <menuitem  name="Events" id="event_main_menu" action="action_event_view"/>
+
       <act_window
             id="act_event_list_register_event"
             name="Registration"

=== modified file 'hr/hr_board.xml'
--- hr/hr_board.xml	2012-04-10 14:05:57 +0000
+++ hr/hr_board.xml	2012-04-26 13:39:22 +0000
@@ -24,7 +24,6 @@
         <field name="view_id" ref="board_hr_form"/>
     </record>
 
-    <menuitem id="menu_hr_root" icon="terp-hr" name="Human Resources" sequence="15" action="open_board_hr"/>
     <menuitem id="menu_hr_reporting" parent="base.menu_reporting" name="Human Resources" sequence="40" />
     <menuitem id="menu_hr_dashboard" parent="base.menu_reporting_dashboard"  name="Human Resources" sequence="35"/>
     <menuitem id="menu_hr_dashboard_user" parent="menu_hr_dashboard" action="open_board_hr" icon="terp-graph" sequence="4"/>
@@ -52,7 +51,7 @@
         <field name="view_id" ref="board_hr_manager_form"/>
     </record>
 
-    <menuitem id="menu_hr_dashboard_manager" parent="menu_hr_dashboard" icon="terp-graph" action="open_board_hr_manager" groups="base.group_hr_manager" sequence="5"/>
+    <!--<menuitem id="menu_hr_dashboard_manager" parent="menu_hr_dashboard" icon="terp-graph" action="open_board_hr_manager" groups="base.group_hr_manager" sequence="5"/>-->
 
 </data>
 </openerp>

=== modified file 'hr/hr_view.xml'
--- hr/hr_view.xml	2012-04-25 14:11:35 +0000
+++ hr/hr_view.xml	2012-04-26 13:39:22 +0000
@@ -188,6 +188,9 @@
             <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>
 
+        <menuitem id="menu_hr_root" name="Human Resources" sequence="15"
+            groups="base.group_hr_manager,base.group_hr_user,base.group_user" action="open_view_employee_list_my" />
+						
         <record id="open_view_employee_list_my_kanban" model="ir.actions.act_window.view">
             <field name="sequence" eval="0"/>
             <field name="view_mode">kanban</field>

=== modified file 'membership/membership_view.xml'
--- membership/membership_view.xml	2012-04-25 14:35:28 +0000
+++ membership/membership_view.xml	2012-04-26 13:39:22 +0000
@@ -208,6 +208,8 @@
 
         <menuitem name="Members" parent="menu_membership" id="menu_members" sequence="2" action="action_membership_members"/>
 
+        <menuitem name="Association" id="base.menu_association" sequence="9" action="action_membership_members"/>
+			
         <!-- PARTNERS -->
 
         <record model="ir.ui.view" id="view_partner_tree">

=== modified file 'mrp/board_manufacturing_view.xml'
--- mrp/board_manufacturing_view.xml	2012-04-10 14:05:57 +0000
+++ mrp/board_manufacturing_view.xml	2012-04-26 13:39:22 +0000
@@ -35,8 +35,8 @@
             id="menu_board_manufacturing" parent="menus_dash_mrp"
             sequence="1"/>
 
-        <menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing" sequence="8"
-            action="open_board_manufacturing"/>
+      <!--  <menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing" sequence="8"
+            action="open_board_manufacturing"/> -->
 
 
     </data>

=== modified file 'mrp/mrp_view.xml'
--- mrp/mrp_view.xml	2012-04-25 14:06:25 +0000
+++ mrp/mrp_view.xml	2012-04-26 13:39:22 +0000
@@ -845,6 +845,9 @@
         <menuitem action="mrp_production_action" id="menu_mrp_production_action"
             parent="menu_mrp_manufacturing" sequence="1"/>
 
+        <menuitem icon="terp-mrp" id="base.menu_mrp_root" name="Manufacturing"
+            groups="group_mrp_user,group_mrp_manager" sequence="8"  action="mrp_production_action"/>			
+			
         <record id="mrp_production_action_planning" model="ir.actions.act_window">
             <field name="name">Manufacturing Orders</field>
             <field name="type">ir.actions.act_window</field>

=== modified file 'product/product_view.xml'
--- product/product_view.xml	2012-04-25 13:56:29 +0000
+++ product/product_view.xml	2012-04-26 13:39:22 +0000
@@ -262,19 +262,26 @@
         </record>
 
         <record id="open_view_product_tree1" model="ir.actions.act_window.view">
-            <field name="sequence" eval="1"/>
+            <field name="sequence" eval="2"/>
             <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="sequence" eval="3"/>
             <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>
 
+        <record id="open_view_product_kanban1" model="ir.actions.act_window.view">
+            <field name="sequence" eval="1"/>
+            <field name="view_mode">kanban</field>
+           <field name="view_id" ref="product_kanban_view"/>
+            <field name="act_window_id" ref="product_normal_action"/>
+        </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/board_project_view.xml'
--- project/board_project_view.xml	2012-04-25 14:02:12 +0000
+++ project/board_project_view.xml	2012-04-26 13:39:22 +0000
@@ -117,9 +117,9 @@
             parent="menu_project_dashboard"
             sequence="1"/>
 
-        <menuitem
+     <!--   <menuitem
             icon="terp-project" id="base.menu_main_pm"
-            name="Project" sequence="10" action="open_board_project"/>
+            name="Project" sequence="10" action="open_board_project"/> -->
 
     </data>
 </openerp>

=== modified file 'project/project_view.xml'
--- project/project_view.xml	2012-04-25 14:02:12 +0000
+++ project/project_view.xml	2012-04-26 13:39:22 +0000
@@ -545,6 +545,9 @@
 
         <menuitem action="action_view_task" id="menu_action_view_task" parent="project.menu_project_management" sequence="5"/>
 
+		<menuitem id="base.menu_main_pm" name="Project" sequence="10" action="open_view_project_all"
+            groups="group_project_manager,group_project_user"/>
+		
         <record id="action_view_task_overpassed_draft" model="ir.actions.act_window">
             <field name="name">Overpassed Tasks</field>
             <field name="res_model">project.task</field>

=== modified file 'purchase/board_purchase_view.xml'
--- purchase/board_purchase_view.xml	2012-04-10 14:05:57 +0000
+++ purchase/board_purchase_view.xml	2012-04-26 13:39:22 +0000
@@ -116,7 +116,7 @@
             parent="menu_purchase_deshboard"
             sequence="4"/>
 
-        <menuitem icon="terp-purchase" id="base.menu_purchase_root" action="open_board_purchase" name="Purchases"/>
+      <!--  <menuitem icon="terp-purchase" id="base.menu_purchase_root" action="open_board_purchase" name="Purchases"/> -->
 
 
     </data>

=== modified file 'purchase/purchase_view.xml'
--- purchase/purchase_view.xml	2012-04-25 13:22:02 +0000
+++ purchase/purchase_view.xml	2012-04-26 13:39:22 +0000
@@ -3,7 +3,7 @@
     <data>
        <menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Purchases" sequence="3"
            groups="group_purchase_manager,group_purchase_user"
-           web_icon="images/purchases.png"
+           web_icon="images/purchases.png" 
            web_icon_hover="images/purchases-hover.png"/>
        <menuitem id="menu_procurement_management" name="Purchase"
             parent="base.menu_purchase_root" sequence="1" />
@@ -311,8 +311,11 @@
         </record>
         <menuitem action="purchase_rfq" id="menu_purchase_rfq"
             parent="menu_procurement_management"
-            sequence="6"/>
-
+            sequence="0"/>
+			
+        <menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Purchases" sequence="3" action="purchase_rfq"
+           groups="group_purchase_manager,group_purchase_user"/>		
+		
         <record id="purchase_form_action" model="ir.actions.act_window">
             <field name="name">Purchase Orders</field>
             <field name="type">ir.actions.act_window</field>
@@ -322,7 +325,7 @@
             <field name="search_view_id" ref="view_purchase_order_filter"/>
             <field name="help">Use this menu to search within your purchase orders by references, supplier, products, etc. For each purchase order, you can track the products received, and control the supplier invoices.</field>
         </record>
-        <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" />
+        <menuitem action="purchase_form_action" id="menu_purchase_form_action" parent="menu_procurement_management" sequence="6"/>
 
 
         <record id="purchase_order_line_form" model="ir.ui.view">

=== modified file 'purchase_requisition/purchase_requisition_view.xml'
--- purchase_requisition/purchase_requisition_view.xml	2012-04-25 13:22:02 +0000
+++ purchase_requisition/purchase_requisition_view.xml	2012-04-26 13:39:22 +0000
@@ -173,7 +173,7 @@
 
     <menuitem
         id="menu_purchase_requisition_pro_mgt"
-        sequence="0"
+        sequence="10"
         parent="purchase.menu_procurement_management"
         action="action_purchase_requisition"/>
 

=== modified file 'sale/__init__.py'
--- sale/__init__.py	2012-02-29 09:50:21 +0000
+++ sale/__init__.py	2012-04-26 13:39:22 +0000
@@ -25,6 +25,7 @@
 
 import sale
 import stock
+import res_partner
 import wizard
 import report
 import company

=== modified file 'sale/__openerp__.py'
--- sale/__openerp__.py	2012-04-02 09:27:46 +0000
+++ sale/__openerp__.py	2012-04-26 13:39:22 +0000
@@ -80,6 +80,7 @@
         'sale_report.xml',
         'sale_data.xml',
         'sale_view.xml',
+        'res_partner_view.xml',
         'report/sale_report_view.xml',
         'stock_view.xml',
         'process/sale_process.xml',

=== modified file 'sale/board_sale_view.xml'
--- sale/board_sale_view.xml	2012-04-10 14:05:57 +0000
+++ sale/board_sale_view.xml	2012-04-26 13:39:22 +0000
@@ -124,9 +124,9 @@
             <field name="view_id" ref="board_sales_form"/>
         </record>
 
-        <menuitem
+       <!-- <menuitem
             id="base.menu_base_partner" action="open_board_sales"
-            name="Sales"/>
+            name="Sales"/> -->
 
     </data>
 </openerp>

=== added file 'sale/res_partner.py'
--- sale/res_partner.py	1970-01-01 00:00:00 +0000
+++ sale/res_partner.py	2012-04-26 13:39:22 +0000
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import fields,osv
+from tools.translate import _
+
+class res_partner(osv.osv):
+    _inherit = 'res.partner'
+    
+    def _total_sale(self, cr, uid, ids, field_name, arg, context=None):
+        total_sale={}
+        sale_pool=self.pool.get('sale.order')
+        for id in ids:
+            sale_ids = sale_pool.search(cr, uid, [('partner_id', '=', id)])
+            total_sale[id] = len(sale_ids)
+        return total_sale
+    
+    _columns = {
+        'total_sale': fields.function(_total_sale , type='integer',string="Total Sale"),
+    }
+    _defaults = {
+        'total_sale': 0,
+    }
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'sale/res_partner_view.xml'
--- sale/res_partner_view.xml	1970-01-01 00:00:00 +0000
+++ sale/res_partner_view.xml	2012-04-26 13:39:22 +0000
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<openerp>
+    <data>
+       <!-- Partner kanban view inherte -->
+        <record model="ir.ui.view" id="crm_lead_partner_kanban_view">
+            <field name="name">res.partner.kanban.inherit</field>
+            <field name="model">res.partner</field>
+            <field name="type">kanban</field>
+            <field name="inherit_id" ref="base.res_partner_kanban_view"/>
+            <field name="arch" type="xml">
+            	<field name="mobile" position="after">
+                    <field name="total_sale"/>
+                </field>
+                <xpath expr="//div[@class='oe_partner_desc']//h4[@class='oe_partner_heading']" position="after">
+                    <a name="%(sale.act_res_partner_2_sale_order)d" type="action">
+                        (<t t-esc="record.total_sale.value" />)
+                        <t t-if="record.total_sale.value &lt;= 1">Quatation</t>
+                        <t t-if="record.total_sale.value > 1">Quatations</t>
+                    </a>
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>
+

=== modified file 'sale/sale_view.xml'
--- sale/sale_view.xml	2012-04-25 12:12:23 +0000
+++ sale/sale_view.xml	2012-04-26 13:39:22 +0000
@@ -1,8 +1,6 @@
 <openerp>
     <data>
-        <menuitem icon="terp-partner"
-            id="base.menu_base_partner" name="Sales"
-            sequence="1" groups="base.group_sale_salesman,base.group_sale_manager"/>
+        <menuitem icon="terp-partner" id="base.menu_base_partner" name="Sales" sequence="0" groups="base.group_sale_salesman,base.group_sale_manager" action="base.action_partner_form"/>
 
         <menuitem id="base.menu_product" name="Products" parent="base.menu_base_partner" sequence="9"/>
 

=== modified file 'sale_crm/board_sale_crm_view.xml'
--- sale_crm/board_sale_crm_view.xml	2011-12-26 12:21:45 +0000
+++ sale_crm/board_sale_crm_view.xml	2012-04-26 13:39:22 +0000
@@ -29,7 +29,5 @@
             </xpath>
             </field>
         </record>
-        <menuitem name="Sales"
-            id="base.menu_base_partner" action="sale.open_board_sales"/>
     </data>
 </openerp>

=== modified file 'stock/board_warehouse_view.xml'
--- stock/board_warehouse_view.xml	2012-04-10 14:05:57 +0000
+++ stock/board_warehouse_view.xml	2012-04-26 13:39:22 +0000
@@ -70,7 +70,7 @@
 
         <menuitem id="menu_dashboard_stock" name="Warehouse"  sequence="10" parent="base.menu_reporting_dashboard"/>
         <menuitem action="open_board_warehouse" icon="terp-graph"  groups="group_stock_manager"  id="menu_board_warehouse" parent="menu_dashboard_stock" sequence="1"/>
-        <menuitem icon="terp-stock" id="stock.menu_stock_root" name="Warehouse" sequence="5"  groups="group_stock_manager" action="open_board_warehouse"/>
+      <!--  <menuitem icon="terp-stock" id="stock.menu_stock_root" name="Warehouse" sequence="5"  groups="group_stock_manager" action="open_board_warehouse"/>-->
 
     </data>
 </openerp>

=== modified file 'stock/product.py'
--- stock/product.py	2012-02-13 15:27:55 +0000
+++ stock/product.py	2012-04-26 13:39:22 +0000
@@ -26,6 +26,22 @@
 class product_product(osv.osv):
     _inherit = "product.product"
 
+    def _get_reception(self, cr, uid, ids, field_name, arg, context=None):
+        total_reception={}
+        reception_pool=self.pool.get('stock.picking')
+        for id in ids:
+            reception_ids = reception_pool.search(cr, uid, [('move_lines.product_id','=',id),('type','=','in')])
+            total_reception[id] = len(reception_ids)
+        return total_reception
+
+    def _total_delivery(self, cr, uid, ids, field_name, arg, context=None):
+        total_delivery={}
+        delivery_pool=self.pool.get('stock.picking')
+        for id in ids:
+            delivery_ids = delivery_pool.search(cr, uid, [('move_lines.product_id', '=', id),('type','=','out')])
+            total_delivery[id] = len(delivery_ids)
+        return total_delivery
+
     def get_product_accounts(self, cr, uid, product_id, context=None):
         """ To get the stock input account, stock output account and stock journal related to product.
         @param product_id: product id
@@ -331,6 +347,8 @@
         return res
 
     _columns = {
+        'total_reception': fields.function(_get_reception , type='integer',string="Total Reception"),
+        'total_delivery': fields.function(_total_delivery , type='integer',string="Total Delivery"),
         'qty_available': fields.function(_product_available, multi='qty_available',
             type='float',  digits_compute=dp.get_precision('Product UoM'),
             string='Quantity On Hand',
@@ -446,6 +464,61 @@
                     if fields.get('qty_available'):
                         res['fields']['qty_available']['string'] = _('Produced Qty')
         return res
+    def get_receptions(self, cr, uid, ids, context=None):
+        if context is None:
+            context = {}
+        models_data = self.pool.get('ir.model.data')
+
+        form_view = models_data.get_object_reference(cr, uid, 'stock', 'view_picking_in_form')
+        tree_view = models_data.get_object_reference(cr, uid, 'stock', 'view_picking_in_tree')
+        search_view = models_data.get_object_reference(cr, uid, 'stock', 'view_picking_internal_search')
+        product_id = self.browse(cr, uid, ids[0], context=context)
+        domain =[('move_lines.product_id', '=', product_id.id),('type','=','in')]
+        context.update({'default_type': 'internal', 'contact_display': 'partner_address', 'search_default_available': 1})
+
+        return {
+                'name': _('Receptions'),
+                'view_type': 'form',
+                'view_mode': 'tree, form',
+                'res_model': 'stock.picking',
+                'domain': domain,
+                'view_id': False,
+                'views': [(tree_view and tree_view[1] or False, 'tree'),
+                          (form_view and form_view[1] or False, 'form'),
+                          (False, 'calendar'), (False, 'graph')],
+                'type': 'ir.actions.act_window',
+                'context': context,
+                'search_view_id': search_view and search_view[1] or False,
+                'nodestroy': True,
+        }
+
+    def get_deliveries(self, cr, uid, ids, context=None):
+        if context is None:
+            context = {}
+        models_data = self.pool.get('ir.model.data')
+
+        form_view = models_data.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')
+        tree_view = models_data.get_object_reference(cr, uid, 'stock', 'view_picking_out_tree')
+        search_view = models_data.get_object_reference(cr, uid, 'stock', 'view_picking_out_search')
+        product_id = self.browse(cr, uid, ids[0], context=context)
+        domain =[('move_lines.product_id', '=', product_id.id),('type','=','out')]
+        context.update({'default_type': 'out', 'contact_display': 'partner_address'})
+
+        return {
+                'name': _('Deliveries'),
+                'view_type': 'form',
+                'view_mode': 'tree, form',
+                'res_model': 'stock.picking',
+                'domain': domain,
+                'view_id': False,
+                'views': [(tree_view and tree_view[1] or False, 'tree'),
+                          (form_view and form_view[1] or False, 'form'),
+                          (False, 'calendar'), (False, 'graph')],
+                'type': 'ir.actions.act_window',
+                'context':context,
+                'search_view_id': search_view and search_view[1] or False,
+                'nodestroy': True,
+        }
 
 product_product()
 

=== modified file 'stock/product_view.xml'
--- stock/product_view.xml	2012-04-25 13:56:29 +0000
+++ stock/product_view.xml	2012-04-26 13:39:22 +0000
@@ -136,6 +136,8 @@
                     <field name="type"/>
                     <field name="product_image"/>
                     <field name="list_price"/>
+                    <field name="total_reception"/>
+                    <field name="total_delivery"/>
                     <templates>
                         <t t-name="kanban-box">
                             <div class="oe_product_vignette">
@@ -150,6 +152,20 @@
                                         <li>Price: <field name="lst_price"></field></li>
                                         <li>Cost: <field name="standard_price"></field></li>
                                     </ul>
+                                    <t t-if="record.total_reception.raw_value">
+                                        <a name="get_receptions" type="object">
+                                            (<t t-esc="record.total_reception.value"/>)
+                                            <t t-if="record.total_reception.raw_value &lt;= 1">Reception</t>
+                                            <t t-if="record.total_reception.raw_value > 1"> Receptions</t>
+                                        </a>
+                                    </t>
+                                    <t t-if="record.total_delivery.raw_value">
+                                        <a name="get_deliveries" type="object">
+                                            (<t t-esc="record.total_delivery.value"/>)
+                                            <t t-if="record.total_delivery.raw_value &lt;= 1">Delivery</t>
+                                            <t t-if="record.total_delivery.raw_value > 1">Deliveries</t>
+                                        </a>
+                                    </t>
                                 </div>
                             </div>
                             <script>

=== modified file 'stock/static/src/css/stock.css'
--- stock/static/src/css/stock.css	2011-12-19 16:06:51 +0000
+++ stock/static/src/css/stock.css	2012-04-26 13:39:22 +0000
@@ -9,8 +9,8 @@
 }
 
 .oe_product_img {
-    width: 100px;
-    height: 100px;
+    width: 150px;
+    height: 150px;
     text-align: center;
     overflow: hidden;
     -moz-border-radius: 3px;
@@ -25,13 +25,13 @@
 }
 
 .oe_product_photo {
-    width: 100px;
+    width: 150px;
     height: auto;
     clip: rect(5px, 100px, 105px, 0px);
 }
 
 .oe_product_photo_wide {
-    height: 100px;
+    height: 150px;
     width: auto;
     clip: rect(0px, 110px, 100px, 10px);
 }

=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml	2012-04-25 13:56:29 +0000
+++ stock/stock_view.xml	2012-04-26 13:39:22 +0000
@@ -4,8 +4,8 @@
 
         <menuitem icon="terp-stock" id="menu_stock_root" name="Warehouse"
                   groups="group_stock_manager,group_stock_user" sequence="5"
-                  web_icon="images/warehouse.png"
-                  web_icon_hover="images/warehouse-hover.png"/>
+                  web_icon="images/warehouse.png" 
+                  web_icon_hover="images/warehouse-hover.png" action="product.product_normal_action"/>
         <menuitem id="menu_stock_warehouse_mgmt" name="Receive/Deliver By Orders" parent="menu_stock_root" sequence="1"/>
         <menuitem id="menu_stock_products_moves" name="Receive/Deliver Products" parent="menu_stock_root" sequence="2"/>
         <menuitem id="menu_stock_product" name="Products" parent="menu_stock_root" sequence="6"/>
@@ -1925,6 +1925,9 @@
         <record model="ir.actions.todo.category" id="category_stock_management_config">
             <field name="name">Stock Management</field>
         </record>
+		
+        <menuitem icon="terp-stock" id="menu_stock_root" name="Warehouse" 
+		          groups="group_stock_manager,group_stock_user" sequence="5" action="product.product_normal_action"/>		
 
     </data>
 </openerp>

_______________________________________________
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