@@ -4,23 +4,38 @@
|
||||
<record model="board.note.type" id="note_crm_type">
|
||||
<field name="name">CRM Configuration</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
|
||||
<field name="name">crm.opportunity.user.graph1</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Opportunities by User and Section" type="pie">
|
||||
<field name="state"/>
|
||||
<graph string="Opportunities by User and Section" type="bar">
|
||||
<field name="stage_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field name="user_id" group="True"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="act_my_leads">
|
||||
|
||||
<record id="view_report_crm_oppor_graph" model="ir.ui.view">
|
||||
<field name="name">crm.lead.report.graph</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph orientation="vertical" string="Opportunity Analysis" type="bar">
|
||||
<field name="stage_id"/>
|
||||
<field name="planned_revenue" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_oppor">
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_oppor"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
|
||||
<field name="domain">[('user_id','=',uid),('state','=','open'), ('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_meetings">
|
||||
@@ -31,12 +46,12 @@
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','cancel'),('date','ilike',time.strftime("%Y-%m"))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_leads_stage">
|
||||
<record model="ir.actions.act_window" id="act_my_oppor_stage">
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_report_crm_lead_graph"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
|
||||
<field name="view_id" ref="view_report_crm_oppor_graph"/>
|
||||
<field name="domain">['&', ('user_id','=',uid), '!' , '&', ('state', '=', 'done'), ('date_closed','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_sales_pipeline">
|
||||
@@ -44,7 +59,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel'),('type', '=', 'opportunity')]</field>
|
||||
<field name="domain">['&', ('state', '=', 'done') , '&', ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%Y-%m-%d')), ('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="board_crm_form">
|
||||
@@ -56,8 +71,8 @@
|
||||
<hpaned>
|
||||
<child1>
|
||||
<action
|
||||
string="My Opportunities"
|
||||
name="%(act_my_leads)d"
|
||||
string="My Open Opportunities"
|
||||
name="%(act_my_oppor)d"
|
||||
colspan="4"
|
||||
height="150"
|
||||
width="510"/>
|
||||
@@ -70,10 +85,10 @@
|
||||
<child2>
|
||||
<action
|
||||
string="Revenues by stage"
|
||||
name="%(act_my_leads_stage)d"
|
||||
name="%(act_my_oppor_stage)d"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="My Sales Pipeline"
|
||||
string="Win/Lost Ratio for the last Year"
|
||||
name="%(act_sales_pipeline)d"
|
||||
colspan="4"/>
|
||||
</child2>
|
||||
|
||||
@@ -31,7 +31,15 @@ class procurement_order(osv.osv):
|
||||
|
||||
def _procure_confirm(self, cr, uid, ids=None, use_new_cursor=False, context=None):
|
||||
'''
|
||||
use_new_cursor: False or the dbname
|
||||
Call the scheduler to check the procurement order
|
||||
|
||||
@param self: The object pointer
|
||||
@param cr: The current row, from the database cursor,
|
||||
@param uid: The current user ID for security checks
|
||||
@param ids: List of selected IDs
|
||||
@param use_new_cursor: False or the dbname
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: Dictionary of values
|
||||
'''
|
||||
if not context:
|
||||
context = {}
|
||||
@@ -126,6 +134,15 @@ class procurement_order(osv.osv):
|
||||
return {}
|
||||
|
||||
def create_automatic_op(self, cr, uid, context=None):
|
||||
"""
|
||||
Create procurement of virtual stock < 0
|
||||
|
||||
@param self: The object pointer
|
||||
@param cr: The current row, from the database cursor,
|
||||
@param uid: The current user ID for security checks
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: Dictionary of values
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
product_obj = self.pool.get('product.product')
|
||||
@@ -167,7 +184,16 @@ class procurement_order(osv.osv):
|
||||
def _procure_orderpoint_confirm(self, cr, uid, automatic=False,\
|
||||
use_new_cursor=False, context=None, user_id=False):
|
||||
'''
|
||||
Create procurement based on Orderpoint
|
||||
use_new_cursor: False or the dbname
|
||||
|
||||
@param self: The object pointer
|
||||
@param cr: The current row, from the database cursor,
|
||||
@param user_id: The current user ID for security checks
|
||||
@param context: A standard dictionary for contextual values
|
||||
@param param: False or the dbname
|
||||
@return: Dictionary of values
|
||||
"""
|
||||
'''
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import xmlrpclib
|
||||
|
||||
sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/wizard')
|
||||
wiz_id = sock.create('trunk', 1, 'admin', 'procurement.order.compute.all')
|
||||
sock.execute('trunk', 1, 'admin', wiz_id, {'form': {'po_cycle': 1.0, 'po_lead': 1.0, 'user_id': 3, 'schedule_cycle': 1.0, 'picking_lead': 1.0, 'security_lead': 50.0, 'automatic': False}, 'ids': [], 'report_type': 'pdf', 'model': 'ir.ui.menu', 'id': False}, 'compute', {})
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="uom_hour" model="product.uom">
|
||||
<field name="name">hour</field>
|
||||
<field name="name">Hour</field>
|
||||
<field eval="uom_categ_wtime" name="category_id"/>
|
||||
<field name="factor" eval="8.0"/>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="uom_day" model="product.uom">
|
||||
<field name="name">day</field>
|
||||
<field name="name">Day</field>
|
||||
<field eval="uom_categ_wtime" name="category_id"/>
|
||||
<field name="factor" eval="1.0"/>
|
||||
</record>
|
||||
|
||||
@@ -252,18 +252,19 @@
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Information">
|
||||
<group col="2" colspan="2">
|
||||
<field
|
||||
name="planned_hours"
|
||||
widget="float_time"
|
||||
attrs="{'readonly':[('state','!=','draft')]}"
|
||||
on_change="onchange_planned(planned_hours, effective_hours)"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
</group>
|
||||
<group col="3" colspan="2">
|
||||
<field
|
||||
name="planned_hours"
|
||||
widget="float_time"
|
||||
attrs="{'readonly':[('state','!=','draft')]}"
|
||||
on_change="onchange_planned(planned_hours, effective_hours)"/>
|
||||
<field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2"/>
|
||||
<button name="%(action_config_compute_remaining)d" string="Reevaluate" type="action" colspan="1" target="new" states="open,pending" icon="gtk-edit"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<field name="delay_hours" widget="float_time"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
|
||||
<field name="delay_hours" widget="float_time"/>
|
||||
</group>
|
||||
|
||||
<field colspan="4" name="description" nolabel="1" attrs="{'readonly':[('state','=','done')]}" widget="text_wiki"/>
|
||||
|
||||
@@ -425,6 +425,7 @@ class purchase_order(osv.osv):
|
||||
'invoice_state': istate,
|
||||
'purchase_id': order.id,
|
||||
'company_id': order.company_id.id,
|
||||
'move_lines' : [],
|
||||
})
|
||||
todo_moves = []
|
||||
for order_line in order.order_line:
|
||||
@@ -800,4 +801,4 @@ class procurement_order(osv.osv):
|
||||
|
||||
procurement_order()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -254,7 +254,7 @@ class scrum_product_backlog(osv.osv):
|
||||
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('done','Done'),('cancel','Cancelled')], 'State', required=True),
|
||||
'progress': fields.function(_calc_progress, method=True, string='Progress', help="Computed as: Time Spent / Total Time."),
|
||||
'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours', help="Computed using the sum of the task work done (Time spent on tasks)"),
|
||||
'effective_hours': fields.function(_calc_effective, method=True, string='Spent Hours', help="Computed using the sum of the time spent on every related tasks"),
|
||||
'expected_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'),
|
||||
'create_date': fields.datetime("Creation Date", readonly=True),
|
||||
'task_hours': fields.function(_calc_task, method=True, string='Task Hours', help='Estimated time of the total hours of the tasks')
|
||||
|
||||
Reference in New Issue
Block a user