Devishree Brahmbhatt (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-all-home-page-dbr into
lp:openobject-addons.
Requested reviews:
Devishree Brahmbhatt (OpenERP) (dbr-openerp)
Raphael Collet (OpenERP) (rco-openerp)
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 subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-all-home-page-dbr.
=== modified file 'account/account_invoice_view.xml'
--- account/account_invoice_view.xml 2012-05-22 09:14:45 +0000
+++ account/account_invoice_view.xml 2012-05-22 13:02:20 +0000
@@ -445,6 +445,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-05-22 13:02:20 +0000
@@ -63,8 +63,6 @@
<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"/>
-
</data>
</openerp>
=== modified file 'board/board_data_admin.xml'
--- board/board_data_admin.xml 2012-05-19 08:33:50 +0000
+++ board/board_data_admin.xml 2012-05-22 13:02:20 +0000
@@ -2,5 +2,6 @@
<openerp>
<data>
+
</data>
</openerp>
=== modified file 'crm/board_crm_view.xml'
--- crm/board_crm_view.xml 2012-04-30 02:17:03 +0000
+++ crm/board_crm_view.xml 2012-05-22 13:02:20 +0000
@@ -102,7 +102,6 @@
<field name="usage">menu</field>
<field name="view_id" ref="board_crm_form"/>
</record>
- <menuitem id="menu_board_crm" parent="base.menu_reporting_dashboard" action="open_board_crm" sequence="10" groups="base.group_sale_salesman"/>
<!-- crm mananger dashboard -->
<record model="ir.ui.view" id="view_crm_opportunity_categ_graph">
@@ -195,11 +194,13 @@
<field name="usage">menu</field>
<field name="view_id" ref="board_crm_statistical_form"/>
</record>
+ <menuitem id="menu_dashboard_crm" name="CRM" sequence="20" parent="base.menu_reporting_dashboard"/>
<menuitem
id="menu_board_statistics_dash"
- parent="base.menu_reporting_dashboard"
+ parent="menu_dashboard_crm"
+ icon="terp-graph"
action="open_board_statistical_dash"
- sequence="11"
+ sequence="1"
groups="base.group_sale_manager"/>
</data>
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2012-05-10 15:19:39 +0000
+++ crm/crm_lead.py 2012-05-22 13:02:20 +0000
@@ -162,6 +162,7 @@
'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel (mail, direct, phone, ...)"),
'contact_name': fields.char('Contact Name', size=64),
'partner_name': fields.char("Customer Name", size=64,help='The name of the future partner company that will be created while converting the lead into opportunity', select=1),
+
'opt_in': fields.boolean('Opt-In', oldname='optin', help="If opt-in is checked, this contact has accepted to receive emails."),
'opt_out': fields.boolean('Opt-Out', oldname='optout', help="If opt-out is checked, this contact has refused to receive emails or unsubscribed to a campaign."),
'type':fields.selection([ ('lead','Lead'), ('opportunity','Opportunity'), ],'Type', help="Type is used to separate Leads and Opportunities"),
=== modified file 'crm/crm_lead_view.xml'
--- crm/crm_lead_view.xml 2012-05-22 09:14:45 +0000
+++ crm/crm_lead_view.xml 2012-05-22 13:02:20 +0000
@@ -354,6 +354,7 @@
domain="[('user_id','=', False)]"
help="Unassigned Leads" />
</field>
+ <field name="partner_id"/>
<field name="subjects"/>
<field name="section_id" widget="selection"
context="{'invisible_section': False}">
@@ -612,7 +613,7 @@
domain="[]"
help="Show Sales Team"/>
</field>
-
+ <field name="partner_id"/>
<newline/>
<group expand="0" string="Group By..." colspan="16">
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
=== modified file 'crm/crm_meeting_view.xml'
--- crm/crm_meeting_view.xml 2012-05-16 16:01:15 +0000
+++ crm/crm_meeting_view.xml 2012-05-22 13:02:20 +0000
@@ -282,6 +282,7 @@
domain="[('user_id','=',uid)]"
help="My Meetings" />
</field>
+ <field name="partner_id"/>
<field name="section_id" widget="selection">
<filter icon="terp-personal+"
domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
=== modified file 'crm/res_partner.py'
--- crm/res_partner.py 2012-03-30 09:08:37 +0000
+++ crm/res_partner.py 2012-05-22 13:02:20 +0000
@@ -20,10 +20,21 @@
##############################################################################
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 _opportunity_meeting_count(self, cr, uid, ids, field_name, arg, context=None):
+ res = {}
+ for partner in self.browse(cr, uid, ids, context):
+ res[partner.id] = {
+ 'opportunity_count': len(partner.opportunity_ids),
+ 'meeting_count': len(partner.meeting_ids),
+ }
+ return res
+
_columns = {
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
@@ -32,6 +43,8 @@
'Meetings'),
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
'Phonecalls'),
+ 'opportunity_count': fields.function(_opportunity_meeting_count, string="Opportunity", type='integer', multi='opp_meet'),
+ 'meeting_count': fields.function(_opportunity_meeting_count, string="Meeting", type='integer', multi='opp_meet'),
}
def redirect_partner_form(self, cr, uid, partner_id, context=None):
=== modified file 'crm/res_partner_view.xml'
--- crm/res_partner_view.xml 2012-05-07 18:13:46 +0000
+++ crm/res_partner_view.xml 2012-05-22 13:02:20 +0000
@@ -42,6 +42,48 @@
</field>
</record>
+ <act_window
+ id="crm_meeting_partner"
+ name="Meetings"
+ res_model="crm.meeting"
+ src_model="res.partner"
+ view_mode="calendar,tree,form,gantt"
+ context="{'search_default_partner_id': [active_id],'default_partner_id': active_id}"
+ />
+ <act_window
+ id="act_res_partner_2_opportunity"
+ name="Opportunity"
+ res_model="crm.lead"
+ src_model="res.partner"
+ view_mode="tree,form,graph,calendar"
+ domain="[('type','=','opportunity')]"
+ context="{'search_default_partner_id': [active_id],'default_partner_id': active_id}"
+ />
+
+ <!-- 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="opportunity_count"/>
+ <field name="meeting_count"/>
+ </field>
+ <xpath expr="//div[@class='oe_partner_desc']//h4[@class='oe_partner_heading']" position="after">
+ <a name="%(act_res_partner_2_opportunity)d" type="action">
+ <t t-if="record.opportunity_count.value">Opportunities(<t t-esc="record.opportunity_count.value"/>)</t>
+ </a>
+ <a name="%(crm_meeting_partner)d" type="action">
+ <t t-if="record.meeting_count.value">Meetings(<t t-esc="record.meeting_count.value"/>)</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-05-22 13:02:20 +0000
@@ -49,9 +49,6 @@
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"/>
-
<record model="ir.ui.view" id="board_document_manager_form1">
<field name="name">board.document.manager.form1</field>
<field name="model">board.board</field>
=== modified file 'document/document_view.xml'
--- document/document_view.xml 2012-05-16 16:01:15 +0000
+++ document/document_view.xml 2012-05-22 13:02:20 +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-05-22 09:14:45 +0000
+++ event/event_view.xml 2012-05-22 13:02:20 +0000
@@ -309,6 +309,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-05-22 13:02:20 +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,5 @@
<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"/>
-
</data>
</openerp>
=== modified file 'hr/hr_view.xml'
--- hr/hr_view.xml 2012-05-22 09:14:45 +0000
+++ hr/hr_view.xml 2012-05-22 13:02:20 +0000
@@ -187,6 +187,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 'hr_holidays/hr_holidays.py'
--- hr_holidays/hr_holidays.py 2012-05-17 10:15:17 +0000
+++ hr_holidays/hr_holidays.py 2012-05-22 13:02:20 +0000
@@ -484,18 +484,23 @@
remaining[employee_id] = 0.0
return remaining
- def _get_leave_status(self, cr, uid, ids, name, args, context=None):
- holidays_id = self.pool.get('hr.holidays').search(cr, uid,
- [('employee_id', 'in', ids), ('date_from','<=',time.strftime('%Y-%m-%d %H:%M:%S')),
- ('date_to','>=',time.strftime('%Y-%m-%d %H:%M:%S')),('type','=','remove'),('state','not in',('cancel','refuse'))],
+ def _get_leave_status(self, cr, uid, ids, name, args, context=None):
+ holidays_obj = self.pool.get('hr.holidays')
+ holidays_id = holidays_obj.search(cr, uid,
+ [('employee_id', 'in', ids), ('date_from','<=',time.strftime('%Y-%m-%d')),
+ ('date_to','>=',time.strftime('%Y-%m-%d')),('type','=','remove'),('state','not in',('cancel','refuse'))],
context=context)
result = {}
for id in ids:
result[id] = {
'current_leave_state': False,
'current_leave_id': False,
+ 'date_from':False,
+ 'date_to':False,
}
for holiday in self.pool.get('hr.holidays').browse(cr, uid, holidays_id, context=context):
+ result[holiday.employee_id.id]['date_from'] = holiday.date_from
+ result[holiday.employee_id.id]['date_to'] = holiday.date_to
result[holiday.employee_id.id]['current_leave_state'] = holiday.state
result[holiday.employee_id.id]['current_leave_id'] = holiday.holiday_status_id.id
return result
@@ -506,6 +511,8 @@
selection=[('draft', 'New'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')]),
'current_leave_id': fields.function(_get_leave_status, multi="leave_status", string="Current Leave Type",type='many2one', relation='hr.holidays.status'),
+ 'date_from': fields.function(_get_leave_status, multi='leave_status', type='date', string='From Date'),
+ 'date_to': fields.function(_get_leave_status, multi='leave_status', type='date', string='To Date'),
'last_login': fields.related('user_id', 'date', type='datetime', string='Latest Connection', readonly=1)
}
=== modified file 'hr_holidays/hr_holidays_view.xml'
--- hr_holidays/hr_holidays_view.xml 2012-05-22 09:14:45 +0000
+++ hr_holidays/hr_holidays_view.xml 2012-05-22 13:02:20 +0000
@@ -512,7 +512,7 @@
<field name="arch" type="xml">
<field name="coach_id" position="after">
<field name="remaining_leaves"/>
- <field name="current_leave_id"/>
+ <field name="current_leave_id"/>
<field name="current_leave_state" attrs="{'invisible':[('current_leave_id','=',False)]}"/>
</field>
</field>
@@ -526,11 +526,13 @@
<xpath expr="//templates" position="before">
<field name="current_leave_state"/>
<field name="last_login"/>
+ <field name="date_from"/>
+ <field name="date_to"/>
</xpath>
<xpath expr="//div[@class='oe_employee_details']/ul/li" position="before">
<li t-if="record.current_leave_id.raw_value || record.last_login.raw_value">
<span t-if="record.current_leave_id.raw_value" t-att-class="record.current_leave_state.raw_value=='validate'?'oe_kanban_color_3':'oe_kanban_color_2'">
- <span class="oe_kanban_button" style="font-size: 100%%">
+ <span class="oe_kanban_button" style="font-size: 100%%" t-att-title="record.date_from.raw_value.toString('ddd dS MMM') + ' - ' + record.date_to.raw_value.toString('ddd dS MMM')" >
<field name="current_leave_id"/>
</span>
</span>
=== modified file 'hr_holidays/security/ir_rule.xml'
--- hr_holidays/security/ir_rule.xml 2011-10-11 20:05:49 +0000
+++ hr_holidays/security/ir_rule.xml 2012-05-22 13:02:20 +0000
@@ -2,18 +2,5 @@
<openerp>
<data>
- <record id="property_rule_holidays_manager" model="ir.rule">
- <field name="name">Manager Holidays</field>
- <field model="ir.model" name="model_id" ref="model_hr_holidays"/>
- <field name="domain_force">[(1,'=',1)]</field>
- <field name="groups" eval="[(4,ref('base.group_hr_manager')), (4,ref('base.group_hr_user'))]"/>
- </record>
- <record id="property_rule_holidays_employee" model="ir.rule">
- <field name="name">Employee Holidays</field>
- <field model="ir.model" name="model_id" ref="model_hr_holidays"/>
- <field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
- <field name="groups" eval="[(4,ref('base.group_user'))]"/>
- </record>
-
</data>
</openerp>
=== modified file 'hr_holidays/test/test_hr_holiday.yml'
--- hr_holidays/test/test_hr_holiday.yml 2012-03-29 10:21:24 +0000
+++ hr_holidays/test/test_hr_holiday.yml 2012-05-22 13:02:20 +0000
@@ -6,8 +6,8 @@
!record {model: hr.holidays, id: hr_holiday1}:
name: Sick Leave
holiday_status_id: holiday_status_cl
- date_from: !eval time.strftime('%Y-%m-10 10:00:00')
- date_to: !eval time.strftime('%Y-%m-11 19:00:00')
+ date_from: !eval time.strftime('%Y-%m-10 00:00:00')
+ date_to: !eval time.strftime('%Y-%m-11 00:00:00')
employee_id: hr.employee_fp
type: remove
-
=== modified file 'membership/membership_view.xml'
--- membership/membership_view.xml 2012-05-07 18:13:46 +0000
+++ membership/membership_view.xml 2012-05-22 13:02:20 +0000
@@ -193,19 +193,27 @@
</record>
<record model="ir.actions.act_window.view" id="action_membership_members_view_tree">
- <field name="sequence" eval="1"/>
+ <field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="membership_members_tree"/>
<field name="act_window_id" ref="action_membership_members"/>
</record>
<record model="ir.actions.act_window.view" id="action_membership_members_view_form">
- <field name="sequence" eval="2"/>
+ <field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="base.view_partner_form"/>
<field name="act_window_id" ref="action_membership_members"/>
</record>
+
+ <record model="ir.actions.act_window.view" id="action_membership_members_view_kanban">
+ <field name="sequence" eval="1"/>
+ <field name="view_mode">kanban</field>
+ <field name="view_id" ref="base.res_partner_kanban_view"/>
+ <field name="act_window_id" ref="action_membership_members"/>
+ </record>
+ <menuitem name="Association" id="base.menu_association" icon="terp-calendar" sequence="9" action="action_membership_members"/>
<menuitem name="Members" parent="menu_membership" id="menu_members" sequence="2" action="action_membership_members"/>
<!-- PARTNERS -->
=== 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-05-22 13:02:20 +0000
@@ -35,9 +35,5 @@
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"/>
-
-
</data>
</openerp>
=== modified file 'mrp/mrp_view.xml'
--- mrp/mrp_view.xml 2012-05-22 09:14:45 +0000
+++ mrp/mrp_view.xml 2012-05-22 13:02:20 +0000
@@ -850,6 +850,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-05-16 16:01:15 +0000
+++ product/product_view.xml 2012-05-22 13:02:20 +0000
@@ -263,20 +263,27 @@
</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>
- <menuitem id="base.menu_product" parent="base.menu_base_partner" name="Products" sequence="9"/>
+ <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"/>
<record id="product_normal_action_puchased" model="ir.actions.act_window">
=== modified file 'project/board_project_view.xml'
--- project/board_project_view.xml 2012-05-07 18:13:46 +0000
+++ project/board_project_view.xml 2012-05-22 13:02:20 +0000
@@ -117,9 +117,5 @@
parent="menu_project_dashboard"
sequence="1"/>
- <menuitem
- icon="terp-project" id="base.menu_main_pm"
- name="Project" sequence="10" action="open_board_project"/>
-
</data>
</openerp>
=== modified file 'project/project_view.xml'
--- project/project_view.xml 2012-05-22 09:14:45 +0000
+++ project/project_view.xml 2012-05-22 13:02:20 +0000
@@ -643,6 +643,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>
@@ -728,7 +731,7 @@
<menuitem id="menu_project_config_project" name="Stages" parent="menu_definitions" sequence="1"/>
<menuitem action="open_task_type_form" id="menu_task_types_view" parent="menu_project_config_project" sequence="2" groups="base.group_no_one"/>
- <menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_project_management" sequence="1"/>
+ <menuitem action="open_view_project_all" id="menu_open_view_project_all" parent="menu_project_management" sequence="1" groups="base.group_no_one"/>
<act_window context="{'search_default_user_id': [active_id], 'default_user_id': active_id}" id="act_res_users_2_project_project" name="User's projects" res_model="project.project" src_model="res.users" view_mode="tree,form" view_type="form"/>
=== 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-05-22 13:02:20 +0000
@@ -116,8 +116,5 @@
parent="menu_purchase_deshboard"
sequence="4"/>
- <menuitem icon="terp-purchase" id="base.menu_purchase_root" action="open_board_purchase" name="Purchases"/>
-
-
</data>
</openerp>
=== modified file 'purchase/purchase_view.xml'
--- purchase/purchase_view.xml 2012-05-22 09:14:45 +0000
+++ purchase/purchase_view.xml 2012-05-22 13:02:20 +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" />
@@ -318,8 +318,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>
@@ -329,7 +332,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-05-22 09:14:45 +0000
+++ purchase_requisition/purchase_requisition_view.xml 2012-05-22 13:02:20 +0000
@@ -177,7 +177,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-05-22 13:02:20 +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-05-07 18:13:46 +0000
+++ sale/__openerp__.py 2012-05-22 13:02:20 +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-30 02:17:03 +0000
+++ sale/board_sale_view.xml 2012-05-22 13:02:20 +0000
@@ -82,7 +82,9 @@
<field name="view_mode">form</field>
<field name="view_id" ref="board_sales_form"/>
</record>
- <menuitem id="menu_board_sales" parent="base.menu_reporting_dashboard" action="open_board_sales" sequence="15" groups="base.group_sale_salesman"/>
+
+ <menuitem id="menu_dashboard_sales" name="Sales" sequence="20" parent="base.menu_reporting_dashboard"/>
+ <menuitem action="open_board_sales" icon="terp-graph" groups="base.group_sale_salesman" id="menu_board_sales" parent="menu_dashboard_sales" sequence="1"/>
<!-- Sale manager dashboard -->
<record id="board_sales_manager_form" model="ir.ui.view">
@@ -112,7 +114,5 @@
<field name="view_mode">form</field>
<field name="view_id" ref="board_sales_manager_form"/>
</record>
- <menuitem id="menu_board_sales_manager" parent="base.menu_reporting_dashboard" action="open_board_sales_manager" sequence="16" groups="base.group_sale_manager"/>
-
</data>
</openerp>
=== added file 'sale/res_partner.py'
--- sale/res_partner.py 1970-01-01 00:00:00 +0000
+++ sale/res_partner.py 2012-05-22 13:02:20 +0000
@@ -0,0 +1,39 @@
+# -*- 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 _sale_order_count(self, cr, uid, ids, field_name, arg, context=None):
+ res = {}
+ for partner in self.browse(cr, uid, ids, context):
+ res[partner.id] = len(partner.sale_order_ids)
+ return res
+
+ _columns = {
+ 'sale_order_ids': fields.one2many('sale.order', 'partner_id', 'Quotations and Sale Orders'),
+ 'sale_order_count': fields.function(_sale_order_count, string='Sale Order', type='integer'),
+ }
+
+# 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-05-22 13:02:20 +0000
@@ -0,0 +1,23 @@
+<?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="sale_order_count"/>
+ </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-if="record.sale_order_count.value">Quotations(<t t-esc="record.sale_order_count.value" />)</t>
+ </a>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>
+
=== modified file 'sale/sale_view.xml'
--- sale/sale_view.xml 2012-05-22 09:14:45 +0000
+++ sale/sale_view.xml 2012-05-22 13:02:20 +0000
@@ -1,6 +1,8 @@
<openerp>
<data>
- <menuitem icon="terp-partner" id="base.menu_base_partner" name="Sales" sequence="1" groups="base.group_sale_salesman"/>
+ <menuitem icon="terp-partner" id="base.menu_base_partner" name="Sales" sequence="1" 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"/>
+
<record id="view_shop_form" model="ir.ui.view">
<field name="name">sale.shop</field>
=== modified file 'stock/board_warehouse_view.xml'
--- stock/board_warehouse_view.xml 2012-04-30 02:17:03 +0000
+++ stock/board_warehouse_view.xml 2012-05-22 13:02:20 +0000
@@ -68,8 +68,8 @@
<field name="view_id" ref="board_warehouse_form"/>
</record>
- <menuitem id="menu_board_warehouse" parent="base.menu_reporting_dashboard" action="open_board_warehouse" sequence="20" groups="group_stock_manager"/>
- <menuitem icon="terp-stock" id="stock.menu_stock_root" name="Warehouse" groups="group_stock_manager" sequence="5"/>
+ <menuitem id="menu_dashboard_stock" name="Warehouse" sequence="20" 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"/>
</data>
</openerp>
=== modified file 'stock/product.py'
--- stock/product.py 2012-05-14 15:09:26 +0000
+++ stock/product.py 2012-05-22 13:02:20 +0000
@@ -26,6 +26,22 @@
class product_product(osv.osv):
_inherit = "product.product"
+ def _stock_move_count(self, cr, uid, ids, field_name, arg, context=None):
+ res = dict([(id, {'reception_count': 0, 'delivery_count': 0}) for id in ids])
+ field = False
+ move_pool=self.pool.get('stock.move')
+ move_ids = move_pool.search(cr, uid, [('product_id', 'in', ids)])
+ for move in move_pool.browse(cr, uid, move_ids, context):
+ product_id = move.product_id.id
+ if product_id in ids:
+ if move.picking_id.type == 'in':
+ field = 'reception_count'
+ elif move.picking_id.type == 'out':
+ field = 'delivery_count'
+ if field:
+ res[product_id][field] += 1
+ return res
+
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 = {
+ 'reception_count': fields.function(_stock_move_count, string="Reception", type='integer', multi='pickings'),
+ 'delivery_count': fields.function(_stock_move_count, string="Delivery", type='integer', multi='pickings'),
'qty_available': fields.function(_product_available, multi='qty_available',
type='float', digits_compute=dp.get_precision('Product Unit of Measure'),
string='Quantity On Hand',
=== modified file 'stock/product_view.xml'
--- stock/product_view.xml 2012-05-16 16:01:15 +0000
+++ stock/product_view.xml 2012-05-22 13:02:20 +0000
@@ -125,6 +125,32 @@
</group>
</field>
</record>
+
+ <record id="action_receive_move" model="ir.actions.act_window">
+ <field name="name">Receive Products</field>
+ <field name="res_model">stock.move</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="domain">[('picking_id.type','=','in')]</field>
+ <field name="view_id" ref="view_move_tree_reception_picking"/>
+ <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
+ <field name="search_view_id" ref="view_move_search_reception_incoming_picking"/>
+ <field name="help">Here you can receive individual products, no matter what purchase order or picking order they come from. You will find the list of all products you are waiting for. Once you receive an order, you can filter based on the name of the supplier or the purchase order reference. Then you can confirm all products received using the buttons on the right of each line.</field>
+ </record>
+
+ <record id="action_deliver_move" model="ir.actions.act_window">
+ <field name="name">Receive Products</field>
+ <field name="res_model">stock.move</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="domain">[('picking_id.type','=','out')]</field>
+ <field name="view_id" ref="view_move_tree_reception_picking"/>
+ <field name="context" eval="'{\'search_default_product_id\': [active_id]}'"/>
+ <field name="search_view_id" ref="view_move_search_reception_outcoming_picking"/>
+ <field name="help">You will find in this list all products you have to deliver to your customers. You can process the deliveries directly from this list using the buttons on the right of each line. You can filter the products to deliver by customer, products or sale order (using the Origin field).</field>
+ </record>
<record model="ir.ui.view" id="product.product_kanban_view">
<field name="name">Product Kanban</field>
@@ -136,6 +162,8 @@
<field name="type"/>
<field name="product_image"/>
<field name="list_price"/>
+ <field name="reception_count"/>
+ <field name="delivery_count"/>
<templates>
<t t-name="kanban-box">
<div class="oe_product_vignette">
@@ -151,6 +179,12 @@
<li>Price: <field name="lst_price"></field></li>
<li>Cost: <field name="standard_price"></field></li>
</ul>
+ <a name="%(action_receive_move)d" type="action">
+ <t t-if="record.reception_count.value">Receptions(<t t-esc="record.reception_count.value"/>)</t>
+ </a>
+ <a name="%(action_deliver_move)d" type="action">
+ <t t-if="record.delivery_count.value">Deliveries(<t t-esc="record.delivery_count.value"/>)</t>
+ </a>
</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-05-22 13:02:20 +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.py'
--- stock/stock.py 2012-05-17 10:15:17 +0000
+++ stock/stock.py 2012-05-22 13:02:20 +0000
@@ -650,6 +650,7 @@
'max_date': fields.function(get_min_max_date, fnct_inv=_set_maximum_date, multi="min_max_date",
store=True, type='datetime', string='Max. Expected Date', select=2),
'move_lines': fields.one2many('stock.move', 'picking_id', 'Internal Moves', states={'done': [('readonly', True)], 'cancel': [('readonly', True)]}),
+ 'product_id': fields.related('move_lines', 'product_id', type='many2one', relation='product.product', string='Product'),
'auto_picking': fields.boolean('Auto-Picking', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'partner_id': fields.many2one('res.partner', 'Partner', states={'done':[('readonly', True)], 'cancel':[('readonly',True)]}),
'invoice_state': fields.selection([
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2012-05-22 09:14:45 +0000
+++ stock/stock_view.xml 2012-05-22 13:02:20 +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"/>
@@ -855,6 +855,8 @@
<filter icon="terp-dialog-close" name="done" string="Done" domain="[('state','=','done')]" help="Pickings already processed"/>
<separator orientation="vertical"/>
<field name="name"/>
+ <field name="partner_id"/>
+ <field name="product_id"/>
<field name="origin"/>
<field name="stock_journal_id" widget="selection"/>
<field name="company_id" widget="selection"/>
@@ -972,6 +974,7 @@
<separator orientation="vertical"/>
<field name="name"/>
<field name="origin"/>
+ <field name="product_id"/>
<field name="stock_journal_id" widget="selection"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
@@ -1068,6 +1071,7 @@
</div>
</xpath>
</data>
+
</field>
</record>
@@ -1089,7 +1093,9 @@
<field name="origin"/>
<field name="stock_journal_id" widget="selection"/>
<field name="company_id" widget="selection" groups="base.group_multi_company" />
+ <field name="product_id"/>
</group>
+
<newline/>
<group expand="0" string="Group By...">
<separator orientation="vertical" />
@@ -1135,9 +1141,6 @@
</record>
<menuitem action="action_picking_tree4" id="menu_action_picking_tree4" parent="menu_stock_warehouse_mgmt" sequence="1"/>
-
-
-
<!--
STOCK MOVES
-->
@@ -1727,6 +1730,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