From 2a9f1ae7e1322a8452cd6e1dbaa6d2b2829a0d1d Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Tue, 2 Feb 2010 18:40:24 +0530 Subject: [PATCH 01/24] [MOD] Improvement in Sql view bzr revid: vir@tinyerp.com-20100202131024-ohz2u0s3hfxe2ko2 --- .../board_warehouse/board_warehouse_view.xml | 13 +++++- addons/stock/stock.py | 44 ++++++++++++++----- addons/stock/stock_view.xml | 2 +- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/addons/board_warehouse/board_warehouse_view.xml b/addons/board_warehouse/board_warehouse_view.xml index 0ea7fb48297..cdc93d9a274 100644 --- a/addons/board_warehouse/board_warehouse_view.xml +++ b/addons/board_warehouse/board_warehouse_view.xml @@ -5,6 +5,15 @@ Warehouse + + Reception Picking Stock Move + stock.move + ir.actions.act_window + form + tree,form + [('picking_id','!=',False),('picking_id.type','=','in'),('date','<=',time.strftime('%Y-%m-%d 23:59:59'))] + + board.warehouse.form @@ -15,11 +24,11 @@ - + - + diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 1e91f182568..cc4da8bdbbd 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1656,12 +1656,21 @@ class report_products_to_received_planned(osv.osv): tools.drop_view_if_exists(cr, 'report_products_to_received_planned') cr.execute(""" create or replace view report_products_to_received_planned as ( - select - distinct current_date as date, - min(id) as id, - (select sum(product_qty) from stock_move where to_char(date,'YYYY-MM-DD')::date = current_date ) as qty, - (select sum(product_qty) from stock_move where to_char(date_planned,'YYYY-MM-DD')::date = current_date) as planned_qty - from stock_move + select stock.date, min(stock.id), sum(stock.product_qty) as qty, 0 as planned_qty + from stock_picking picking + inner join stock_move stock + on picking.id = stock.picking_id and picking.type = 'in' + where stock.date between (select cast(date_trunc('week', current_date) as date)) and (select cast(date_trunc('week', current_date) as date) + 7) + group by stock.date + + union + + select stock.date_planned, min(stock.id), 0 as actual_qty, sum(stock.product_qty) as planned_qty + from stock_picking picking + inner join stock_move stock + on picking.id = stock.picking_id and picking.type = 'in' + where stock.date_planned between (select cast(date_trunc('week', current_date) as date)) and (select cast(date_trunc('week', current_date) as date) + 7) + group by stock.date_planned ) """) report_products_to_received_planned() @@ -1681,12 +1690,23 @@ class report_delivery_products_planned(osv.osv): tools.drop_view_if_exists(cr, 'report_delivery_products_planned') cr.execute(""" create or replace view report_delivery_products_planned as ( - select - distinct current_date as date, - min(sm.id) as id, - (select sum(product_qty) from stock_move join stock_picking sp on (sm.picking_id = sp.id ) where to_char(sm.date,'YYYY-MM-DD')::date = current_date ) as qty, - (select sum(product_qty) from stock_move join stock_picking sp on (sm.picking_id = sp.id ) where to_char(sm.date_planned,'YYYY-MM-DD')::date = current_date) as planned_qty - from stock_move sm join stock_picking sp on (sm.picking_id = sp.id ) where sp.type = 'out' group by sm.picking_id, sm.date, sm.date_planned + select stock.date, min(stock.id), sum(stock.product_qty) as qty, 0 as planned_qty + from stock_picking picking + inner join stock_move stock + on picking.id = stock.picking_id and picking.type = 'out' + where stock.date between (select cast(date_trunc('week', current_date) as date)) and (select cast(date_trunc('week', current_date) as date) + 7) + group by stock.date + + union + + select stock.date_planned, min(stock.id), 0 as actual_qty, sum(stock.product_qty) as planned_qty + from stock_picking picking + inner join stock_move stock + on picking.id = stock.picking_id and picking.type = 'out' + where stock.date_planned between (select cast(date_trunc('week', current_date) as date)) and (select cast(date_trunc('week', current_date) as date) + 7) + group by stock.date_planned + + ) """) report_delivery_products_planned() diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 9adf0bbecba..42bef7b13d7 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1515,7 +1515,7 @@ - Reception Picking Stock Move + Number of Products to receive Vs planned report.products.to.received.planned ir.actions.act_window form From 9840d0a5049e4d0c42caa0a06610cc8753995961 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Wed, 3 Feb 2010 16:51:42 +0530 Subject: [PATCH 02/24] [Fix] : Problem reporting menu displaying twice in project management bzr revid: vir@tinyerp.com-20100203112142-jl2msxvgzjdddzzn --- addons/crm_project/report_crm_project_bug_view.xml | 14 +++++++------- addons/report_task/report_task_view.xml | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/addons/crm_project/report_crm_project_bug_view.xml b/addons/crm_project/report_crm_project_bug_view.xml index 4bd1a24ebcc..669707ab346 100644 --- a/addons/crm_project/report_crm_project_bug_view.xml +++ b/addons/crm_project/report_crm_project_bug_view.xml @@ -35,7 +35,7 @@ - + report.crm.project.bug.user.graph report.crm.project.bug.user @@ -59,7 +59,7 @@ - + Project Bug by User and Section report.crm.project.bug.user @@ -68,11 +68,11 @@ - - - + + + - + @@ -188,6 +188,6 @@ - + \ No newline at end of file diff --git a/addons/report_task/report_task_view.xml b/addons/report_task/report_task_view.xml index e86abd878e6..331351803fb 100644 --- a/addons/report_task/report_task_view.xml +++ b/addons/report_task/report_task_view.xml @@ -81,8 +81,9 @@ [] - - + + + From d6cdc061be78c6a7a69c4302447e95e7ae0de898 Mon Sep 17 00:00:00 2001 From: "RCH(Open ERP)" <> Date: Wed, 3 Feb 2010 17:14:21 +0530 Subject: [PATCH 03/24] [Fix] : Removed unwanted dependency from Project module bzr revid: vir@tinyerp.com-20100203114421-9hpcy38sn13w8un1 --- .../account_analytic_analysis_menu.xml | 2 +- .../crossovered_budget_view.xml | 8 ++++++ addons/crm_project/crm_bugs_menu.xml | 20 +++++++-------- addons/hr_attendance/hr_attendance_wizard.xml | 6 +++++ .../hr_timesheet_sheet_view.xml | 8 ++++++ addons/project/__terp__.py | 2 +- addons/project/project_view.xml | 25 ++++--------------- .../report_analytic_planning_view.xml | 2 +- .../report_timesheet_view.xml | 7 ++++++ addons/scrum/scrum_view.xml | 2 +- 10 files changed, 48 insertions(+), 34 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml index 232ba274769..6dafe28af8e 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml @@ -1,6 +1,6 @@ - + diff --git a/addons/account_budget/crossovered_budget_view.xml b/addons/account_budget/crossovered_budget_view.xml index 86516f35bfa..bdb8bfd4c8f 100644 --- a/addons/account_budget/crossovered_budget_view.xml +++ b/addons/account_budget/crossovered_budget_view.xml @@ -294,6 +294,14 @@ auto="False" menu="False"/>--> + + + + + + diff --git a/addons/crm_project/crm_bugs_menu.xml b/addons/crm_project/crm_bugs_menu.xml index 627fab57aba..442744ade3d 100644 --- a/addons/crm_project/crm_bugs_menu.xml +++ b/addons/crm_project/crm_bugs_menu.xml @@ -6,34 +6,34 @@ Bugs - + Patches - + Feature Requests - + Fixed - + Awaiting Response - - + + Future - - - + + + ######################## BUG TRACKING (menu) ########################### + diff --git a/addons/hr_attendance/hr_attendance_wizard.xml b/addons/hr_attendance/hr_attendance_wizard.xml index dcfadeb105b..bdec6414246 100644 --- a/addons/hr_attendance/hr_attendance_wizard.xml +++ b/addons/hr_attendance/hr_attendance_wizard.xml @@ -11,6 +11,12 @@ + + + diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index 79650ce2a59..c9cfc6caeaf 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -219,6 +219,14 @@ + + + + diff --git a/addons/project/__terp__.py b/addons/project/__terp__.py index 5c7030a8acb..7f78e3722c0 100644 --- a/addons/project/__terp__.py +++ b/addons/project/__terp__.py @@ -26,7 +26,7 @@ "author" : "Tiny", "website" : "http://www.openerp.com", "category" : "Generic Modules/Projects & Services", - "depends" : ["product", "account", "hr", "process", "mail_gateway","hr_timesheet_sheet","report_timesheet","account_budget"], + "depends" : ["product", "account", "hr", "process", "mail_gateway"], "description": """Project management module that track multi-level projects, tasks, works done on tasks, eso. It is able to render planning, order tasks, eso. """, diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 1e75b2a9a82..a4a23ec8194 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -1,25 +1,10 @@ - - + + - - - - - - - - - - + @@ -146,7 +131,7 @@ - + Projects @@ -661,7 +646,7 @@ - + diff --git a/addons/report_analytic_planning/report_analytic_planning_view.xml b/addons/report_analytic_planning/report_analytic_planning_view.xml index 5d5c6aa37aa..c9c746fbd79 100644 --- a/addons/report_analytic_planning/report_analytic_planning_view.xml +++ b/addons/report_analytic_planning/report_analytic_planning_view.xml @@ -217,7 +217,7 @@ tree,form - + diff --git a/addons/report_timesheet/report_timesheet_view.xml b/addons/report_timesheet/report_timesheet_view.xml index ed9c0666c48..087dda92817 100644 --- a/addons/report_timesheet/report_timesheet_view.xml +++ b/addons/report_timesheet/report_timesheet_view.xml @@ -369,6 +369,13 @@ tree,form + + + + [('parent_id','=',False),('scrum','=',1)] - + Edit Projects From ff2834cf5452b578306180d8d88f7b3f4ab830bd Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Wed, 3 Feb 2010 17:28:03 +0530 Subject: [PATCH 04/24] [Fix] crm: changed the field tinycrm and set the object name bzr revid: sbh@tinyerp.com-20100203115803-mjcmnro35uawh340 --- addons/crm/wizard/wizard_crm_new_send_email.py | 3 ++- addons/crm/wizard/wizard_crm_send_email.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/crm/wizard/wizard_crm_new_send_email.py b/addons/crm/wizard/wizard_crm_new_send_email.py index 836edf0ba0b..660830bbf03 100644 --- a/addons/crm/wizard/wizard_crm_new_send_email.py +++ b/addons/crm/wizard/wizard_crm_new_send_email.py @@ -93,7 +93,8 @@ def _mass_mail_send(self, cr, uid, data, context): case_pool.format_body(body), attach=attach, reply_to=case.section_id.reply_to, - tinycrm=str(case.id) + + openobject_id=str(case.id) ) if flag: if data['form']['state'] == 'unchanged': diff --git a/addons/crm/wizard/wizard_crm_send_email.py b/addons/crm/wizard/wizard_crm_send_email.py index d5a4be358ff..181ff2926c6 100644 --- a/addons/crm/wizard/wizard_crm_send_email.py +++ b/addons/crm/wizard/wizard_crm_send_email.py @@ -51,7 +51,7 @@ email_send_fields = { # this sends an email to ALL the addresses of the selected partners. def _mass_mail_send(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) - case_pool=pool.get('crm.case') + case_pool=pool.get(data['model']) hist_obj = pool.get('crm.case.history').browse(cr,uid,data['ids'])[0] case = hist_obj.log_id.case_id @@ -71,7 +71,7 @@ def _mass_mail_send(self, cr, uid, data, context): data['form']['subject'], case_pool.format_body(body), reply_to=case.section_id.reply_to, - tinycrm=str(case.id) + openobject_id=str(case.id) ) return {} From 5a4bfb89ef2a0a6da1cd57f3cbd18bcafd7bd4c4 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 3 Feb 2010 17:30:51 +0530 Subject: [PATCH 05/24] [CHANGE]: organised imports bzr revid: mga@tinyerp.com-20100203120051-edrk1ho6ka019ftb --- addons/crm/crm.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 32035d06973..6ed5be068f0 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -22,14 +22,14 @@ import time import re import os - -import mx.DateTime import base64 +import tools +import mx.DateTime from tools.translate import _ - -import tools -from osv import fields,osv,orm +from osv import fields +from osv import osv +from osv import orm from osv.orm import except_orm MAX_LEVEL = 15 From 7dc05435ff40cd9d48d66646c63715d2c1283add Mon Sep 17 00:00:00 2001 From: "nch@tinyerp.com" <> Date: Wed, 3 Feb 2010 17:48:35 +0530 Subject: [PATCH 06/24] [FIX]:minor bug related to groupby bzr revid: nch@tinyerp.com-20100203121835-abth6i33yy6lftxi --- bin/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 9975cf1e5a3..d6ae570ef09 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1836,7 +1836,7 @@ class orm(orm_template): if fget.has_key(groupby): if fget[groupby]['type'] == 'many2one': d[groupby] = d[groupby] and d[groupby][1] or '' - if fget[groupby]['type'] in ('date','datetime'): + if d[groupby] and fget[groupby]['type'] in ('date','datetime'): today = datetime.date.today() if d[groupby][:10] == str(today): d[groupby] = 'Today' From b4d109af3101da71fe236d37284ef658d960ca01 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Wed, 3 Feb 2010 17:52:44 +0530 Subject: [PATCH 07/24] [IMP] crm: lead and opportunity form bzr revid: hmo@tinyerp.com-20100203122244-5p46alko2qwnmx87 --- addons/crm/crm_lead.py | 5 ++- addons/crm/crm_lead_view.xml | 61 ++++++++++++++--------------- addons/crm/crm_opportunity.py | 1 + addons/crm/crm_opportunity_view.xml | 60 ++++++++++++++++------------ 4 files changed, 69 insertions(+), 58 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 04a5a09da3d..cb97f8b4c6b 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -33,10 +33,11 @@ class crm_lead(osv.osv): _order = "id desc" _inherit = 'crm.case' _columns = { + 'name': fields.char('Lead Subject', size=64), 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"), 'type_id': fields.many2one('crm.case.resource.type', 'Lead Type Name', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]"), - 'partner_name': fields.char("Employee's Name", size=64), - 'partner_name2': fields.char('Employee Email', size=64), + 'partner_name': fields.char("Lead Name", size=64), + 'partner_name2': fields.char('Email', size=64), 'partner_phone': fields.char('Phone', size=32), 'partner_mobile': fields.char('Mobile', size=32), 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 2c5024ebd0f..f16402e5bd8 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -26,33 +26,20 @@ form
- - - - -