From bf266e764a926d3e47149cb6d47886525317f511 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Mon, 26 Apr 2010 12:08:12 +0530
Subject: [PATCH 001/148] [IMP]: Improve SQL view report for crm.lead.
bzr revid: rch_open_erp-20100426063812-6e8ldx12o32cdosy
---
addons/crm/report/crm_claim_report.py | 2 +-
addons/crm/report/crm_lead_report.py | 12 ++++++++++++
addons/crm/report/crm_lead_report_view.xml | 19 +++++++++++++++++++
addons/crm/report/crm_report_view.xml | 7 ++++---
4 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/addons/crm/report/crm_claim_report.py b/addons/crm/report/crm_claim_report.py
index 4148a834810..70d6be8d616 100644
--- a/addons/crm/report/crm_claim_report.py
+++ b/addons/crm/report/crm_claim_report.py
@@ -82,7 +82,7 @@ class crm_claim_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), \
c.state, c.user_id,c.section_id, c.stage_id,\
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
- ,c.priority,c.type_id,c.som
+ ,c.priority,c.type_id
)""")
crm_claim_report()
diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py
index d400700c0b5..92aeb7f28ec 100644
--- a/addons/crm/report/crm_lead_report.py
+++ b/addons/crm/report/crm_lead_report.py
@@ -21,6 +21,7 @@
from osv import fields,osv
import tools
+import crm_report
AVAILABLE_STATES = [
('draft','Draft'),
@@ -47,6 +48,12 @@ class crm_lead_report(osv.osv):
('object_id.model', '=', 'crm.lead')]", readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
+ 'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', \
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.lead')]"),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'date_open': fields.datetime('Opened', readonly=True),
}
def init(self, cr):
@@ -74,6 +81,10 @@ class crm_lead_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
+ c.priority as priority,
+ c.type_id as type_id,
+ c.date_closed as date_closed,
+ c.date_open as date_open,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -81,6 +92,7 @@ class crm_lead_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id,c.stage_id,categ_id,c.partner_id,c.company_id
,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
+ ,c.priority,c.type_id,c.date_closed,c.date_open
)""")
crm_lead_report()
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index d6502c190d9..6ef0d90ac97 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -22,6 +22,10 @@
+
+
+
+
@@ -70,6 +74,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/report/crm_report_view.xml b/addons/crm/report/crm_report_view.xml
index 97fa4feb6f1..b4e18793af4 100644
--- a/addons/crm/report/crm_report_view.xml
+++ b/addons/crm/report/crm_report_view.xml
@@ -106,9 +106,10 @@
help="My company"/>
-
-
-
+
+
+
+
From b8947954bf8ab4e410272937621815f73b1cdd98 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Mon, 26 Apr 2010 12:56:32 +0530
Subject: [PATCH 002/148] [IMP]: Improve SQL view for crm fundraising.
bzr revid: rch_open_erp-20100426072632-wcny8y4x5ud18y4t
---
addons/crm/report/crm_fundraising_report.py | 8 ++++++--
addons/crm/report/crm_fundraising_report_view.xml | 11 +++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/addons/crm/report/crm_fundraising_report.py b/addons/crm/report/crm_fundraising_report.py
index af867ea0008..2b3fbcb4c7a 100644
--- a/addons/crm/report/crm_fundraising_report.py
+++ b/addons/crm/report/crm_fundraising_report.py
@@ -21,7 +21,7 @@
from osv import fields,osv
import tools
-
+import crm_report
class crm_fundraising_report(osv.osv):
"""CRM Fundraising Report"""
@@ -41,6 +41,8 @@ class crm_fundraising_report(osv.osv):
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'partner_id': fields.many2one('res.partner', 'Partner'),
'company_id': fields.many2one('res.company', 'Company'),
+ 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
+ 'date_closed': fields.datetime('Closed', readonly=True)
}
def init(self, cr):
@@ -67,6 +69,8 @@ class crm_fundraising_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
+ c.priority as priority,
+ c.date_closed as date_closed,
date_trunc('day',c.create_date) as create_date,
sum(planned_revenue) as amount_revenue,
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
@@ -76,7 +80,7 @@ class crm_fundraising_report(osv.osv):
crm_fundraising c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id,c.categ_id,c.partner_id,c.company_id,
- c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
+ c.create_date,to_char(c.create_date, 'YYYY-MM-DD'),c.priority,c.date_closed
)""")
crm_fundraising_report()
diff --git a/addons/crm/report/crm_fundraising_report_view.xml b/addons/crm/report/crm_fundraising_report_view.xml
index e1c32726b4f..1d97b868a34 100644
--- a/addons/crm/report/crm_fundraising_report_view.xml
+++ b/addons/crm/report/crm_fundraising_report_view.xml
@@ -24,6 +24,8 @@
+
+
@@ -73,8 +75,17 @@
+
+
+
+
+
+
From c70951059ee26059ace2a45e88855d5a56bff2b9 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Mon, 26 Apr 2010 13:55:43 +0530
Subject: [PATCH 003/148] [IMP]:mrp:Improved SQL report.(Production).
bzr revid: apa@tinyerp.com-20100426082543-0yk10z2xhx05rj1t
---
addons/mrp/report/mrp_production_order.py | 20 ++--
.../mrp/report/mrp_production_order_view.xml | 91 ++++++++++++-------
2 files changed, 71 insertions(+), 40 deletions(-)
diff --git a/addons/mrp/report/mrp_production_order.py b/addons/mrp/report/mrp_production_order.py
index 7f48b111d43..96910e205d7 100644
--- a/addons/mrp/report/mrp_production_order.py
+++ b/addons/mrp/report/mrp_production_order.py
@@ -27,12 +27,14 @@ class mrp_production_order(osv.osv):
_description = "Production Order Report"
_auto = False
_columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
+ 'year': fields.char('Year',size=64,readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
+ 'day': fields.char('Day',size=64,readonly=True),
'origin': fields.char('Source Document', size=64),
'nbr': fields.integer('# of Orders', readonly=True),
- 'product_id': fields.many2one('product.product', 'Product', readonly=True, domain=[('type','<>','service')]),
+ 'date': fields.date('Date', readonly=True),
+ 'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty': fields.float('Product Qty', readonly=True),
'state': fields.selection([('draft','Draft'),
('picking_except', 'Picking Exception'),
@@ -43,13 +45,13 @@ class mrp_production_order(osv.osv):
('done','Done')],
'State', readonly=True),
'date_planned':fields.date('Scheduled Date'),
- 'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', required=True),
+ 'location_src_id': fields.many2one('stock.location', 'Raw Materials Location', readonly=True),
'date_start': fields.datetime('Start Date',readonly=True),
'date_finnished': fields.datetime('End Date',readonly=True),
- 'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', required=True),
+ 'location_dest_id': fields.many2one('stock.location', 'Finished Products Location', readonly=True),
'company_id': fields.many2one('res.company','Company',readonly=True),
- 'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)],readonly=True),
- 'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null',readonly=True),
+ 'bom_id': fields.many2one('mrp.bom', 'Bill of Material',readonly=True),
+ 'routing_id': fields.many2one('mrp.routing', string='Routing',readonly=True),
'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True),
'priority': fields.selection([('0','Not urgent'),
('1','Normal'),
@@ -65,8 +67,10 @@ class mrp_production_order(osv.osv):
create or replace view mrp_production_order as (
select
min(l.id) as id,
- to_char(s.create_date, 'YYYY') as name,
+ to_date(to_char(s.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY') as date,
+ to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
+ to_char(s.create_date, 'YYYY-MM-DD') as day,
l.product_id as product_id,
sum(l.product_qty * u.factor) as product_qty,
s.company_id as company_id,
@@ -90,6 +94,8 @@ class mrp_production_order(osv.osv):
group by
to_char(s.create_date, 'YYYY'),
to_char(s.create_date, 'MM'),
+ to_char(s.create_date, 'YYYY-MM-DD'),
+ to_date(to_char(s.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY'),
l.product_id,
l.product_uom,
s.bom_id,
diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml
index a97abe846de..04188f43752 100644
--- a/addons/mrp/report/mrp_production_order_view.xml
+++ b/addons/mrp/report/mrp_production_order_view.xml
@@ -11,18 +11,21 @@
tree
-
-
-
-
+
+
+
+
-
+
-
+
+
+
+
@@ -35,8 +38,9 @@
graph
-
+
+
@@ -48,48 +52,70 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
+
-
+
@@ -101,8 +127,7 @@
tree,graph
- {'search_default_Product': 1}
-
+ {'search_default_month':1,'search_default_Product':1,'group_by_no_leaf':1,'group_by':[]}
From 68ac3e6fa806ea369d0118425f6e53e0c83df36c Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Mon, 26 Apr 2010 15:31:40 +0530
Subject: [PATCH 004/148] [IMP]: Improve SQL view report of claim,lead and
fundraising.
bzr revid: rch_open_erp-20100426100140-n0ppf5ddggbungbs
---
addons/crm/report/crm_claim_report.py | 8 +++++++-
addons/crm/report/crm_claim_report_view.xml | 13 +++++++++++++
addons/crm/report/crm_fundraising_report.py | 7 ++++++-
addons/crm/report/crm_fundraising_report_view.xml | 12 +++++++++++-
4 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/addons/crm/report/crm_claim_report.py b/addons/crm/report/crm_claim_report.py
index 70d6be8d616..74b95864759 100644
--- a/addons/crm/report/crm_claim_report.py
+++ b/addons/crm/report/crm_claim_report.py
@@ -46,6 +46,9 @@ class crm_claim_report(osv.osv):
'type_id': fields.many2one('crm.case.resource.type', 'Claim Type',\
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]"),
+ 'som': fields.many2one('res.partner.som', 'State of Mind')
}
def init(self, cr):
@@ -75,6 +78,9 @@ class crm_claim_report(osv.osv):
0.0 as perc_cancel,
c.priority as priority,
c.type_id as type_id,
+ c.date_closed as date_closed,
+ c.canal_id as canal_id,
+ c.som as som,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -82,7 +88,7 @@ class crm_claim_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), \
c.state, c.user_id,c.section_id, c.stage_id,\
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
- ,c.priority,c.type_id
+ ,c.priority,c.type_id,c.date_closed,c.canal_id,c.som
)""")
crm_claim_report()
diff --git a/addons/crm/report/crm_claim_report_view.xml b/addons/crm/report/crm_claim_report_view.xml
index 647a0125179..74ebbd56d0b 100644
--- a/addons/crm/report/crm_claim_report_view.xml
+++ b/addons/crm/report/crm_claim_report_view.xml
@@ -24,6 +24,9 @@
+
+
+
@@ -78,6 +81,11 @@
+
+
+
+
+
+
+
+
diff --git a/addons/crm/report/crm_fundraising_report.py b/addons/crm/report/crm_fundraising_report.py
index 2b3fbcb4c7a..5765b7367b0 100644
--- a/addons/crm/report/crm_fundraising_report.py
+++ b/addons/crm/report/crm_fundraising_report.py
@@ -42,7 +42,9 @@ class crm_fundraising_report(osv.osv):
'partner_id': fields.many2one('res.partner', 'Partner'),
'company_id': fields.many2one('res.company', 'Company'),
'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
- 'date_closed': fields.datetime('Closed', readonly=True)
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]"),
+ 'som': fields.many2one('res.partner.som', 'State of Mind')
}
def init(self, cr):
@@ -71,6 +73,8 @@ class crm_fundraising_report(osv.osv):
0.0 as perc_cancel,
c.priority as priority,
c.date_closed as date_closed,
+ c.canal_id as canal_id,
+ c.som as som,
date_trunc('day',c.create_date) as create_date,
sum(planned_revenue) as amount_revenue,
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
@@ -81,6 +85,7 @@ class crm_fundraising_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id,c.categ_id,c.partner_id,c.company_id,
c.create_date,to_char(c.create_date, 'YYYY-MM-DD'),c.priority,c.date_closed
+ ,c.canal_id,c.som
)""")
crm_fundraising_report()
diff --git a/addons/crm/report/crm_fundraising_report_view.xml b/addons/crm/report/crm_fundraising_report_view.xml
index 1d97b868a34..7236df4a8b4 100644
--- a/addons/crm/report/crm_fundraising_report_view.xml
+++ b/addons/crm/report/crm_fundraising_report_view.xml
@@ -26,6 +26,8 @@
+
+
@@ -77,7 +79,10 @@
-
+
+
+
+
+
+
+
From 2eeb2a1f7981a68aec561ade79c12e6ae3e924fd Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Mon, 26 Apr 2010 16:59:00 +0530
Subject: [PATCH 005/148] [IMP]: Improve SQL view report for crm oppertunities.
Add fields in Extended option in search view.
bzr revid: rch_open_erp-20100426112900-cfx18360ey1p6zqo
---
addons/crm/report/crm_opportunity_report.py | 12 +++++++++++-
addons/crm/report/crm_opportunity_report_view.xml | 13 ++++++++++++-
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/addons/crm/report/crm_opportunity_report.py b/addons/crm/report/crm_opportunity_report.py
index a3af4be8b7c..3e11307ee36 100644
--- a/addons/crm/report/crm_opportunity_report.py
+++ b/addons/crm/report/crm_opportunity_report.py
@@ -21,6 +21,7 @@
from osv import fields,osv
import tools
+import crm_report
AVAILABLE_STATES = [
('draft','Draft'),
@@ -50,6 +51,9 @@ class crm_opportunity_report(osv.osv):
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'date_open': fields.datetime('Opened', readonly=True),
+ 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority')
}
def init(self, cr):
@@ -76,6 +80,9 @@ class crm_opportunity_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
+ c.date_closed as date_closed,
+ c.date_open as date_open,
+ c.priority as priority,
date_trunc('day',c.create_date) as create_date,
sum(planned_revenue) as amount_revenue,
sum((planned_revenue*probability)/100.0)::decimal(16,2) as amount_revenue_prob,
@@ -94,7 +101,10 @@ class crm_opportunity_report(osv.osv):
c.categ_id,
c.partner_id,
company_id,
- create_date
+ create_date,
+ c.date_closed,
+ c.date_open,
+ c.priority
)""")
crm_opportunity_report()
diff --git a/addons/crm/report/crm_opportunity_report_view.xml b/addons/crm/report/crm_opportunity_report_view.xml
index 29a66b838f0..3daa72c717c 100644
--- a/addons/crm/report/crm_opportunity_report_view.xml
+++ b/addons/crm/report/crm_opportunity_report_view.xml
@@ -25,6 +25,9 @@
+
+
+
@@ -75,7 +78,13 @@
+
+
+
+
+
+
-
+
+
From 97ae945f3a8b81ef5387e8768cf67148c7195f10 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Mon, 26 Apr 2010 19:14:14 +0530
Subject: [PATCH 006/148] [IMP]: Improve SQL view report for crm phonecalls.
Add fields in Extended Option of search view.
bzr revid: rch_open_erp-20100426134414-44oq5wfkhs8y7jc1
---
addons/crm/report/crm_phonecall_report.py | 10 +++++++++
.../crm/report/crm_phonecall_report_view.xml | 21 +++++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/addons/crm/report/crm_phonecall_report.py b/addons/crm/report/crm_phonecall_report.py
index 40b34779aba..c5109602eb3 100644
--- a/addons/crm/report/crm_phonecall_report.py
+++ b/addons/crm/report/crm_phonecall_report.py
@@ -21,6 +21,7 @@
from osv import fields,osv
import tools
+import crm_report
class crm_phonecall_report(osv.osv):
""" Phone calls by user and section """
@@ -37,6 +38,10 @@ class crm_phonecall_report(osv.osv):
('object_id.model', '=', 'crm.phonecall')]"),
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'opportunity_id': fields.many2one ('crm.opportunity', 'Opportunity'),
+ 'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.phonecall')]")
}
def init(self, cr):
@@ -63,6 +68,10 @@ class crm_phonecall_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
+ c.priority as priority,
+ c.date_closed as date_closed,
+ c.opportunity_id as opportunity_id,
+ c.canal_id as canal_id,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -70,6 +79,7 @@ class crm_phonecall_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id, c.categ_id,c.partner_id,c.company_id
,to_char(c.create_date, 'YYYY-MM-DD'),c.create_date
+ ,c.priority,c.date_closed,opportunity_id,canal_id
)""")
crm_phonecall_report()
diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml
index 698a9b88fa3..5ad0a63bdd8 100644
--- a/addons/crm/report/crm_phonecall_report_view.xml
+++ b/addons/crm/report/crm_phonecall_report_view.xml
@@ -21,6 +21,10 @@
+
+
+
+
@@ -70,8 +74,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
From bb50f760f7357ae2ca1546969ebd30ac0c09a0e0 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Tue, 27 Apr 2010 15:13:43 +0530
Subject: [PATCH 007/148] [IMP]:hr_holidays:Improved SQL report.(Leaves).
bzr revid: apa@tinyerp.com-20100427094343-mbfa6xv6mgri5xqj
---
.../hr_holidays/report/hr_holidays_report.py | 17 ++-
.../report/hr_holidays_report_view.xml | 109 +++++++++++-------
2 files changed, 81 insertions(+), 45 deletions(-)
diff --git a/addons/hr_holidays/report/hr_holidays_report.py b/addons/hr_holidays/report/hr_holidays_report.py
index 435eee71ea5..c060521af0d 100644
--- a/addons/hr_holidays/report/hr_holidays_report.py
+++ b/addons/hr_holidays/report/hr_holidays_report.py
@@ -30,14 +30,17 @@ class hr_holidays_report(osv.osv):
_columns = {
'date': fields.datetime('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
+ 'day': fields.char('Day', size=15, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'date_from' : fields.datetime('Start Date', readonly=True),
'date_to' : fields.datetime('End Date', readonly=True),
- 'number_of_days_temp': fields.float('Number of Days', readonly=True),
+ 'number_of_days_temp': fields.float('#Days', readonly=True),
'employee_id' : fields.many2one('hr.employee', "Employee's Name",readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
+ 'holiday_status_id' : fields.many2one("hr.holidays.status", "Leave Type",readonly=True),
+ 'department_id':fields.many2one('hr.department','Department',readonly=True),
'state': fields.selection([('draft', 'Draft'),
('confirm', 'Waiting Validation'),
('refuse', 'Refused'),
@@ -52,21 +55,25 @@ class hr_holidays_report(osv.osv):
create or replace view hr_holidays_report as (
select
min(s.id) as id,
- date_trunc('seconds',s.create_date) as date,
+ date_trunc('day',s.create_date) as date,
date_trunc('day',s.date_from) as date_from,
date_trunc('day',s.date_to) as date_to,
- s.number_of_days_temp,
+ sum(s.number_of_days_temp) as number_of_days_temp,
s.employee_id,
s.user_id as user_id,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
+ to_char(s.create_date, 'YYYY-MM-DD') as day,
+ s.holiday_status_id,
+ s.department_id,
s.state
from
hr_holidays s
where type='remove'
group by
s.create_date,s.state,s.date_from,s.date_to,
- s.number_of_days_temp,s.employee_id,s.user_id
+ s.employee_id,s.user_id,s.holiday_status_id,
+ s.department_id
)
""")
hr_holidays_report()
@@ -98,7 +105,7 @@ class hr_holidays_remaining_leaves_user(osv.osv):
where
hrs.employee_id = hre.id and
hre.resource_id = rr.id and
- hhs.id = hrs.holiday_status_id
+ hhs.id = hrs.holiday_status_id
group by
rr.name,rr.user_id,hhs.name
)
diff --git a/addons/hr_holidays/report/hr_holidays_report_view.xml b/addons/hr_holidays/report/hr_holidays_report_view.xml
index e9e0e6aae36..c5f2a41afb7 100644
--- a/addons/hr_holidays/report/hr_holidays_report_view.xml
+++ b/addons/hr_holidays/report/hr_holidays_report_view.xml
@@ -7,14 +7,17 @@
tree
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
@@ -27,6 +30,7 @@
+
@@ -37,44 +41,69 @@
search
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
-
+
+
+
@@ -85,7 +114,7 @@
hr.holidays.report
form
tree,graph
- {'search_default_employee': 1}
+ {'search_default_month':1,'search_default_Employee':1,'group_by_no_leaf':1,'group_by':[]}
From 091e1c13c9fc901ffe3876e61cc88c95ff002e07 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Tue, 27 Apr 2010 15:44:34 +0530
Subject: [PATCH 008/148] [IMP]:hr_holidays:Improved SQL report.(Leaves).
bzr revid: apa@tinyerp.com-20100427101434-du3rqytyaiaheq55
---
addons/hr_holidays/report/hr_holidays_report_view.xml | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/addons/hr_holidays/report/hr_holidays_report_view.xml b/addons/hr_holidays/report/hr_holidays_report_view.xml
index c5f2a41afb7..8c8bc58204c 100644
--- a/addons/hr_holidays/report/hr_holidays_report_view.xml
+++ b/addons/hr_holidays/report/hr_holidays_report_view.xml
@@ -9,6 +9,7 @@
+
@@ -68,7 +69,8 @@
domain="[('state','=','validate')]"
help = "Pending Leaves"/>
-
+
+
@@ -95,9 +97,10 @@
-
-
+
+
+
@@ -114,7 +117,7 @@
hr.holidays.report
form
tree,graph
- {'search_default_month':1,'search_default_Employee':1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
From cfb21e74972a0174dfe552449a0a6e813be6328a Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Tue, 27 Apr 2010 15:53:03 +0530
Subject: [PATCH 009/148] [IMP]:hr_holidays:Improved SQL report.(Leaves).
bzr revid: apa@tinyerp.com-20100427102303-98gutwonfqyd4lbu
---
addons/hr_holidays/report/available_holidays.py | 2 +-
addons/hr_holidays/report/hr_holidays_report.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/hr_holidays/report/available_holidays.py b/addons/hr_holidays/report/available_holidays.py
index 4a1972f1f7d..fd9d77a62ff 100644
--- a/addons/hr_holidays/report/available_holidays.py
+++ b/addons/hr_holidays/report/available_holidays.py
@@ -25,7 +25,7 @@ class available_holidays_report(osv.osv):
_name = "available.holidays.report"
_auto = False
_columns = {
- 'date': fields.datetime('Date', readonly=True),
+ 'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
diff --git a/addons/hr_holidays/report/hr_holidays_report.py b/addons/hr_holidays/report/hr_holidays_report.py
index c060521af0d..b44fe041e25 100644
--- a/addons/hr_holidays/report/hr_holidays_report.py
+++ b/addons/hr_holidays/report/hr_holidays_report.py
@@ -28,14 +28,14 @@ class hr_holidays_report(osv.osv):
_auto = False
_rec_name = 'date'
_columns = {
- 'date': fields.datetime('Date', readonly=True),
+ 'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=15, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
- 'date_from' : fields.datetime('Start Date', readonly=True),
- 'date_to' : fields.datetime('End Date', readonly=True),
+ 'date_from' : fields.date('Start Date', readonly=True),
+ 'date_to' : fields.date('End Date', readonly=True),
'number_of_days_temp': fields.float('#Days', readonly=True),
'employee_id' : fields.many2one('hr.employee', "Employee's Name",readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
From efc69230d36501faf03f9136cf9be40e33ad5941 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Tue, 27 Apr 2010 16:19:27 +0530
Subject: [PATCH 010/148] [IMP]:hr_holidays:Improved SQL report.(Available
Holidays).
bzr revid: apa@tinyerp.com-20100427104927-1683smsdb4g9xuvv
---
.../hr_holidays/report/available_holidays.py | 7 +-
.../report/available_holidays_view.xml | 73 ++++++++++---------
2 files changed, 44 insertions(+), 36 deletions(-)
diff --git a/addons/hr_holidays/report/available_holidays.py b/addons/hr_holidays/report/available_holidays.py
index fd9d77a62ff..5499a914f6c 100644
--- a/addons/hr_holidays/report/available_holidays.py
+++ b/addons/hr_holidays/report/available_holidays.py
@@ -27,6 +27,7 @@ class available_holidays_report(osv.osv):
_columns = {
'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
+ 'day': fields.char('Day', size=15, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
@@ -35,6 +36,7 @@ class available_holidays_report(osv.osv):
'max_leave': fields.float('Allocated Leaves', readonly=True),
'taken_leaves': fields.float('Taken Leaves', readonly=True),
'remaining_leave': fields.float('Remaining Leaves',readonly=True),
+ 'department_id':fields.many2one('hr.department','Department',readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
}
def init(self, cr):
@@ -46,8 +48,10 @@ class available_holidays_report(osv.osv):
date_trunc('day',h.create_date) as date,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
+ to_char(s.create_date, 'YYYY-MM-DD') as day,
h.employee_id as employee_id,
h.user_id as user_id,
+ h.department_id,
h.state as state,
h.holiday_status_id as holiday_status_id,
sum(number_of_days) as remaining_leave,
@@ -68,7 +72,8 @@ class available_holidays_report(osv.osv):
and s.active <> 'f'
group by h.holiday_status_id, h.employee_id,
date_trunc('day',h.create_date),to_char(s.create_date, 'YYYY'),
- to_char(s.create_date, 'MM'),h.user_id,h.state
+ to_char(s.create_date, 'MM'),to_char(s.create_date, 'YYYY-MM-DD'),h.user_id,
+ h.state,h.department_id
)""")
available_holidays_report()
diff --git a/addons/hr_holidays/report/available_holidays_view.xml b/addons/hr_holidays/report/available_holidays_view.xml
index 18ea7d58d45..cb610d4214a 100644
--- a/addons/hr_holidays/report/available_holidays_view.xml
+++ b/addons/hr_holidays/report/available_holidays_view.xml
@@ -10,40 +10,32 @@
tree
-
-
-
-
+
+
+
+
+
-
+
+
-
- available.holidays.report.form
- available.holidays.report
- form
-
-
-
-
-
-
-
-
available.holidays.report.graph
available.holidays.report
graph
-
+
+
+
-
+
@@ -55,32 +47,42 @@
-
-
+
+
+
-
+
-
+
+
+
+
+
+
+
-
+
-
-
+
+
+
@@ -93,6 +95,7 @@
available.holidays.report
form
tree,graph
+ {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
From c445b5b47185e3039456b784a9ea11500ddcd289 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Tue, 27 Apr 2010 18:00:23 +0530
Subject: [PATCH 011/148] [Add]: Add SQL view report for Accounts.
bzr revid: rch_open_erp-20100427123023-npkej0o1ed0viscq
---
addons/account/__openerp__.py | 1 +
addons/account/report/__init__.py | 2 +-
.../account/report/account_account_report.py | 77 +++++++++++++++++
.../report/account_account_report_view.xml | 83 +++++++++++++++++++
addons/account/report/account_report_view.xml | 8 +-
5 files changed, 166 insertions(+), 5 deletions(-)
create mode 100644 addons/account/report/account_account_report.py
create mode 100644 addons/account/report/account_account_report_view.xml
diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py
index abd3d1f459d..e73b3885089 100644
--- a/addons/account/__openerp__.py
+++ b/addons/account/__openerp__.py
@@ -100,6 +100,7 @@ module named account_voucherss
'report/account_invoice_report_view.xml',
'report/account_report_view.xml',
'report/account_analytic_report_view.xml',
+ 'report/account_account_report_view.xml'
],
'demo_xml': [
#'demo/price_accuracy00.yml',
diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py
index 09ff866d1a8..959a76013f9 100644
--- a/addons/account/report/__init__.py
+++ b/addons/account/report/__init__.py
@@ -37,6 +37,6 @@ import compare_account_balance
import account_invoice_report
import account_report
import account_analytic_report
-
+import account_account_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/report/account_account_report.py b/addons/account/report/account_account_report.py
new file mode 100644
index 00000000000..a872a7173e7
--- /dev/null
+++ b/addons/account/report/account_account_report.py
@@ -0,0 +1,77 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import tools
+from osv import fields,osv
+
+class account_account_report(osv.osv):
+ _name = "account.account.report"
+ _description = "Account Report"
+ _auto = False
+ _columns = {
+ 'name': fields.char('Name', size=128, readonly=True),
+ 'code': fields.char('Code', size=64, readonly=True),
+ 'type': fields.selection([
+ ('receivable', 'Receivable'),
+ ('payable', 'Payable'),
+ ('view', 'View'),
+ ('consolidation', 'Consolidation'),
+ ('other', 'Others'),
+ ('closed', 'Closed'),
+ ], 'Internal Type', readonly=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'currency_mode': fields.selection([('current', 'At Date'), ('average', 'Average Rate')], 'Outgoing Currencies Rate',readonly=True),
+ 'user_type': fields.many2one('account.account.type', 'Account Type',readonly=True),
+ 'credit': fields.float('Credit', readonly=True),
+ 'debit': fields.float('Debit', readonly=True),
+ 'balance': fields.float('Balance', readonly=True)
+ }
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'account_account_report')
+ cr.execute("""
+ create or replace view account_account_report as (
+ select
+ min(a.id) as id,
+ a.name,
+ a.code,
+ a.type as type,
+ a.company_id as company_id,
+ a.currency_mode as currency_mode,
+ a.user_type as user_type,
+ sum(m.credit) as credit,
+ sum(m.debit) as debit,
+ (sum(m.credit)-sum(m.debit)) as balance
+ from
+ account_account as a
+ left join
+ account_move_line as m
+ on m.account_id=a.id
+ group by
+ a.name,
+ a.code,
+ a.type,
+ a.company_id,
+ a.currency_mode,
+ a.user_type,
+ m.account_id
+ )
+ """)
+account_account_report()
diff --git a/addons/account/report/account_account_report_view.xml b/addons/account/report/account_account_report_view.xml
new file mode 100644
index 00000000000..a2b4903c8d9
--- /dev/null
+++ b/addons/account/report/account_account_report_view.xml
@@ -0,0 +1,83 @@
+
+
+
+
+ account.account.report.tree
+ account.account.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.account.report.graph
+ account.account.report
+ graph
+
+
+
+
+
+
+
+
+
+
+
+ account.account.report.search
+ account.account.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Accounts
+ account.account.report
+ form
+ tree,graph
+ {"search_default_Company":1,"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}
+
+
+
+
+
+
+
diff --git a/addons/account/report/account_report_view.xml b/addons/account/report/account_report_view.xml
index f0f67b477e3..9b1688730aa 100644
--- a/addons/account/report/account_report_view.xml
+++ b/addons/account/report/account_report_view.xml
@@ -47,7 +47,7 @@
form
tree,graph
-
+
@@ -116,7 +116,7 @@
-
+
report.account.sales.tree
@@ -169,7 +169,7 @@
graph,tree
-
+
@@ -237,7 +237,7 @@
graph,tree
-
+
From 33ee081b63216433f93645a132348f22a0c2315e Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Wed, 28 Apr 2010 10:47:19 +0530
Subject: [PATCH 012/148] [IMP]: Improve SQL view report for account.
bzr revid: rch_open_erp-20100428051719-oyb01eo736xz1jot
---
.../account/report/account_account_report_view.xml | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/addons/account/report/account_account_report_view.xml b/addons/account/report/account_account_report_view.xml
index a2b4903c8d9..390fb144b0a 100644
--- a/addons/account/report/account_account_report_view.xml
+++ b/addons/account/report/account_account_report_view.xml
@@ -7,7 +7,7 @@
tree
-
+
@@ -48,8 +48,8 @@
string="Average Rate"
domain="[('currency_mode','=','average')]"/>
+
-
@@ -59,8 +59,11 @@
-
-
+
+
+
+
+
@@ -73,7 +76,7 @@
account.account.report
form
tree,graph
- {"search_default_Company":1,"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}
+ {"search_default_Account":1,"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}
From 2fddb283e50eaf9febd7147d549b196dbb24b9a3 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Wed, 28 Apr 2010 11:57:43 +0530
Subject: [PATCH 013/148] [IMP]:hr_timesheet_sheet:Improved SQL
report.(Timesheet).
bzr revid: apa@tinyerp.com-20100428062743-cwkcunmyn2gjojdi
---
.../report/hr_timesheet_invoice_report_view.xml | 2 +-
addons/hr_timesheet_sheet/report/timesheet_report.py | 11 ++++-------
.../report/timesheet_report_view.xml | 12 +++++-------
3 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
index 4de60162d1a..d61203df1ef 100644
--- a/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
+++ b/addons/hr_timesheet_invoice/report/hr_timesheet_invoice_report_view.xml
@@ -103,7 +103,7 @@
{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
-
+
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report.py b/addons/hr_timesheet_sheet/report/timesheet_report.py
index ee016df56d7..7b79470a9b7 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report.py
+++ b/addons/hr_timesheet_sheet/report/timesheet_report.py
@@ -45,9 +45,8 @@ class timesheet_report(osv.osv):
('draft','Draft'),
('confirm','Confirmed'),
('done','Done')], 'State', readonly=True),
- 'total_att': fields.float('Total Timesheet',readonly=True),
- 'total_ts': fields.float('Total Attendance',readonly=True),
- 'total_diff': fields.float('Difference', readonly=True),
+ 'quantity': fields.float('#Quantity',readonly=True),
+ 'cost': fields.float('#Cost',readonly=True),
}
def init(self, cr):
@@ -64,9 +63,8 @@ class timesheet_report(osv.osv):
to_char(htss.date_current,'MM') as month,
to_char(htss.date_current, 'YYYY-MM-DD') as day,
count(*) as nbr,
- sum(day.total_attendance) as total_att,
- sum(day.total_timesheet) as total_ts,
- sum(day.total_difference) as total_diff,
+ sum(aal.unit_amount) as quantity,
+ sum(aal.amount) as cost,
aal.account_id,
htss.user_id,
htss.company_id,
@@ -75,7 +73,6 @@ class timesheet_report(osv.osv):
from account_analytic_line as aal
left join hr_analytic_timesheet as hat ON (hat.line_id=aal.id)
left join hr_timesheet_sheet_sheet as htss ON (hat.line_id=htss.id)
- left join hr_timesheet_sheet_sheet_day AS day ON (htss.id = day.sheet_id)
group by
to_char(htss.date_current,'YYYY'),
to_char(htss.date_current,'MM'),
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
index 976b2a6f8ea..2520d5054fb 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
+++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
@@ -7,10 +7,9 @@
graph
-
-
-
-
+
+
+
@@ -25,9 +24,8 @@
-
-
-
+
+
From f438daad1217c231fdb6a7526a963d0b38b723d5 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Wed, 28 Apr 2010 12:24:28 +0530
Subject: [PATCH 014/148] [IMP]: Improve SQL view report for crm lead by adding
fields. Also add #Accounts in account report.
bzr revid: rch_open_erp-20100428065428-svgm9aq7juqaalqa
---
.../account/report/account_account_report.py | 4 +++-
.../report/account_account_report_view.xml | 1 +
addons/crm/report/crm_lead_report.py | 9 ++++++++
addons/crm/report/crm_lead_report_view.xml | 23 +++++++++++++++++++
4 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/addons/account/report/account_account_report.py b/addons/account/report/account_account_report.py
index a872a7173e7..8a18c7d89f1 100644
--- a/addons/account/report/account_account_report.py
+++ b/addons/account/report/account_account_report.py
@@ -42,7 +42,8 @@ class account_account_report(osv.osv):
'user_type': fields.many2one('account.account.type', 'Account Type',readonly=True),
'credit': fields.float('Credit', readonly=True),
'debit': fields.float('Debit', readonly=True),
- 'balance': fields.float('Balance', readonly=True)
+ 'balance': fields.float('Balance', readonly=True),
+ 'nbr': fields.integer('#Accounts', readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_account_report')
@@ -50,6 +51,7 @@ class account_account_report(osv.osv):
create or replace view account_account_report as (
select
min(a.id) as id,
+ count(distinct a.id) as nbr,
a.name,
a.code,
a.type as type,
diff --git a/addons/account/report/account_account_report_view.xml b/addons/account/report/account_account_report_view.xml
index 390fb144b0a..7388beb05f9 100644
--- a/addons/account/report/account_account_report_view.xml
+++ b/addons/account/report/account_account_report_view.xml
@@ -12,6 +12,7 @@
+
diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py
index 92aeb7f28ec..fb30dd58182 100644
--- a/addons/crm/report/crm_lead_report.py
+++ b/addons/crm/report/crm_lead_report.py
@@ -54,6 +54,10 @@ class crm_lead_report(osv.osv):
('object_id.model', '=', 'crm.lead')]"),
'date_closed': fields.datetime('Closed', readonly=True),
'date_open': fields.datetime('Opened', readonly=True),
+ 'date_deadline': fields.date('Deadline', readonly=True),
+ 'opportunity_id': fields.many2one('crm.opportunity', 'Opportunity',readonly=True),
+ 'country_id': fields.many2one('res.country', 'Country' , readonly=True),
+ 'state_id': fields.many2one('res.country.state', 'State' , readonly=True)
}
def init(self, cr):
@@ -85,6 +89,10 @@ class crm_lead_report(osv.osv):
c.type_id as type_id,
c.date_closed as date_closed,
c.date_open as date_open,
+ c.opportunity_id as opportunity_id,
+ c.country_id as country_id,
+ c.state_id as state_id,
+ c.date_deadline as date_deadline,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -93,6 +101,7 @@ class crm_lead_report(osv.osv):
c.state, c.user_id,c.section_id,c.stage_id,categ_id,c.partner_id,c.company_id
,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
,c.priority,c.type_id,c.date_closed,c.date_open
+ ,c.opportunity_id,c.country_id,c.state_id,c.date_deadline
)""")
crm_lead_report()
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index 6ef0d90ac97..ab648d75ea2 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -26,6 +26,10 @@
+
+
+
+
@@ -78,7 +82,16 @@
+
+
+
+
+
+
+
+
+
@@ -96,6 +109,16 @@
context="{'group_by':'priority'}" />
+
+
+
+
+
+
From 335e59c2904587502c822df35d122356c7ad2554 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Wed, 28 Apr 2010 15:34:04 +0530
Subject: [PATCH 015/148] [IMP]: Improve SQL report for crm claim and crm
fundraising.
bzr revid: rch_open_erp-20100428100404-8rti5e8kzobayv16
---
addons/crm/report/crm_claim_report.py | 9 ++++++++-
addons/crm/report/crm_claim_report_view.xml | 15 ++++++++++++++-
addons/crm/report/crm_fundraising_report.py | 8 ++++++--
addons/crm/report/crm_fundraising_report_view.xml | 4 ++++
4 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/addons/crm/report/crm_claim_report.py b/addons/crm/report/crm_claim_report.py
index 74b95864759..ef769042ea8 100644
--- a/addons/crm/report/crm_claim_report.py
+++ b/addons/crm/report/crm_claim_report.py
@@ -48,7 +48,10 @@ class crm_claim_report(osv.osv):
('object_id.model', '=', 'crm.claim')]"),
'date_closed': fields.datetime('Closed', readonly=True),
'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]"),
- 'som': fields.many2one('res.partner.som', 'State of Mind')
+ 'som': fields.many2one('res.partner.som', 'State of Mind'),
+ 'claim_date': fields.datetime('Date Of Claim',readonly=True),
+ 'deadline_date': fields.datetime('Deadline ',readonly=True),
+ 'partner_address_id': fields.many2one('res.partner.address','Contact ',readonly=True),
}
def init(self, cr):
@@ -81,6 +84,9 @@ class crm_claim_report(osv.osv):
c.date_closed as date_closed,
c.canal_id as canal_id,
c.som as som,
+ c.create_date as claim_date,
+ c.date_deadline as deadline_date,
+ c.partner_address_id as partner_address_id,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -89,6 +95,7 @@ class crm_claim_report(osv.osv):
c.state, c.user_id,c.section_id, c.stage_id,\
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
,c.priority,c.type_id,c.date_closed,c.canal_id,c.som
+ ,c.create_date,c.date_deadline,c.partner_address_id
)""")
crm_claim_report()
diff --git a/addons/crm/report/crm_claim_report_view.xml b/addons/crm/report/crm_claim_report_view.xml
index 74ebbd56d0b..66c1c6ff930 100644
--- a/addons/crm/report/crm_claim_report_view.xml
+++ b/addons/crm/report/crm_claim_report_view.xml
@@ -27,6 +27,9 @@
+
+
+
@@ -81,11 +84,16 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/report/crm_fundraising_report.py b/addons/crm/report/crm_fundraising_report.py
index 5765b7367b0..9e1a1111253 100644
--- a/addons/crm/report/crm_fundraising_report.py
+++ b/addons/crm/report/crm_fundraising_report.py
@@ -44,7 +44,10 @@ class crm_fundraising_report(osv.osv):
'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
'date_closed': fields.datetime('Closed', readonly=True),
'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]"),
- 'som': fields.many2one('res.partner.som', 'State of Mind')
+ 'som': fields.many2one('res.partner.som', 'State of Mind'),
+ 'type_id': fields.many2one('crm.case.resource.type', 'Fundraising Type', \
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.fundraising')]"),
}
def init(self, cr):
@@ -75,6 +78,7 @@ class crm_fundraising_report(osv.osv):
c.date_closed as date_closed,
c.canal_id as canal_id,
c.som as som,
+ c.type_id as type_id,
date_trunc('day',c.create_date) as create_date,
sum(planned_revenue) as amount_revenue,
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
@@ -85,7 +89,7 @@ class crm_fundraising_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id,c.categ_id,c.partner_id,c.company_id,
c.create_date,to_char(c.create_date, 'YYYY-MM-DD'),c.priority,c.date_closed
- ,c.canal_id,c.som
+ ,c.canal_id,c.som,c.type_id
)""")
crm_fundraising_report()
diff --git a/addons/crm/report/crm_fundraising_report_view.xml b/addons/crm/report/crm_fundraising_report_view.xml
index 7236df4a8b4..95410010edf 100644
--- a/addons/crm/report/crm_fundraising_report_view.xml
+++ b/addons/crm/report/crm_fundraising_report_view.xml
@@ -28,6 +28,7 @@
+
@@ -81,6 +82,7 @@
+
@@ -95,6 +97,8 @@
context="{'group_by':'canal_id'}" />
+
From 1a3e8c3f79542b371506e86018926cc219c1f094 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Wed, 28 Apr 2010 17:57:46 +0530
Subject: [PATCH 016/148] [IMP]:mrp:Improved SQL report.(Production).
bzr revid: apa@tinyerp.com-20100428122746-1w3vuzwglgl22588
---
addons/mrp/report/mrp_production_order.py | 23 +++++++++++++++----
.../mrp/report/mrp_production_order_view.xml | 18 +++++++++++----
2 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/addons/mrp/report/mrp_production_order.py b/addons/mrp/report/mrp_production_order.py
index 96910e205d7..c5bc5020e20 100644
--- a/addons/mrp/report/mrp_production_order.py
+++ b/addons/mrp/report/mrp_production_order.py
@@ -33,6 +33,8 @@ class mrp_production_order(osv.osv):
'day': fields.char('Day',size=64,readonly=True),
'origin': fields.char('Source Document', size=64),
'nbr': fields.integer('# of Orders', readonly=True),
+ 'products_to_consumme': fields.integer('Products to Consumme', readonly=True),
+ 'consummed_products': fields.integer('Consummed Products', readonly=True),
'date': fields.date('Date', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty': fields.float('Product Qty', readonly=True),
@@ -53,6 +55,7 @@ class mrp_production_order(osv.osv):
'bom_id': fields.many2one('mrp.bom', 'Bill of Material',readonly=True),
'routing_id': fields.many2one('mrp.routing', string='Routing',readonly=True),
'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True),
+ 'product_uom': fields.many2one('product.uom', 'Product UOM', readonly=True),
'priority': fields.selection([('0','Not urgent'),
('1','Normal'),
('2','Urgent'),
@@ -72,9 +75,20 @@ class mrp_production_order(osv.osv):
to_char(s.create_date, 'MM') as month,
to_char(s.create_date, 'YYYY-MM-DD') as day,
l.product_id as product_id,
+ l.product_uom,
sum(l.product_qty * u.factor) as product_qty,
s.company_id as company_id,
count(*) as nbr,
+ (select count(ll.id) from mrp_production_move_ids as mv
+ left join stock_move as sm ON (sm.id=mv.move_id)
+ left join mrp_production_product_line as ll ON (ll.id=mv.production_id)
+ where sm.state not in ('done','cancel') and ll.id=l.id
+ group by ll.id) as products_to_consumme,
+ (select count(ll.id) from mrp_production_move_ids as mv
+ left join stock_move as sm ON (sm.id=mv.move_id)
+ left join mrp_production_product_line as ll ON (ll.id=mv.production_id)
+ where sm.state in ('done','cancel') and ll.id=l.id
+ group by ll.id) as consummed_products,
s.location_src_id,
s.location_dest_id,
s.bom_id,
@@ -86,11 +100,9 @@ class mrp_production_order(osv.osv):
s.origin,
s.priority,
s.state
- from
- mrp_production_product_line l
- left join
- mrp_production s on (s.id=l.production_id)
- left join product_uom u on (u.id=l.product_uom)
+ from mrp_production_product_line l
+ left join mrp_production s on (s.id=l.production_id)
+ left join product_uom u on (u.id=l.product_uom)
group by
to_char(s.create_date, 'YYYY'),
to_char(s.create_date, 'MM'),
@@ -98,6 +110,7 @@ class mrp_production_order(osv.osv):
to_date(to_char(s.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY'),
l.product_id,
l.product_uom,
+ l.id,
s.bom_id,
s.routing_id,
s.picking_id,
diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml
index 04188f43752..acac00d590a 100644
--- a/addons/mrp/report/mrp_production_order_view.xml
+++ b/addons/mrp/report/mrp_production_order_view.xml
@@ -16,6 +16,8 @@
+
+
@@ -28,6 +30,8 @@
+
+
@@ -81,25 +85,30 @@
+
-
-
+
+
+
+
+
+
+
-
+
-
@@ -113,6 +122,7 @@
+
From 8a54668cba1b026d17c2a8e61413d4558a63cac7 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Wed, 28 Apr 2010 19:08:56 +0530
Subject: [PATCH 017/148] [IMP]: Improve SQL report for task and project_issue.
bzr revid: rch_open_erp-20100428133856-4lserqno5zsnvjrq
---
addons/project/report/project_report_view.xml | 4 +--
.../report/project_issue_report.py | 22 +++++++++++---
.../report/project_issue_report_view.xml | 30 +++++++++++++------
3 files changed, 41 insertions(+), 15 deletions(-)
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index 9ee400e6472..ef0abd119fa 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -88,7 +88,7 @@
help="Non Assigned Tasks to users"
domain="[('user_id','=',False)]"/>
-
+
-
+
diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py
index 775e4b933f0..a14eb67bab4 100755
--- a/addons/project_issue/report/project_issue_report.py
+++ b/addons/project_issue/report/project_issue_report.py
@@ -11,16 +11,23 @@ class project_issue_report(osv.osv):
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"),
'nbr': fields.integer('# of Issues', readonly=True),
'delay_close': fields.float('Avg Closing Delay', digits=(16,2), readonly=True, group_operator="avg",
- help="Number of Days to close the project issue"),
+ help="Number of Days to close the project issue"),
+ 'delay_open': fields.float('Avg Opening Delay', digits=(16,2), readonly=True, group_operator="avg",
+ help="Number of Days to open the project issue"),
'company_id' : fields.many2one('res.company', 'Company'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'project_id':fields.many2one('project.project', 'Project',readonly=True),
'type_id': fields.many2one('crm.case.resource.type', 'Type', domain="[('object_id.model', '=', 'project.issue')]"),
'date_closed': fields.datetime('Close Date', readonly=True),
+ 'date_open': fields.datetime('Opened', readonly=True),
'assigned_to' : fields.many2one('res.users', 'Assigned to',readonly=True),
'partner_id': fields.many2one('res.partner','Partner',domain="[('object_id.model', '=', 'project.issue')]"),
'canal_id': fields.many2one('res.partner.canal', 'Channel',readonly=True),
- 'task_id': fields.many2one('project.task', 'Task',domain="[('object_id.model', '=', 'project.issue')]" )
+ 'task_id': fields.many2one('project.task', 'Task',domain="[('object_id.model', '=', 'project.issue')]" ),
+ 'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account',
+ domain="[('partner_id', '=', partner_id)]",
+ required=True),
+ 'partner_address_id': fields.many2one('res.partner.address','Contact ',readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'project_issue_report')
@@ -46,8 +53,12 @@ class project_issue_report(osv.osv):
c.partner_id,
c.canal_id,
c.task_id,
+ c.analytic_account_id as analytic_account_id,
+ c.partner_address_id as partner_address_id,
+ c.date_open as date_open,
date_trunc('day',c.create_date) as create_date,
- avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
+ avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
+ avg(extract('epoch' from (c.date_open-c.create_date)))/(3600*24) as delay_open
from
project_issue c
left join
@@ -70,7 +81,10 @@ class project_issue_report(osv.osv):
c.assigned_to,
c.partner_id,
c.canal_id,
- c.task_id
+ c.task_id,
+ c.date_open,
+ c.analytic_account_id,
+ c.partner_address_id
)""")
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index 24290530be7..f075a562ca2 100755
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -15,7 +15,6 @@
-
@@ -23,11 +22,16 @@
+
+
+
+
+
@@ -65,17 +69,21 @@
-
-
-
-
+
-
+
+
+
+
-
+
+
+
+
+
@@ -90,11 +98,15 @@
+
+
-
-
+
+
+
+
From 8415f50d3edbe984886139a5d13af338be60b14f Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Wed, 28 Apr 2010 16:40:43 +0200
Subject: [PATCH 018/148] [FIX] month field on views
bzr revid: nel@tinyerp.com-20100428144043-wl12x361lpzvcqa1
---
addons/account/report/account_invoice_report_view.xml | 2 +-
addons/hr_expense/report/hr_expense_report_view.xml | 2 +-
addons/hr_holidays/report/available_holidays_view.xml | 2 +-
.../hr_recruitment/report/hr_recruitment_report_view.xml | 8 ++++----
addons/sale/report/sale_report_view.xml | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index 5a833e454fb..c4832d82309 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -129,7 +129,7 @@
-
+
diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml
index 972557edd0c..ae111fa6796 100644
--- a/addons/hr_expense/report/hr_expense_report_view.xml
+++ b/addons/hr_expense/report/hr_expense_report_view.xml
@@ -121,7 +121,7 @@
-
+
diff --git a/addons/hr_holidays/report/available_holidays_view.xml b/addons/hr_holidays/report/available_holidays_view.xml
index cb610d4214a..5d6cc41a730 100644
--- a/addons/hr_holidays/report/available_holidays_view.xml
+++ b/addons/hr_holidays/report/available_holidays_view.xml
@@ -81,7 +81,7 @@
-
+
diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
index 83f7d2b7602..f9a144dadc4 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml
+++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
@@ -119,9 +119,9 @@
-
-
-
+
+
+
@@ -136,7 +136,7 @@
hr.recruitment.report
form
tree,graph
- {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_month':1,'search_default_degree':1,'search_default_job':1,'group_by_no_leaf':1,'group_by':[]}
diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml
index 72707f6e01d..73029cb88fa 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -114,7 +114,7 @@
-
+
From 29b9372b9cd7214395dc35baf60984dadd917249 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Wed, 28 Apr 2010 16:53:19 +0200
Subject: [PATCH 019/148] rename button
bzr revid: nel@tinyerp.com-20100428145319-akcdb0ld4lcz8qtw
---
addons/crm/report/crm_phonecall_report_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml
index 5ad0a63bdd8..e80cd8f82da 100644
--- a/addons/crm/report/crm_phonecall_report_view.xml
+++ b/addons/crm/report/crm_phonecall_report_view.xml
@@ -88,7 +88,7 @@
-
From a3f82274260ad12288dd7d1df1f82c9b14ff2453 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Thu, 29 Apr 2010 11:59:53 +0530
Subject: [PATCH 020/148] [IMP]:hr_recruitment:Add Partner and Partner c
bzr revid: apa@tinyerp.com-20100429062953-qt8zrs0d1uer5z2w
---
.../report/hr_recruitment_report.py | 6 +++++
.../report/hr_recruitment_report_view.xml | 23 +++++++++++++------
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/addons/hr_recruitment/report/hr_recruitment_report.py b/addons/hr_recruitment/report/hr_recruitment_report.py
index f59ea414fec..52fbc94be8a 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report.py
+++ b/addons/hr_recruitment/report/hr_recruitment_report.py
@@ -44,6 +44,8 @@ class hr_recruitment_report(osv.osv):
'priority': fields.selection(hr_recruitment.AVAILABLE_PRIORITIES, 'Appreciation'),
'salary_prop' : fields.float("Salary Proposed"),
'salary_exp' : fields.float("Salary Expected"),
+ 'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
+ 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact',readonly=True),
'available' : fields.float("Availability")
}
@@ -60,7 +62,9 @@ class hr_recruitment_report(osv.osv):
to_char(s.create_date, 'MM') as month,
to_char(s.create_date, 'YYYY-MM-DD') as day,
s.state,
+ s.partner_id,
s.company_id,
+ s.partner_address_id,
s.user_id,
s.job_id,
s.type_id,
@@ -79,6 +83,8 @@ class hr_recruitment_report(osv.osv):
date_trunc('day',s.create_date),
date_trunc('day',s.date_closed),
s.state,
+ s.partner_id,
+ s.partner_address_id,
s.company_id,
s.user_id,
s.stage_id,
diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
index f9a144dadc4..4cdaaca68bc 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml
+++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
@@ -13,6 +13,8 @@
+
+
@@ -100,29 +102,36 @@
string="Hired"
name="done"
domain="[('state','=','done')]"/>
-
+
+
-
-
+
+
+
+
+
+
-
+
+
-
+
+
From 6460e5ab80a356988ebf38491134613d9c7e9b2c Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Thu, 29 Apr 2010 12:11:34 +0530
Subject: [PATCH 021/148] [FIX]: Resolve confusion between state and country's
state in crm lead report.
bzr revid: rch_open_erp-20100429064134-apl3s8gxt6wod3zc
---
addons/crm/report/crm_lead_report_view.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index ab648d75ea2..becf76db72d 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -28,7 +28,7 @@
-
+
@@ -86,7 +86,7 @@
-
+
@@ -117,7 +117,7 @@
-
From 68137a3117ed1efa3b82deb380f82593b4f70828 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Thu, 29 Apr 2010 13:57:53 +0530
Subject: [PATCH 022/148] [IMP]: Improve SQL report for Invoice.
bzr revid: rch_open_erp-20100429082753-ao26rotnkwjwmtfh
---
.../account/report/account_invoice_report.py | 21 +++++++++--
.../report/account_invoice_report_view.xml | 37 +++++++++++++++----
2 files changed, 47 insertions(+), 11 deletions(-)
diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py
index 36fa5a0d132..5aff8f34f89 100644
--- a/addons/account/report/account_invoice_report.py
+++ b/addons/account/report/account_invoice_report.py
@@ -61,6 +61,11 @@ class account_invoice_report(osv.osv):
('paid','Done'),
('cancel','Cancelled')
], 'Order State', readonly=True),
+ 'date_due': fields.date('Due Date', readonly=True),
+ 'address_contact_id': fields.many2one('res.partner.address', 'Contact Address', readonly=True),
+ 'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True),
+ 'account_id': fields.many2one('account.account', 'Account',readonly=True),
+ 'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',readonly=True)
}
_order = 'date desc'
def init(self, cr):
@@ -87,8 +92,13 @@ class account_invoice_report(osv.osv):
(sum(l.quantity*l.price_unit)/sum(l.quantity * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
s.type as type,
- s.state
- from
+ s.state,
+ s.date_due as date_due,
+ s.address_contact_id as address_contact_id,
+ s.address_invoice_id as address_invoice_id,
+ s.account_id as account_id,
+ s.partner_bank as partner_bank
+ from
account_invoice_line l
left join
account_invoice s on (s.id=l.invoice_id)
@@ -106,7 +116,12 @@ class account_invoice_report(osv.osv):
s.period_id,
s.fiscal_position,
s.currency_id,
- s.journal_id
+ s.journal_id,
+ s.date_due,
+ s.address_contact_id,
+ s.address_invoice_id,
+ s.account_id,
+ s.partner_bank
)
""")
account_invoice_report()
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index c4832d82309..4764e0a5942 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -27,6 +27,11 @@
+
+
+
+
+
@@ -76,7 +81,6 @@
domain="[('state', '=' ,'open')]"
help = "In progress tasks"/>
-
+
@@ -102,28 +107,44 @@
domain="[('state', '=' ,'cancel')]"
help = "Cancelled tasks"/>
+
+
-
+
+
+
+
+
+
-
+
+
+
+
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
From c92db23ececc941655c6b5d8e24d0ccfa981dfaa Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Thu, 29 Apr 2010 14:22:09 +0530
Subject: [PATCH 023/148] [IMP]:hr_expense:Improved SQL report.(Expense).
bzr revid: apa@tinyerp.com-20100429085209-lwal4qdyci0eu92p
---
addons/hr_expense/report/hr_expense_report.py | 16 +++++++++++-----
.../hr_expense/report/hr_expense_report_view.xml | 5 +++++
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py
index cc3f282e9fa..7f0c6cc09a6 100644
--- a/addons/hr_expense/report/hr_expense_report.py
+++ b/addons/hr_expense/report/hr_expense_report.py
@@ -45,7 +45,9 @@ class hr_expense_report(osv.osv):
'department_id':fields.many2one('hr.department','Department',readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', readonly=True),
'price_total':fields.float('Total Price', readonly=True),
+ 'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True),
'price_average':fields.float('Average Price', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'state': fields.selection([
@@ -67,6 +69,7 @@ class hr_expense_report(osv.osv):
date_trunc('day',s.create_date) as date,
s.employee_id,
s.journal_id,
+ s.currency_id,
to_date(to_char(s.date_confirm, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_confirm,
to_date(to_char(s.date_valid, 'dd-MM-YYYY'),'dd-MM-YYYY') as date_valid,
s.invoice_id,
@@ -75,6 +78,7 @@ class hr_expense_report(osv.osv):
to_char(date_trunc('day',s.create_date), 'MM') as month,
to_char(date_trunc('day',s.create_date), 'YYYY-MM-DD') as day,
l.product_id as product_id,
+ l.analytic_account as analytic_account,
sum(l.unit_quantity * u.factor) as product_qty,
s.user_id as user_id,
s.company_id as company_id,
@@ -82,18 +86,20 @@ class hr_expense_report(osv.osv):
(sum(l.unit_quantity*l.unit_amount)/sum(l.unit_quantity * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
s.state
- from
- hr_expense_line l
- left join
- hr_expense_expense s on (s.id=l.expense_id)
- left join product_uom u on (u.id=l.uom_id)
+ from hr_expense_line l
+ left join hr_expense_expense s on (s.id=l.expense_id)
+ left join product_uom u on (u.id=l.uom_id)
group by
date_trunc('day',s.create_date),
+ to_char(date_trunc('day',s.create_date), 'YYYY'),
+ to_char(date_trunc('day',s.create_date), 'MM'),
to_char(date_trunc('day',s.create_date), 'YYYY-MM-DD'),
to_date(to_char(s.date_confirm, 'dd-MM-YYYY'),'dd-MM-YYYY'),
to_date(to_char(s.date_valid, 'dd-MM-YYYY'),'dd-MM-YYYY'),
l.product_id,
+ l.analytic_account,
s.invoice_id,
+ s.currency_id,
s.department_id,
l.uom_id,
s.user_id,
diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml
index ae111fa6796..e2dbe60ef4e 100644
--- a/addons/hr_expense/report/hr_expense_report_view.xml
+++ b/addons/hr_expense/report/hr_expense_report_view.xml
@@ -14,9 +14,11 @@
+
+
@@ -115,7 +117,10 @@
+
+
+
From c7b027483ee3c78a506cf818999a028e317f2880 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Thu, 29 Apr 2010 15:22:43 +0530
Subject: [PATCH 024/148] [IMP]:hr_expense:Add #Products in SQL virw
report..(Expense).
bzr revid: apa@tinyerp.com-20100429095243-p3hq66v38jp6kfdj
---
addons/hr_expense/report/hr_expense_report.py | 3 +++
addons/hr_expense/report/hr_expense_report_view.xml | 1 +
2 files changed, 4 insertions(+)
diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py
index 7f0c6cc09a6..4a983984e57 100644
--- a/addons/hr_expense/report/hr_expense_report.py
+++ b/addons/hr_expense/report/hr_expense_report.py
@@ -50,6 +50,7 @@ class hr_expense_report(osv.osv):
'analytic_account': fields.many2one('account.analytic.account','Analytic account',readonly=True),
'price_average':fields.float('Average Price', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
+ 'no_of_products':fields.integer('# of Products', readonly=True),
'state': fields.selection([
('draft', 'Draft'),
('confirm', 'Waiting confirmation'),
@@ -85,6 +86,7 @@ class hr_expense_report(osv.osv):
sum(l.unit_quantity*l.unit_amount) as price_total,
(sum(l.unit_quantity*l.unit_amount)/sum(l.unit_quantity * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
+ (select unit_quantity from hr_expense_line where id=l.id and product_id is not null) as no_of_products,
s.state
from hr_expense_line l
left join hr_expense_expense s on (s.id=l.expense_id)
@@ -102,6 +104,7 @@ class hr_expense_report(osv.osv):
s.currency_id,
s.department_id,
l.uom_id,
+ l.id,
s.user_id,
s.state,
s.journal_id,
diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml
index e2dbe60ef4e..d717743ff34 100644
--- a/addons/hr_expense/report/hr_expense_report_view.xml
+++ b/addons/hr_expense/report/hr_expense_report_view.xml
@@ -22,6 +22,7 @@
+
From 9dd2f2d39a794226d9727cfa740b14c53a37b015 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Thu, 29 Apr 2010 15:54:30 +0530
Subject: [PATCH 025/148] [IMP]:hr_expense:Add #Accounts in SQL virw
report..(Expense).
bzr revid: apa@tinyerp.com-20100429102430-71xa5n0e2x0o7mx6
---
addons/hr_expense/report/hr_expense_report.py | 2 ++
addons/hr_expense/report/hr_expense_report_view.xml | 1 +
2 files changed, 3 insertions(+)
diff --git a/addons/hr_expense/report/hr_expense_report.py b/addons/hr_expense/report/hr_expense_report.py
index 4a983984e57..2b0f6b4addf 100644
--- a/addons/hr_expense/report/hr_expense_report.py
+++ b/addons/hr_expense/report/hr_expense_report.py
@@ -51,6 +51,7 @@ class hr_expense_report(osv.osv):
'price_average':fields.float('Average Price', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'no_of_products':fields.integer('# of Products', readonly=True),
+ 'no_of_account':fields.integer('# of Accounts', readonly=True),
'state': fields.selection([
('draft', 'Draft'),
('confirm', 'Waiting confirmation'),
@@ -87,6 +88,7 @@ class hr_expense_report(osv.osv):
(sum(l.unit_quantity*l.unit_amount)/sum(l.unit_quantity * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
(select unit_quantity from hr_expense_line where id=l.id and product_id is not null) as no_of_products,
+ (select count(analytic_account) from hr_expense_line where id=l.id and analytic_account is not null) as no_of_account,
s.state
from hr_expense_line l
left join hr_expense_expense s on (s.id=l.expense_id)
diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml
index d717743ff34..0fb5c46c210 100644
--- a/addons/hr_expense/report/hr_expense_report_view.xml
+++ b/addons/hr_expense/report/hr_expense_report_view.xml
@@ -23,6 +23,7 @@
+
From ab94bf1e5f2e224a61041404d0c6edbc0062c398 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Thu, 29 Apr 2010 16:10:08 +0530
Subject: [PATCH 026/148] [IMP]:hr_expense:improved search view..(Expense).
bzr revid: apa@tinyerp.com-20100429104008-x4w9tzkvd698ldoq
---
addons/hr_expense/report/hr_expense_report_view.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/hr_expense/report/hr_expense_report_view.xml b/addons/hr_expense/report/hr_expense_report_view.xml
index 0fb5c46c210..0259c617836 100644
--- a/addons/hr_expense/report/hr_expense_report_view.xml
+++ b/addons/hr_expense/report/hr_expense_report_view.xml
@@ -87,6 +87,8 @@
help="Expenses Non Assigned User"
domain="[('user_id','=',False)]"/>
+
+
@@ -103,13 +105,11 @@
domain="[('state','=','cancelled')]"
help = "Cancelled Expenses"/>
-
-
-
+
-
+
From 889d4d7ebc72e5f61a07615f1a4796e524e15d7e Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Thu, 29 Apr 2010 17:16:49 +0530
Subject: [PATCH 027/148] [IMP]: Improve SQL report for Invoice by adding sum
Residual and Delay To Pay fields.
bzr revid: rch_open_erp-20100429114649-o46vjjrf11y4ulyx
---
addons/account/report/account_invoice_report.py | 15 ++++++++++++---
.../report/account_invoice_report_view.xml | 2 ++
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py
index 5aff8f34f89..af8ef08e353 100644
--- a/addons/account/report/account_invoice_report.py
+++ b/addons/account/report/account_invoice_report.py
@@ -65,7 +65,9 @@ class account_invoice_report(osv.osv):
'address_contact_id': fields.many2one('res.partner.address', 'Contact Address', readonly=True),
'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True),
'account_id': fields.many2one('account.account', 'Account',readonly=True),
- 'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',readonly=True)
+ 'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
+ 'residual':fields.float('Total Residual', readonly=True),
+ 'delay_to_pay':fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
}
_order = 'date desc'
def init(self, cr):
@@ -97,12 +99,19 @@ class account_invoice_report(osv.osv):
s.address_contact_id as address_contact_id,
s.address_invoice_id as address_invoice_id,
s.account_id as account_id,
- s.partner_bank as partner_bank
+ s.partner_bank as partner_bank,
+ sum(s.residual) as residual,
+ case when s.state != 'paid' then null else
+ extract(epoch from avg(am.date_created-l.create_date))/(24*60*60)::decimal(16,2)
+ end as delay_to_pay
from
account_invoice_line l
left join
account_invoice s on (s.id=l.invoice_id)
- left join product_uom u on (u.id=l.uos_id)
+ left join product_uom u on (u.id=l.uos_id),
+ account_move_line am left join account_invoice i on (i.move_id=am.move_id)
+ where
+ am.account_id=i.account_id
group by
s.type,
s.date_invoice,
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index 4764e0a5942..fea7dbadd93 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -32,6 +32,8 @@
+
+
From 565ba12d6cd0441f2940ea34379d443ef362a2d4 Mon Sep 17 00:00:00 2001
From: "aag (Open ERP)" <>
Date: Thu, 29 Apr 2010 18:15:40 +0530
Subject: [PATCH 028/148] [ADD]: Add SQL report for Entries.
bzr revid: rch_open_erp-20100429124540-b49s7pibrjk4r4i3
---
addons/account/__openerp__.py | 1 +
addons/account/report/__init__.py | 1 +
.../account/report/account_entries_report.py | 96 ++++++++++++++++
.../report/account_entries_report_view.xml | 106 ++++++++++++++++++
4 files changed, 204 insertions(+)
create mode 100644 addons/account/report/account_entries_report.py
create mode 100644 addons/account/report/account_entries_report_view.xml
diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py
index e73b3885089..e87818d40fc 100644
--- a/addons/account/__openerp__.py
+++ b/addons/account/__openerp__.py
@@ -98,6 +98,7 @@ module named account_voucherss
'company_view.xml',
'account_installer.xml',
'report/account_invoice_report_view.xml',
+ 'report/account_entries_report_view.xml',
'report/account_report_view.xml',
'report/account_analytic_report_view.xml',
'report/account_account_report_view.xml'
diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py
index 959a76013f9..51cb0810f43 100644
--- a/addons/account/report/__init__.py
+++ b/addons/account/report/__init__.py
@@ -38,5 +38,6 @@ import account_invoice_report
import account_report
import account_analytic_report
import account_account_report
+import account_entries_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py
new file mode 100644
index 00000000000..83602ded81b
--- /dev/null
+++ b/addons/account/report/account_entries_report.py
@@ -0,0 +1,96 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import tools
+from osv import fields,osv
+
+class account_entries_report(osv.osv):
+ _name = "account.entries.report"
+ _description = "Entries"
+ _auto = False
+ _rec_name = 'date'
+ _columns = {
+ 'date': fields.date('Date', readonly=True),
+ 'nbr':fields.integer('# of Entries', readonly=True),
+ 'nbl':fields.integer('# of Lines', readonly=True),
+ 'amount': fields.float('Amount',readonly=True),
+ 'year': fields.char('Year', size=4, readonly=True),
+ 'day': fields.char('Day', size=128, readonly=True),
+ 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
+ ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
+ ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
+ 'ref': fields.char('Reference', size=64,readonly=True),
+ 'period_id': fields.many2one('account.period', 'Period', readonly=True),
+ 'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
+ 'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State',readonly=True,
+ help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Posted\' state.'),
+ 'partner_id': fields.many2one('res.partner','Partner', readonly=True),
+ 'type': fields.selection([
+ ('pay_voucher','Cash Payment'),
+ ('bank_pay_voucher','Bank Payment'),
+ ('rec_voucher','Cash Receipt'),
+ ('bank_rec_voucher','Bank Receipt'),
+ ('cont_voucher','Contra'),
+ ('journal_sale_vou','Journal Sale'),
+ ('journal_pur_voucher','Journal Purchase'),
+ ('journal_voucher','Journal Voucher'),
+ ],'Type',readonly=True),
+ 'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ }
+ _order = 'date desc'
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'account_entries_report')
+ cr.execute("""
+ create or replace view account_entries_report as (
+ select
+ min(l.id) as id,
+ am.ref as ref,
+ am.state as state,
+ am.date as date,
+ count(l.id) as nbr,
+ count(distinct am.id) as nbl,
+ l.debit as amount,
+ to_char(am.date, 'YYYY') as year,
+ to_char(am.date, 'MM') as month,
+ to_char(am.date, 'YYYY-MM-DD') as day,
+ am.company_id as company_id,
+ am.journal_id as journal_id,
+ am.period_id as period_id,
+ l.partner_id as partner_id,
+ am.type as type
+ from
+ account_move_line l
+ left join
+ account_move am on (am.id=l.move_id)
+ group by am.ref,
+ am.state,
+ am.date,
+ am.company_id,
+ am.journal_id,
+ am.period_id,
+ am.type,
+ l.partner_id,
+ l.debit
+ )
+ """)
+
+account_entries_report()
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
new file mode 100644
index 00000000000..46f7ac46b83
--- /dev/null
+++ b/addons/account/report/account_entries_report_view.xml
@@ -0,0 +1,106 @@
+
+
+
+
+ account.entries.report.tree
+ account.entries.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.entries.report.graph
+ account.entries.report
+ graph
+
+
+
+
+
+
+
+
+ account.entries.report.search
+ account.entries.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Entries
+ account.entries.report
+ form
+ tree,graph
+ {'search_default_This Month':1,'search_default_Journal':1,'group_by_no_leaf':1,'group_by':[]}
+
+
+
+
+
From 004d37b7a00109b35d676c28966026d828a5b68a Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Thu, 29 Apr 2010 18:51:40 +0530
Subject: [PATCH 029/148] [IMP]:stock:improved search view..(Picking).
bzr revid: apa@tinyerp.com-20100429132140-sb1d86mvy6rbj5ii
---
addons/stock/report/report_stock_picking.py | 34 ++++++++++++++++---
.../report/report_stock_picking_view.xml | 25 +++++++++++++-
2 files changed, 53 insertions(+), 6 deletions(-)
diff --git a/addons/stock/report/report_stock_picking.py b/addons/stock/report/report_stock_picking.py
index 7f4ac801399..6e1b778b4b0 100644
--- a/addons/stock/report/report_stock_picking.py
+++ b/addons/stock/report/report_stock_picking.py
@@ -35,12 +35,22 @@ class report_stock_picking(osv.osv):
'nbp': fields.integer('# of Picking', readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'product_qty': fields.float('# of Products', readonly=True),
+ 'product_id': fields.many2one('product.product', 'Product', readonly=True),
'date': fields.date('Date', readonly=True),
'avg_days_to_deliver': fields.float('Avg Days to Deliver', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Avg Days to deliver"),
'origin': fields.char('Origin', size=64),
'state': fields.selection([('draft', 'Draft'),('auto', 'Waiting'),('confirmed', 'Confirmed'),('assigned', 'Available'),('done', 'Done'),('cancel', 'Cancelled')], 'State'),
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', required=True),
+ 'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ 'invoice_state': fields.selection([
+ ("invoiced", "Invoiced"),
+ ("2binvoiced", "To Be Invoiced"),
+ ("none", "Not from Picking")], "Invoice Status",readonly=True),
+ 'min_date': fields.date('Expected Date',help="Expected date for Picking. Default it takes current date"),
+ 'order_date': fields.date('Order Date', help="Date of Order"),
+ 'date_done': fields.date('Date Done', help="Date of completion"),
+ 'max_date': fields.date('Max.Expected Date'),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_stock_picking')
@@ -48,6 +58,10 @@ class report_stock_picking(osv.osv):
create or replace view report_stock_picking as (
select
min(sm.id) as id,
+ date_trunc('day',sp.min_date) as min_date,
+ date_trunc('day',sp.date) as order_date,
+ date_trunc('day',sp.date_done) as date_done,
+ date_trunc('day',sp.max_date) as max_date,
to_char(sp.create_date, 'YYYY') as year,
to_char(sp.create_date, 'MM') as month,
to_char(sp.create_date, 'YYYY-MM-DD') as day,
@@ -56,7 +70,10 @@ class report_stock_picking(osv.osv):
count(sm.id) as nbr,
count(distinct sp.id) as nbp,
sum(sm.product_qty) as product_qty,
+ sm.product_id,
sp.type,
+ sp.invoice_state,
+ sp.company_id,
sp.name as reference,
sp.origin,
avg(extract('epoch' from (sp.date_done-sp.create_date)))/(3600*24) as avg_days_to_deliver,
@@ -64,11 +81,18 @@ class report_stock_picking(osv.osv):
from stock_move as sm
left join stock_picking as sp ON (sm.picking_id=sp.id)
group by sp.type,
- sp.create_date,
- sp.address_id,
- sp.name,
- sp.origin,
- sp.state
+ sp.create_date,
+ sp.address_id,
+ sp.name,
+ sm.product_id,
+ date_trunc('day',sp.min_date),
+ date_trunc('day',sp.date),
+ date_trunc('day',sp.date_done),
+ date_trunc('day',sp.max_date),
+ sp.invoice_state,
+ sp.origin,
+ sp.company_id,
+ sp.state
)""")
report_stock_picking()
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index 5d54634d72b..11a8938bd4b 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -16,9 +16,16 @@
+
+
+
+
+
+
+
@@ -63,13 +70,29 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 9833cb0448e299b928d6b2b7f1d6d169122db8e5 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Thu, 29 Apr 2010 18:54:51 +0530
Subject: [PATCH 030/148] [IMP]:stock:improved search view..(Picking).
bzr revid: apa@tinyerp.com-20100429132451-mogw5vr4482m4yyf
---
addons/stock/report/report_stock_picking.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/addons/stock/report/report_stock_picking.py b/addons/stock/report/report_stock_picking.py
index 6e1b778b4b0..8b464a35762 100644
--- a/addons/stock/report/report_stock_picking.py
+++ b/addons/stock/report/report_stock_picking.py
@@ -85,6 +85,9 @@ class report_stock_picking(osv.osv):
sp.address_id,
sp.name,
sm.product_id,
+ to_char(sp.create_date, 'YYYY'),
+ to_char(sp.create_date, 'MM'),
+ to_char(sp.create_date, 'YYYY-MM-DD'),
date_trunc('day',sp.min_date),
date_trunc('day',sp.date),
date_trunc('day',sp.date_done),
From 6a586ba4a94f74324a82867928068f5c6f80b6d6 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Fri, 30 Apr 2010 14:47:27 +0530
Subject: [PATCH 031/148] [IMP]:hr_timesheet_sheet:improved search
view..(Timesheet).
bzr revid: apa@tinyerp.com-20100430091727-mjmivw3t38xb0obh
---
.../report/timesheet_report.py | 10 ++++
.../report/timesheet_report_view.xml | 46 +++++++++++++------
2 files changed, 41 insertions(+), 15 deletions(-)
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report.py b/addons/hr_timesheet_sheet/report/timesheet_report.py
index 7b79470a9b7..3dd8d161c5f 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report.py
+++ b/addons/hr_timesheet_sheet/report/timesheet_report.py
@@ -33,7 +33,11 @@ class timesheet_report(osv.osv):
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'name': fields.char('Description', size=64,readonly=True),
+ 'product_id' : fields.many2one('product.product', 'Product'),
+ 'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
'user_id': fields.many2one('res.users', 'User',readonly=True),
+ 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Type of Invoicing',readonly=True),
+ 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
'nbr': fields.integer('#Nbr',readonly=True),
'company_id': fields.many2one('res.company', 'Company',readonly=True),
'department_id':fields.many2one('hr.department','Department',readonly=True),
@@ -66,6 +70,9 @@ class timesheet_report(osv.osv):
sum(aal.unit_amount) as quantity,
sum(aal.amount) as cost,
aal.account_id,
+ aal.product_id,
+ aal.to_invoice,
+ aal.general_account_id,
htss.user_id,
htss.company_id,
htss.department_id,
@@ -81,6 +88,9 @@ class timesheet_report(osv.osv):
htss.date_from,
htss.date_to,
htss.date_current,
+ aal.to_invoice,
+ aal.product_id,
+ aal.general_account_id,
htss.name,
htss.company_id,
htss.state,
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
index 2520d5054fb..57df8dcdf32 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
+++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
@@ -29,6 +29,10 @@
+
+
+
+
@@ -61,10 +65,8 @@
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
-
+
From 40e34eb66ea1bd44a9480fbac348350a83edba27 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Thu, 22 Apr 2010 15:39:10 +0530
Subject: [PATCH 032/148] [IMP]: Improve sale report search view.
bzr revid: rch_open_erp-20100422100910-5e6qqo5f0qmdxvmb
---
addons/sale/report/sale_report.py | 22 ++++++++++++++++++++--
addons/sale/report/sale_report_view.xml | 21 +++++++++++++++++++++
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/addons/sale/report/sale_report.py b/addons/sale/report/sale_report.py
index d1081a4b21f..0372de7ce42 100644
--- a/addons/sale/report/sale_report.py
+++ b/addons/sale/report/sale_report.py
@@ -57,6 +57,12 @@ class sale_report(osv.osv):
('done', 'Done'),
('cancel', 'Cancelled')
], 'Order State', readonly=True),
+ 'partner_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True),
+ 'partner_order_id': fields.many2one('res.partner.address', 'Ordering Contact', readonly=True),
+ 'partner_shipping_id': fields.many2one('res.partner.address', 'Shipping Address', readonly=True),
+ 'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True),
+ 'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
+ 'date_confirm': fields.date('Confirmation Date', readonly=True)
}
_order = 'date desc'
def init(self, cr):
@@ -81,7 +87,13 @@ class sale_report(osv.osv):
sum(l.product_uom_qty*l.price_unit) as price_total,
(sum(l.product_uom_qty*l.price_unit)/sum(l.product_uom_qty * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
- s.state
+ s.state,
+ s.partner_invoice_id as partner_invoice_id,
+ s.partner_order_id as partner_order_id,
+ s.partner_shipping_id as partner_shipping_id,
+ s.pricelist_id as pricelist_id,
+ s.project_id as analytic_account_id,
+ s.date_confirm as date_confirm
from
sale_order_line l
left join
@@ -97,7 +109,13 @@ class sale_report(osv.osv):
s.shop_id,
s.company_id,
s.fiscal_position,
- s.payment_term
+ s.payment_term,
+ s.partner_invoice_id,
+ s.partner_order_id,
+ s.partner_shipping_id,
+ s.pricelist_id,
+ s.project_id,
+ s.date_confirm
)
""")
sale_report()
diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml
index 73029cb88fa..41fe598b597 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -24,6 +24,12 @@
+
+
+
+
+
+
@@ -97,8 +103,16 @@
+
+
+
+
+
+
+
+
@@ -112,6 +126,13 @@
+
+
+
+
+
+
+
From da53f2831ebd7122a50df9258b9583b90a97f06d Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Fri, 30 Apr 2010 16:25:01 +0530
Subject: [PATCH 033/148] [IMP]:purchase:improved search view..(Purchase
Order).
bzr revid: apa@tinyerp.com-20100430105501-bkxd2hifzinkbrkl
---
addons/purchase/report/purchase_report.py | 18 +++++++++
.../purchase/report/purchase_report_view.xml | 38 +++++++++++++++----
2 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py
index 76d018680d2..d6fd4000633 100644
--- a/addons/purchase/report/purchase_report.py
+++ b/addons/purchase/report/purchase_report.py
@@ -54,6 +54,12 @@ class purchase_report(osv.osv):
'location_id': fields.many2one('stock.location', 'Destination', readonly=True),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position',readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
+ 'partner_address_id':fields.many2one('res.partner.address', 'Address', readonly=True),
+ 'dest_address_id':fields.many2one('res.partner.address', 'Dest. Address',readonly=True),
+ 'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', readonly=True),
+ 'date_approve':fields.date('Date Approved', readonly=True),
+ 'expected_date':fields.date('Expected Date', readonly=True),
+ 'validator' : fields.many2one('res.users', 'Validated by', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'Responsible', readonly=True),
'quantity': fields.float('# of Products', readonly=True),
@@ -76,6 +82,12 @@ class purchase_report(osv.osv):
to_char(s.date_order, 'MM') as month,
to_char(s.date_order, 'YYYY-MM-DD') as day,
s.state,
+ s.date_approve,
+ date_trunc('day',s.minimum_planned_date) as expected_date,
+ s.partner_address_id,
+ s.dest_address_id,
+ s.pricelist_id,
+ s.validator,
s.warehouse_id as warehouse_id,
s.partner_id as partner_id,
s.fiscal_position,
@@ -97,6 +109,12 @@ class purchase_report(osv.osv):
s.create_uid,
s.partner_id,
s.location_id,
+ s.date_approve,
+ date_trunc('day',s.minimum_planned_date),
+ s.partner_address_id,
+ s.pricelist_id,
+ s.validator,
+ s.dest_address_id,
l.product_id,
s.date_order,
to_char(s.date_order, 'YYYY'),
diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml
index 93918160bd1..8f3f31e84ee 100644
--- a/addons/purchase/report/purchase_report_view.xml
+++ b/addons/purchase/report/purchase_report_view.xml
@@ -21,6 +21,8 @@
+
+
@@ -32,6 +34,10 @@
+
+
+
+
@@ -71,6 +77,8 @@
domain="[('state','=','manual')]"/>
+
+
-
-
-
+
+
+
+
-
+
+
+
+
+
-
-
+
+
+
+
+
-
+
+
+
+
+
+
-
+
+
From 6d9b14b9e44a5779f9943bb2d7dadf5969715699 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Thu, 22 Apr 2010 19:01:15 +0530
Subject: [PATCH 034/148] [IMP]: Improve search view for crm phonecall and
opportunity report.
bzr revid: rch_open_erp-20100422133115-gx6xbw975di51l6x
---
addons/crm/report/crm_opportunity_report.py | 12 ++++++++++--
addons/crm/report/crm_opportunity_report_view.xml | 7 +++++++
addons/crm/report/crm_phonecall_report.py | 8 ++++++--
addons/crm/report/crm_phonecall_report_view.xml | 8 ++++++++
4 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/addons/crm/report/crm_opportunity_report.py b/addons/crm/report/crm_opportunity_report.py
index 3e11307ee36..eb6c4ea5bd4 100644
--- a/addons/crm/report/crm_opportunity_report.py
+++ b/addons/crm/report/crm_opportunity_report.py
@@ -53,7 +53,10 @@ class crm_opportunity_report(osv.osv):
'user_id':fields.many2one('res.users', 'User', readonly=True),
'date_closed': fields.datetime('Closed', readonly=True),
'date_open': fields.datetime('Opened', readonly=True),
- 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority')
+ 'date_deadline': fields.date('Expected Closing', readonly=True),
+ 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
+ 'date_action': fields.date('Next Action', readonly=True),
+ 'planned_revenue': fields.float('Expected Revenue', readonly=True),
}
def init(self, cr):
@@ -83,6 +86,9 @@ class crm_opportunity_report(osv.osv):
c.date_closed as date_closed,
c.date_open as date_open,
c.priority as priority,
+ c.date_action as date_action,
+ c.date_deadline as date_deadline,
+ sum(c.planned_revenue) as planned_revenue,
date_trunc('day',c.create_date) as create_date,
sum(planned_revenue) as amount_revenue,
sum((planned_revenue*probability)/100.0)::decimal(16,2) as amount_revenue_prob,
@@ -104,7 +110,9 @@ class crm_opportunity_report(osv.osv):
create_date,
c.date_closed,
c.date_open,
- c.priority
+ c.priority,
+ c.date_action,
+ c.date_deadline
)""")
crm_opportunity_report()
diff --git a/addons/crm/report/crm_opportunity_report_view.xml b/addons/crm/report/crm_opportunity_report_view.xml
index 3daa72c717c..d5d56918629 100644
--- a/addons/crm/report/crm_opportunity_report_view.xml
+++ b/addons/crm/report/crm_opportunity_report_view.xml
@@ -28,6 +28,9 @@
+
+
+
@@ -82,9 +85,13 @@
+
+
+
+
+
+
@@ -78,8 +80,11 @@
+
+
+
+
+
From c2b5890db237a5a288cb70a5846b0e34f899354d Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Tue, 27 Apr 2010 15:49:34 +0530
Subject: [PATCH 035/148] [IMP]: base_action_rule: * Removed fields that are
not in the crm.case, * Added a domain to be applied on the object, for the
conditions
bzr revid: rpa@tinyerp.com-20100427101934-3envktbthc7w3n3o
---
addons/base_action_rule/base_action_rule.py | 47 +++++--------------
.../base_action_rule_view.xml | 14 +++---
addons/crm/crm_action_rule.py | 23 ++++-----
3 files changed, 31 insertions(+), 53 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 6eb45172dbc..77446c633ee 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -44,15 +44,6 @@ class base_action_rule(osv.osv):
return self.state_get(cr, uid, context=context)
- def _priority_get(self, cr, uid, context={}):
- """ Get Priority
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values """
-
- return self.priority_get(cr, uid, context=context)
-
def state_get(self, cr, uid, context={}):
""" Get State
@param self: The object pointer
@@ -62,15 +53,6 @@ class base_action_rule(osv.osv):
return [('','')]
- def priority_get(self, cr, uid, context={}):
- """ Get Priority
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values """
-
- return [('','')]
-
_columns = {
'name': fields.many2one('ir.model', 'Model', required=True),
'max_level': fields.integer('Max Level', help='Specifies maximum level.'),
@@ -79,7 +61,6 @@ class base_action_rule(osv.osv):
it will allow you to hide the rule without removing it."),
'sequence': fields.integer('Sequence', help="Gives the sequence order when\
displaying a list of rules."),
-
'trg_date_type': fields.selection([
('none','None'),
('create','Creation Date'),
@@ -100,13 +81,10 @@ class base_action_rule(osv.osv):
'trg_partner_categ_id': fields.many2one('res.partner.category', 'Partner Category'),
'trg_state_from': fields.selection(_state_get, 'State', size=16),
'trg_state_to': fields.selection(_state_get, 'Button Pressed', size=16),
- 'trg_priority_from': fields.selection(_priority_get, 'Minimum Priority'),
- 'trg_priority_to': fields.selection(_priority_get, 'Maximum Priority'),
'act_method': fields.char('Call Object Method', size=64),
'act_user_id': fields.many2one('res.users', 'Set responsible to'),
'act_state': fields.selection(_state_get, 'Set state to', size=16),
- 'act_priority': fields.selection(_priority_get, 'Set priority to'),
'act_email_cc': fields.char('Add watchers (Cc)', size=250, help="These people\
will receive a copy of the future communication between partner and users by email"),
@@ -131,6 +109,7 @@ class base_action_rule(osv.osv):
'server_action_id': fields.many2one('ir.actions.server','Server Action',help="Describes the\
action name." \
"eg:on which object which action to be taken on basis of which condition"),
+ 'domain':fields.char('Domain', size=124, required=False, readonly=False),
}
_defaults = {
@@ -142,8 +121,11 @@ class base_action_rule(osv.osv):
'act_remind_partner': lambda *a: 0,
'act_remind_user': lambda *a: 0,
'act_mail_to_watchers': lambda *a: 0,
+ 'domain': lambda *a: '[]'
}
-
+
+ _order = 'sequence'
+
def format_body(self, body):
""" Foramat Action rule's body
@param self: The object pointer """
@@ -153,7 +135,6 @@ class base_action_rule(osv.osv):
def format_mail(self, obj, body):
""" Foramat Mail
@param self: The object pointer """
-
data = {
'object_id': obj.id,
'object_subject': hasattr(obj, 'name') and obj.name or False,
@@ -202,6 +183,10 @@ class base_action_rule(osv.osv):
@param context: A standard dictionary for contextual values """
ok = True
+ if eval(action.domain):
+ obj_ids = obj._table.search(cr, uid, eval(action.domain), context=context)
+ if not obj.id in obj_ids:
+ ok = False
if hasattr(obj, 'user_id'):
ok = ok and (not action.trg_user_id.id or action.trg_user_id.id==obj.user_id.id)
if hasattr(obj, 'partner_id'):
@@ -219,10 +204,6 @@ class base_action_rule(osv.osv):
if state_to:
ok = ok and (not action.trg_state_to or action.trg_state_to==state_to)
- if hasattr(obj, 'priority'):
- ok = ok and (not action.trg_priority_from or action.trg_priority_from>=obj.priority)
- ok = ok and (not action.trg_priority_to or action.trg_priority_to<=obj.priority)
-
reg_name = action.regex_name
result_name = True
if reg_name:
@@ -260,10 +241,6 @@ class base_action_rule(osv.osv):
obj.categ_id = action.act_categ_id
write['categ_id'] = action.act_categ_id.id
- if hasattr(obj, 'priority') and action.act_priority:
- obj.priority = action.act_priority
- write['priority'] = action.act_priority
-
model_obj.write(cr, uid, [obj.id], write, context)
if hasattr(model_obj, 'remind_user') and action.act_remind_user:
@@ -295,10 +272,11 @@ class base_action_rule(osv.osv):
@param ids: List of Basic Action Rule’s IDs,
@param objects: pass objects
@param context: A standard dictionary for contextual values """
-
if not scrit:
scrit = []
- for action in self.browse(cr, uid, ids):
+ cr.execute("select id from base_action_rule order by sequence")
+ rule_ids = map(lambda x: x[0], cr.fetchall())
+ for action in self.browse(cr, uid, rule_ids):
level = action.max_level
if not level:
break
@@ -342,7 +320,6 @@ class base_action_rule(osv.osv):
model_obj.write(cr, uid, [obj.id], {'date_action_next': dt}, context)
else:
ok = action.trg_date_type=='none'
-
if ok:
self.do_action(cr, uid, action, model_obj, obj, context)
break
diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml
index 72cf3e5a9fb..f7a476fd09e 100644
--- a/addons/base_action_rule/base_action_rule_view.xml
+++ b/addons/base_action_rule/base_action_rule_view.xml
@@ -16,7 +16,9 @@
@@ -180,7 +180,7 @@
diff --git a/addons/crm_sale/crm_opportunity.py b/addons/crm/crm_opportunity.py
similarity index 98%
rename from addons/crm_sale/crm_opportunity.py
rename to addons/crm/crm_opportunity.py
index fee205c3439..dec672c3277 100644
--- a/addons/crm_sale/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -19,12 +19,10 @@
#
##############################################################################
-
-from crm.report import crm_report
from datetime import datetime
from osv import fields,osv,orm
from tools.translate import _
-from crm import crm
+import crm
import time
import mx.DateTime
@@ -121,7 +119,7 @@ class crm_opportunity(osv.osv):
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id), \
('object_id.model', '=', 'crm.opportunity')]"),
- 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
+ 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'referred': fields.char('Referred By', size=64),
'probability': fields.float('Probability (%)'),
'planned_revenue': fields.float('Expected Revenue'),
@@ -233,7 +231,7 @@ class crm_opportunity(osv.osv):
}
value = {
'name': _('Meetings'),
- 'domain': "[('user_id','=',%s)]" % (uid),
+ 'domain': "[('user_id','=',%s),('opportunity_id','=',%s)]" % (uid,opp.id),
'context': context,
'view_type': 'form',
'view_mode': 'calendar,form,tree',
@@ -244,7 +242,6 @@ class crm_opportunity(osv.osv):
'search_view_id': res['res_id'],
'nodestroy': True
}
-
return value
crm_opportunity()
diff --git a/addons/crm_sale/crm_opportunity_data.xml b/addons/crm/crm_opportunity_data.xml
similarity index 76%
rename from addons/crm_sale/crm_opportunity_data.xml
rename to addons/crm/crm_opportunity_data.xml
index b914198ab16..b3780990a13 100644
--- a/addons/crm_sale/crm_opportunity_data.xml
+++ b/addons/crm/crm_opportunity_data.xml
@@ -3,91 +3,91 @@
Existing Customer
-
+
Self Generated
-
+
Employee
-
+
Partner
-
+
Campaign
-
+
Website
-
+
Word of mouth
-
+
Other
-
+
Prospecting
-
+
Needs Analysis
-
+
Value Proposition
-
+
Proposal/Price Quote
-
+
Negotiation/Review
-
+
Closed Won
-
+
Closed Lost
-
+
Existing Business
-
+
New Business
-
+
diff --git a/addons/crm_sale/crm_opportunity_demo.xml b/addons/crm/crm_opportunity_demo.xml
similarity index 81%
rename from addons/crm_sale/crm_opportunity_demo.xml
rename to addons/crm/crm_opportunity_demo.xml
index 0de8f6bbdcc..b893d536e44 100644
--- a/addons/crm_sale/crm_opportunity_demo.xml
+++ b/addons/crm/crm_opportunity_demo.xml
@@ -11,21 +11,21 @@
-
+
-
-
+
+
-
+
@@ -33,15 +33,15 @@
-
-
+
+
-
+
@@ -49,8 +49,8 @@
-
-
+
+
@@ -58,15 +58,15 @@
-
+
-
-
+
+
@@ -80,8 +80,8 @@
-
-
+
+
diff --git a/addons/crm_sale/crm_opportunity_menu.xml b/addons/crm/crm_opportunity_menu.xml
similarity index 90%
rename from addons/crm_sale/crm_opportunity_menu.xml
rename to addons/crm/crm_opportunity_menu.xml
index 9e5e3e161ad..55bf9354287 100644
--- a/addons/crm_sale/crm_opportunity_menu.xml
+++ b/addons/crm/crm_opportunity_menu.xml
@@ -18,8 +18,8 @@
res_model="crm.phonecall"
src_model="crm.opportunity"
view_mode="calendar,tree,form"
- context="{'default_duration': 1.0}"
- domain="[('user_id','=',uid)]"
+ context="{'default_duration': 1.0 ,'default_opportunity_id': active_id}"
+ domain="[('user_id','=',uid),('opportunity_id', '=', active_id)]"
view_type="form"/>
@@ -27,7 +27,7 @@
crm.opportunity
tree,form,graph
-
+
diff --git a/addons/crm_sale/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
similarity index 97%
rename from addons/crm_sale/crm_opportunity_view.xml
rename to addons/crm/crm_opportunity_view.xml
index 6a65c0e510e..4bdc0d90158 100644
--- a/addons/crm_sale/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -71,14 +71,14 @@
-
-
+
-
-
+
@@ -180,7 +180,7 @@
@@ -191,7 +191,7 @@
diff --git a/addons/crm_sale/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py
similarity index 100%
rename from addons/crm_sale/report/crm_lead_report.py
rename to addons/crm/report/crm_lead_report.py
diff --git a/addons/crm_sale/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
similarity index 100%
rename from addons/crm_sale/report/crm_lead_report_view.xml
rename to addons/crm/report/crm_lead_report_view.xml
diff --git a/addons/crm_sale/report/crm_opportunity_report.py b/addons/crm/report/crm_opportunity_report.py
similarity index 99%
rename from addons/crm_sale/report/crm_opportunity_report.py
rename to addons/crm/report/crm_opportunity_report.py
index db67919bf30..a3af4be8b7c 100644
--- a/addons/crm_sale/report/crm_opportunity_report.py
+++ b/addons/crm/report/crm_opportunity_report.py
@@ -19,11 +19,9 @@
#
##############################################################################
-from crm.report import crm_report
from osv import fields,osv
import tools
-
AVAILABLE_STATES = [
('draft','Draft'),
('open','Open'),
diff --git a/addons/crm_sale/report/crm_opportunity_report_view.xml b/addons/crm/report/crm_opportunity_report_view.xml
similarity index 100%
rename from addons/crm_sale/report/crm_opportunity_report_view.xml
rename to addons/crm/report/crm_opportunity_report_view.xml
diff --git a/addons/crm/security/ir.model.access.csv b/addons/crm/security/ir.model.access.csv
index f7bb4a22231..0207e6cb39c 100644
--- a/addons/crm/security/ir.model.access.csv
+++ b/addons/crm/security/ir.model.access.csv
@@ -30,3 +30,4 @@
"access_crm_opportunity2phonecall","crm.opportunity2phonecall","model_crm_opportunity2phonecall","crm.group_crm_user",1,1,1,1
"access_crm_send_mail","crm.send.mail","model_crm_send_mail","crm.group_crm_user",1,1,1,1
"access_crm_partner2opportunity","crm.partner2opportunity","model_crm_partner2opportunity","crm.group_crm_user",1,1,1,1
+"access_crm_lead2opportunity_partner","crm.lead2opportunity.partner","model_crm_lead2opportunity_partner","crm.group_crm_user",1,1,1,1
diff --git a/addons/crm_sale/test/test_crm_lead.yml b/addons/crm/test/test_crm_lead.yml
similarity index 100%
rename from addons/crm_sale/test/test_crm_lead.yml
rename to addons/crm/test/test_crm_lead.yml
diff --git a/addons/crm_sale/test/test_crm_opportunity.yml b/addons/crm/test/test_crm_opportunity.yml
similarity index 100%
rename from addons/crm_sale/test/test_crm_opportunity.yml
rename to addons/crm/test/test_crm_opportunity.yml
diff --git a/addons/crm/wizard/__init__.py b/addons/crm/wizard/__init__.py
index 0083eb8644a..75c6a21caa3 100644
--- a/addons/crm/wizard/__init__.py
+++ b/addons/crm/wizard/__init__.py
@@ -25,7 +25,6 @@ import crm_email_add_cc
import crm_lead_to_partner
import crm_lead_to_opportunity
import crm_opportunity_to_phonecall
-
import crm_partner_to_opportunity
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_sale/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
similarity index 96%
rename from addons/crm_sale/wizard/crm_lead_to_opportunity.py
rename to addons/crm/wizard/crm_lead_to_opportunity.py
index 5aef886ab5c..c8cce059f09 100644
--- a/addons/crm_sale/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -62,10 +62,10 @@ class crm_lead2opportunity(osv.osv_memory):
model_obj = self.pool.get('ir.model')
# Get Opportunity views
- result = data_obj._get_id(cr, uid, 'crm_sale', 'view_crm_case_opportunities_filter')
+ result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_opportunities_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
- id2 = data_obj._get_id(cr, uid, 'crm_sale', 'crm_case_form_view_oppor')
- id3 = data_obj._get_id(cr, uid, 'crm_sale', 'crm_case_tree_view_oppor')
+ id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_oppor')
+ id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_oppor')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
@@ -182,6 +182,7 @@ Leads Could not convert into Opportunity"))
crm_lead2opportunity()
+
class crm_lead2opportunity_partner(osv.osv_memory):
_name = 'crm.lead2opportunity.partner'
_description = 'Lead To Opportunity Partner'
@@ -247,8 +248,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
res = mod_obj.read(cr, uid, result, ['res_id'])
value = {}
data_obj = self.pool.get('ir.model.data')
- data_id = data_obj._get_id(cr, uid, 'crm_sale', 'view_crm_lead2opportunity_create')
-
+ data_id = data_obj._get_id(cr, uid, 'crm', 'view_crm_lead2opportunity_create')
view_id = False
if data_id:
view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
@@ -280,7 +280,7 @@ class crm_lead2opportunity_partner(osv.osv_memory):
"""
value = {}
data_obj = self.pool.get('ir.model.data')
- data_id = data_obj._get_id(cr, uid, 'crm_sale', 'view_crm_lead2opportunity_create')
+ data_id = data_obj._get_id(cr, uid, 'crm', 'view_crm_lead2opportunity_create')
view_id = False
if data_id:
view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
diff --git a/addons/crm_sale/wizard/crm_lead_to_opportunity_view.xml b/addons/crm/wizard/crm_lead_to_opportunity_view.xml
similarity index 100%
rename from addons/crm_sale/wizard/crm_lead_to_opportunity_view.xml
rename to addons/crm/wizard/crm_lead_to_opportunity_view.xml
diff --git a/addons/crm_sale/wizard/crm_lead_to_partner.py b/addons/crm/wizard/crm_lead_to_partner.py
similarity index 100%
rename from addons/crm_sale/wizard/crm_lead_to_partner.py
rename to addons/crm/wizard/crm_lead_to_partner.py
diff --git a/addons/crm_sale/wizard/crm_lead_to_partner_view.xml b/addons/crm/wizard/crm_lead_to_partner_view.xml
similarity index 100%
rename from addons/crm_sale/wizard/crm_lead_to_partner_view.xml
rename to addons/crm/wizard/crm_lead_to_partner_view.xml
diff --git a/addons/crm_sale/wizard/crm_opportunity_to_phonecall.py b/addons/crm/wizard/crm_opportunity_to_phonecall.py
similarity index 85%
rename from addons/crm_sale/wizard/crm_opportunity_to_phonecall.py
rename to addons/crm/wizard/crm_opportunity_to_phonecall.py
index 73046fb4007..ffe91a927d2 100644
--- a/addons/crm_sale/wizard/crm_opportunity_to_phonecall.py
+++ b/addons/crm/wizard/crm_opportunity_to_phonecall.py
@@ -29,10 +29,10 @@ class crm_opportunity2phonecall(osv.osv_memory):
_description = 'Opportunity to Phonecall'
_columns = {
- 'name' : fields.char('Call summary', size=64, required=True, select=1),
- 'user_id' : fields.many2one('res.users', "Assign To"),
- 'date': fields.datetime('Date' , required=True),
- 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
+ 'name' : fields.char('Call summary', size=64, required=True, select=1),
+ 'user_id' : fields.many2one('res.users', "Assign To"),
+ 'date': fields.datetime('Date' , required=True),
+ 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
def default_get(self, cr, uid, fields, context=None):
@@ -43,9 +43,9 @@ class crm_opportunity2phonecall(osv.osv_memory):
@param uid: the current user’s ID for security checks,
@param fields: List of fields for default value
@param context: A standard dictionary for contextual values
+
@return : default values of fields.
"""
-
opp_obj = self.pool.get('crm.opportunity')
record_ids = context and context.get('active_ids', []) or []
res = super(crm_opportunity2phonecall, self).default_get(cr, uid, fields, context=context)
@@ -92,7 +92,7 @@ class crm_opportunity2phonecall(osv.osv_memory):
data_obj = self.pool.get('ir.model.data')
categ_id = mod_obj._get_id(cr, uid, 'crm', 'categ_phone1')
categ_id = data_obj.browse(cr, uid, categ_id, context=context).res_id
-
+
# Select the view
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_tree_view')
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_form_view')
@@ -104,31 +104,32 @@ class crm_opportunity2phonecall(osv.osv_memory):
for this in self.browse(cr, uid, ids, context=context):
for opp in opp_obj.browse(cr, uid, record_ids, context=context):
new_case = phonecall_obj.create(cr, uid, {
- 'name' : opp.name,
- 'case_id' : opp.id ,
- 'user_id' : this.user_id and this.user_id.id or False,
- 'categ_id' : categ_id,
- 'description' : opp.description or False,
- 'date' : this.date,
- 'section_id' : opp.section_id and opp.section_id.id or False,
- 'partner_id': opp.partner_id and opp.partner_id.id or False,
- 'partner_address_id': opp.partner_address_id and opp.partner_address_id.id or False,
- 'partner_phone' : opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False),
- 'partner_mobile' : opp.partner_address_id and opp.partner_address_id.mobile or False,
- 'priority': opp.priority,
+ 'name' : opp.name,
+ 'case_id' : opp.id ,
+ 'user_id' : this.user_id and this.user_id.id or False,
+ 'categ_id' : categ_id,
+ 'description' : opp.description or False,
+ 'date' : this.date,
+ 'section_id' : opp.section_id and opp.section_id.id or False,
+ 'partner_id': opp.partner_id and opp.partner_id.id or False,
+ 'partner_address_id': opp.partner_address_id and opp.partner_address_id.id or False,
+ 'partner_phone' : opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False),
+ 'partner_mobile' : opp.partner_address_id and opp.partner_address_id.mobile or False,
+ 'priority': opp.priority,
'opp_id': opp.id
}, context=context)
phonecall_obj.case_open(cr, uid, [new_case])
value = {
- 'name': _('Phone Call'),
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'crm.phonecall',
- 'res_id' : new_case,
- 'views': [(id3, 'form'), (id2, 'tree'), (False, 'calendar'), (False, 'graph')],
- 'type': 'ir.actions.act_window',
+ 'name': _('Phone Call'),
+ 'domain': "[('user_id','=',%s),('opportunity_id','=',%s)]" % (uid,opp.id),
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'crm.phonecall',
+ 'res_id' : new_case,
+ 'views': [(id3, 'form'), (id2, 'tree'), (False, 'calendar'), (False, 'graph')],
+ 'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
return value
diff --git a/addons/crm_sale/wizard/crm_opportunity_to_phonecall_view.xml b/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml
similarity index 100%
rename from addons/crm_sale/wizard/crm_opportunity_to_phonecall_view.xml
rename to addons/crm/wizard/crm_opportunity_to_phonecall_view.xml
diff --git a/addons/crm_sale/__init__.py b/addons/crm_sale/__init__.py
deleted file mode 100644
index 9e87d6f4cc5..00000000000
--- a/addons/crm_sale/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_lead
-import crm_opportunity
-import wizard
-import report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_sale/__openerp__.py b/addons/crm_sale/__openerp__.py
deleted file mode 100644
index bdcfbcc4c2d..00000000000
--- a/addons/crm_sale/__openerp__.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-
-{
- 'name': 'Customer & Supplier Relationship Management',
- 'version': '1.0',
- 'category': 'Generic Modules/CRM & SRM',
- 'description': """Lead and business Opportunity """,
-
- 'author': 'Tiny',
- 'website': 'http://www.openerp.com',
- 'depends': ['crm'],
- 'init_xml': [
- 'crm_lead_data.xml',
- 'crm_opportunity_data.xml',
- ],
- 'update_xml': [
- 'wizard/crm_lead_to_partner_view.xml',
- 'wizard/crm_lead_to_opportunity_view.xml',
- 'wizard/crm_opportunity_to_phonecall_view.xml',
- 'crm_lead_view.xml',
- 'crm_lead_menu.xml',
- 'crm_opportunity_view.xml',
- 'crm_opportunity_menu.xml',
- ],
- 'demo_xml': [
- 'crm_lead_demo.xml',
- 'crm_opportunity_demo.xml',
- ],
- 'test': ['test/test_crm_lead.yml',
- #'test/test_crm_opportunity.yml',
- ],
- 'installable': True,
- 'active': False,
- 'certificate': '0079056041421',
-}
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_sale/report/__init__.py b/addons/crm_sale/report/__init__.py
deleted file mode 100644
index 7c8912e1ea5..00000000000
--- a/addons/crm_sale/report/__init__.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-#import report_businessopp
-#import crm_report
-#import crm_claim_report
-import crm_lead_report
-#import crm_phonecall_report
-#import crm_fundraising_report
-import crm_opportunity_report
-#import crm_helpdesk_report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_sale/security/ir.model.access.csv b/addons/crm_sale/security/ir.model.access.csv
deleted file mode 100644
index ece648be92f..00000000000
--- a/addons/crm_sale/security/ir.model.access.csv
+++ /dev/null
@@ -1,8 +0,0 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_manager",1,1,1,1
-"access_crm_opportunity","crm.opportunity","model_crm_opportunity","crm.group_crm_manager",1,1,1,1
-"access_crm_lead_report_user","crm.lead.report","model_crm_lead_report","crm.group_crm_user",1,0,0,0
-"access_crm_opportunity_report_user","crm.opportunity.report","model_crm_opportunity_report","crm.group_crm_user",1,0,0,0
-"access_crm_lead2partner","crm.lead2partner","model_crm_lead2partner","crm.group_crm_user",1,1,1,1
-"access_crm_lead2opportunity","crm.lead2opportunity","model_crm_lead2opportunity","crm.group_crm_user",1,1,1,1
-"access_crm_lead2opportunity_partner","crm.lead2opportunity.partner","model_crm_lead2opportunity_partner","crm.group_crm_user",1,1,1,1
diff --git a/addons/crm_sale/wizard/__init__.py b/addons/crm_sale/wizard/__init__.py
deleted file mode 100644
index 58a13f8c1e4..00000000000
--- a/addons/crm_sale/wizard/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_lead_to_partner
-import crm_lead_to_opportunity
-import crm_opportunity_to_phonecall
-#import crm_phonecall_to_phonecall
-#import crm_phonecall_to_partner
-#import crm_phonecall_to_opportunity
-#import crm_partner_to_opportunity
\ No newline at end of file
diff --git a/addons/sale_crm/__openerp__.py b/addons/sale_crm/__openerp__.py
index 187d0f401ed..045afbbd82c 100644
--- a/addons/sale_crm/__openerp__.py
+++ b/addons/sale_crm/__openerp__.py
@@ -38,7 +38,7 @@ crm modules.
'website': 'http://www.openerp.com',
'depends': ['sale', 'crm'],
'init_xml': [],
- 'update_xml': ['wizard/crm_make_sale_view.xml',
+ 'update_xml': ['sale_crm_wizard.xml',
'sale_crm_view.xml',
'process/sale_crm_process.xml',
'security/sale_crm_security.xml',
diff --git a/addons/sale_crm/sale_crm_view.xml b/addons/sale_crm/sale_crm_view.xml
index 0c997e506d3..24912052190 100644
--- a/addons/sale_crm/sale_crm_view.xml
+++ b/addons/sale_crm/sale_crm_view.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/addons/sale_crm/sale_crm_wizard.xml b/addons/sale_crm/sale_crm_wizard.xml
new file mode 100644
index 00000000000..74dcf06e901
--- /dev/null
+++ b/addons/sale_crm/sale_crm_wizard.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
diff --git a/addons/sale_crm/wizard/__init__.py b/addons/sale_crm/wizard/__init__.py
index 04f40c92207..87048a13fc4 100644
--- a/addons/sale_crm/wizard/__init__.py
+++ b/addons/sale_crm/wizard/__init__.py
@@ -19,7 +19,7 @@
#
##############################################################################
-import crm_make_sale
+import makesale
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
deleted file mode 100644
index 01480b3f6df..00000000000
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ /dev/null
@@ -1,177 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import fields, osv
-from tools.translate import _
-from mx.DateTime import now
-
-class crm_make_sale(osv.osv_memory):
- """ Make sale order for crm """
-
- _name = "crm.make.sale"
- _description = "Make sale"
-
- def _selectPartner(self, cr, uid, context=None):
- """
- This function gets default value for partner_id field.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values
- @return : default value of partner_id field.
- """
-
- if not context:
- context = {}
-
- data = context and context.get('active_ids', []) or []
- case_obj = self.pool.get('crm.opportunity')
- case = case_obj.read(cr, uid, data, ['partner_id'])
- return case[0]['partner_id']
-
- def makeOrder(self, cr, uid, ids, context=None):
- """
- This function create Quotation on given case.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of crm make sale' ids
- @param context: A standard dictionary for contextual values
- @return : Dictionary value of created sale order.
- """
- if not context:
- context = {}
-
- mod_obj = self.pool.get('ir.model.data')
- result = mod_obj._get_id(cr, uid, 'sale', 'view_sales_order_filter')
- id = mod_obj.read(cr, uid, result, ['res_id'])
- case_obj = self.pool.get('crm.opportunity')
- sale_obj = self.pool.get('sale.order')
- partner_obj = self.pool.get('res.partner')
- sale_line_obj = self.pool.get('sale.order.line')
-
- data = context and context.get('active_ids', []) or []
-
- for make in self.browse(cr, uid, ids):
- default_partner_addr = partner_obj.address_get(cr, uid, [make.partner_id.id],
- ['invoice', 'delivery', 'contact'])
- default_pricelist = partner_obj.browse(cr, uid, make.partner_id.id,
- context).property_product_pricelist.id
- fpos_data = partner_obj.browse(cr, uid, make.partner_id.id, context).property_account_position
- new_ids = []
-
- for case in case_obj.browse(cr, uid, data):
- if case.partner_id and case.partner_id.id:
- partner_id = case.partner_id.id
- fpos = case.partner_id.property_account_position and case.partner_id.property_account_position.id or False
- partner_addr = partner_obj.address_get(cr, uid, [case.partner_id.id],
- ['invoice', 'delivery', 'contact'])
- pricelist = partner_obj.browse(cr, uid, case.partner_id.id,
- context).property_product_pricelist.id
- else:
- partner_id = make.partner_id.id
- fpos = fpos_data and fpos_data.id or False
- partner_addr = default_partner_addr
- pricelist = default_pricelist
-
- if False in partner_addr.values():
- raise osv.except_osv(_('Data Insufficient!'),_('Customer has no addresses defined!'))
-
- vals = {
- 'origin': 'CRM-Opportunity:%s' % str(case.id),
- 'section_id': case.section_id and case.section_id.id or False,
- 'picking_policy': make.picking_policy,
- 'shop_id': make.shop_id.id,
- 'partner_id': partner_id,
- 'pricelist_id': pricelist,
- 'partner_invoice_id': partner_addr['invoice'],
- 'partner_order_id': partner_addr['contact'],
- 'partner_shipping_id': partner_addr['delivery'],
- 'order_policy': 'manual',
- 'date_order': now(),
- 'fiscal_position': fpos,
- }
-
- if partner_id:
- partner = partner_obj.browse(cr, uid, partner_id, context=context)
- vals['user_id'] = partner.user_id and partner.user_id.id or uid
-
- if make.analytic_account.id:
- vals['project_id'] = make.analytic_account.id
- new_id = sale_obj.create(cr, uid, vals)
- for product_id in make.product_ids:
- value = sale_line_obj.product_id_change(cr, uid, [], pricelist,
- product_id.id, qty=1, partner_id=partner_id, fiscal_position=fpos)['value']
- value['product_id'] = product_id.id
- value['order_id'] = new_id
- value['tax_id'] = [(6,0,value['tax_id'])]
- sale_line_obj.create(cr, uid, value)
-
- case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
- new_ids.append(new_id)
-
- if make.close:
- case_obj.case_close(cr, uid, data)
-
- if not new_ids:
- return {}
- if len(new_ids)<=1:
- value = {
- 'domain': str([('id', 'in', new_ids)]),
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'sale.order',
- 'view_id': False,
- 'type': 'ir.actions.act_window',
- 'res_id': new_ids and new_ids[0]
- }
- else:
- value = {
- 'domain': str([('id', 'in', new_ids)]),
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'sale.order',
- 'view_id': False,
- 'type': 'ir.actions.act_window',
- 'res_id':new_ids
- }
- return value
-
- _columns = {
- 'shop_id': fields.many2one('sale.shop', 'Shop', required = True),
- 'partner_id': fields.many2one('res.partner', 'Customer', required = True, help = 'Use this partner if there is no partner on the case'),
- 'picking_policy': fields.selection([('direct','Direct Delivery'),
- ('one','All at once')], 'Picking Policy', required = True),
- 'product_ids': fields.many2many('product.product', 'product_sale_rel',\
- 'sale_id', 'product_id', 'Products'),
- 'analytic_account': fields.many2one('account.analytic.account', 'Analytic Account'),
- 'close': fields.boolean('Close Case', help = 'Check this to close the case after having created the sale order.'),
- }
- _defaults = {
- 'partner_id': _selectPartner,
- 'close': lambda *a: 1
- }
-
-crm_make_sale()
-
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_crm/wizard/crm_make_sale_view.xml b/addons/sale_crm/wizard/crm_make_sale_view.xml
deleted file mode 100644
index de6a29e5405..00000000000
--- a/addons/sale_crm/wizard/crm_make_sale_view.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
- crm.make.sale.form
- crm.make.sale
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Make Quotation
- ir.actions.act_window
- crm.make.sale
- form
- form
- new
-
-
-
-
diff --git a/addons/sale_crm/wizard/makesale.py b/addons/sale_crm/wizard/makesale.py
new file mode 100644
index 00000000000..c6dc12abf11
--- /dev/null
+++ b/addons/sale_crm/wizard/makesale.py
@@ -0,0 +1,174 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from mx.DateTime import now
+
+import wizard
+import netsvc
+import ir
+import pooler
+from tools.translate import _
+
+sale_form = """
+
+
+
+
+
+
+
+
+ """
+
+sale_fields = {
+ 'shop_id': {'string': 'Shop', 'type': 'many2one', 'relation': 'sale.shop'},
+ 'partner_id': {'string': 'Customer', 'type': 'many2one',
+ 'relation': 'res.partner',
+ 'help': 'Use this partner if there is no partner on the case'},
+ 'picking_policy': {'string': 'Picking Policy', 'type': 'selection',
+ 'selection': [('direct','Direct Delivery'),('one','All at once')]},
+ 'products': {'string': 'Products', 'type': 'many2many',
+ 'relation': 'product.product'},
+ 'analytic_account': {'string': 'Analytic Account', 'type': 'many2one',
+ 'relation': 'account.analytic.account'},
+ 'close': {'string': 'Close Case', 'type': 'boolean', 'default': lambda *a: 1,
+ 'help': 'Check this to close the case after having created the sale order.'},
+}
+
+
+class make_sale(wizard.interface):
+
+ def _selectPartner(self, cr, uid, data, context):
+ case_obj = pooler.get_pool(cr.dbname).get('crm.opportunity')
+ case = case_obj.read(cr, uid, data['ids'], ['partner_id'])
+ return {'partner_id': case[0]['partner_id']}
+
+ def _makeOrder(self, cr, uid, data, context):
+ pool = pooler.get_pool(cr.dbname)
+ mod_obj = pool.get('ir.model.data')
+ result = mod_obj._get_id(cr, uid, 'sale', 'view_sales_order_filter')
+ id = mod_obj.read(cr, uid, result, ['res_id'])
+ case_obj = pool.get('crm.opportunity')
+ sale_obj = pool.get('sale.order')
+ partner_obj = pool.get('res.partner')
+ sale_line_obj = pool.get('sale.order.line')
+
+ default_partner_addr = partner_obj.address_get(cr, uid, [data['form']['partner_id']],
+ ['invoice', 'delivery', 'contact'])
+ default_pricelist = partner_obj.browse(cr, uid, data['form']['partner_id'],
+ context).property_product_pricelist.id
+ fpos_data = partner_obj.browse(cr, uid, data['form']['partner_id'],context).property_account_position
+ new_ids = []
+
+ for case in case_obj.browse(cr, uid, data['ids']):
+ if case.partner_id and case.partner_id.id:
+ partner_id = case.partner_id.id
+ fpos = case.partner_id.property_account_position and case.partner_id.property_account_position.id or False
+ partner_addr = partner_obj.address_get(cr, uid, [case.partner_id.id],
+ ['invoice', 'delivery', 'contact'])
+ pricelist = partner_obj.browse(cr, uid, case.partner_id.id,
+ context).property_product_pricelist.id
+ else:
+ partner_id = data['form']['partner_id']
+ fpos = fpos_data and fpos_data.id or False
+ partner_addr = default_partner_addr
+ pricelist = default_pricelist
+
+ if False in partner_addr.values():
+ raise wizard.except_wizard(_('Data Insufficient!'),_('Customer has no addresses defined!'))
+
+ vals = {
+ 'origin': 'CRM-Opportunity:%s' % str(case.id),
+ 'section_id': case.section_id and case.section_id.id or False,
+ 'picking_policy': data['form']['picking_policy'],
+ 'shop_id': data['form']['shop_id'],
+ 'partner_id': partner_id,
+ 'pricelist_id': pricelist,
+ 'partner_invoice_id': partner_addr['invoice'],
+ 'partner_order_id': partner_addr['contact'],
+ 'partner_shipping_id': partner_addr['delivery'],
+ 'order_policy': 'manual',
+ 'date_order': now(),
+ 'fiscal_position': fpos,
+ }
+
+ if partner_id:
+ partner = partner_obj.browse(cr, uid, partner_id, context=context)
+ vals['user_id'] = partner.user_id and partner.user_id.id or uid
+
+ if data['form']['analytic_account']:
+ vals['project_id'] = data['form']['analytic_account']
+ new_id = sale_obj.create(cr, uid, vals)
+ for product_id in data['form']['products'][0][2]:
+ value = sale_line_obj.product_id_change(cr, uid, [], pricelist,
+ product_id, qty=1, partner_id=partner_id, fiscal_position=fpos)['value']
+ value['product_id'] = product_id
+ value['order_id'] = new_id
+ value['tax_id'] = [(6,0,value['tax_id'])]
+ sale_line_obj.create(cr, uid, value)
+
+ case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
+ new_ids.append(new_id)
+
+ if data['form']['close']:
+ case_obj.case_close(cr, uid, data['ids'])
+
+ if not new_ids:
+ return {}
+
+ if len(new_ids)<=1:
+ value = {
+ 'domain': str([('id', 'in', new_ids)]),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'sale.order',
+ 'view_id': False,
+ 'type': 'ir.actions.act_window',
+ 'res_id': new_ids and new_ids[0]
+ }
+ else:
+ value = {
+ 'domain': str([('id', 'in', new_ids)]),
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'sale.order',
+ 'view_id': False,
+ 'type': 'ir.actions.act_window',
+ 'res_id':new_ids
+ }
+
+ return value
+
+ states = {
+ 'init': {
+ 'actions': [_selectPartner],
+ 'result': {'type': 'form', 'arch': sale_form, 'fields': sale_fields,
+ 'state' : [('end', 'Cancel', 'gtk-cancel'),('order', 'Create Quote', 'gtk-go-forward')]}
+ },
+ 'order': {
+ 'actions': [],
+ 'result': {'type': 'action', 'action': _makeOrder, 'state': 'end'}
+ }
+ }
+
+make_sale('crm.opportunity.make_order')
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
From 7bdd473fa5603c2722648db4693edce6eaea061a Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Wed, 28 Apr 2010 12:16:29 +0530
Subject: [PATCH 050/148] [REM]: Revert all changes because combine crm lead
and opportunity in crm.
bzr revid: atp@tinyerp.co.in-20100428064629-r6zlgsa88ruxr43d
---
addons/crm_sale/__init__.py | 28 --
addons/crm_sale/__openerp__.py | 56 ---
addons/crm_sale/crm_lead.py | 210 -----------
addons/crm_sale/crm_lead_data.xml | 81 -----
addons/crm_sale/crm_lead_demo.xml | 112 ------
addons/crm_sale/crm_lead_menu.xml | 33 --
addons/crm_sale/crm_lead_view.xml | 331 ------------------
addons/crm_sale/crm_opportunity.py | 251 -------------
addons/crm_sale/crm_opportunity_data.xml | 95 -----
addons/crm_sale/crm_opportunity_demo.xml | 88 -----
addons/crm_sale/crm_opportunity_menu.xml | 57 ---
addons/crm_sale/crm_opportunity_view.xml | 329 -----------------
addons/crm_sale/report/__init__.py | 32 --
addons/crm_sale/report/crm_lead_report.py | 88 -----
.../crm_sale/report/crm_lead_report_view.xml | 116 ------
.../crm_sale/report/crm_opportunity_report.py | 102 ------
.../report/crm_opportunity_report_view.xml | 122 -------
addons/crm_sale/security/ir.model.access.csv | 8 -
addons/crm_sale/test/test_crm_lead.yml | 113 ------
addons/crm_sale/test/test_crm_opportunity.yml | 81 -----
addons/crm_sale/wizard/__init__.py | 28 --
.../wizard/crm_lead_to_opportunity.py | 327 -----------------
.../wizard/crm_lead_to_opportunity_view.xml | 63 ----
addons/crm_sale/wizard/crm_lead_to_partner.py | 216 ------------
.../wizard/crm_lead_to_partner_view.xml | 53 ---
.../wizard/crm_opportunity_to_phonecall.py | 138 --------
.../crm_opportunity_to_phonecall_view.xml | 41 ---
27 files changed, 3199 deletions(-)
delete mode 100644 addons/crm_sale/__init__.py
delete mode 100644 addons/crm_sale/__openerp__.py
delete mode 100644 addons/crm_sale/crm_lead.py
delete mode 100644 addons/crm_sale/crm_lead_data.xml
delete mode 100644 addons/crm_sale/crm_lead_demo.xml
delete mode 100644 addons/crm_sale/crm_lead_menu.xml
delete mode 100644 addons/crm_sale/crm_lead_view.xml
delete mode 100644 addons/crm_sale/crm_opportunity.py
delete mode 100644 addons/crm_sale/crm_opportunity_data.xml
delete mode 100644 addons/crm_sale/crm_opportunity_demo.xml
delete mode 100644 addons/crm_sale/crm_opportunity_menu.xml
delete mode 100644 addons/crm_sale/crm_opportunity_view.xml
delete mode 100644 addons/crm_sale/report/__init__.py
delete mode 100644 addons/crm_sale/report/crm_lead_report.py
delete mode 100644 addons/crm_sale/report/crm_lead_report_view.xml
delete mode 100644 addons/crm_sale/report/crm_opportunity_report.py
delete mode 100644 addons/crm_sale/report/crm_opportunity_report_view.xml
delete mode 100644 addons/crm_sale/security/ir.model.access.csv
delete mode 100644 addons/crm_sale/test/test_crm_lead.yml
delete mode 100644 addons/crm_sale/test/test_crm_opportunity.yml
delete mode 100644 addons/crm_sale/wizard/__init__.py
delete mode 100644 addons/crm_sale/wizard/crm_lead_to_opportunity.py
delete mode 100644 addons/crm_sale/wizard/crm_lead_to_opportunity_view.xml
delete mode 100644 addons/crm_sale/wizard/crm_lead_to_partner.py
delete mode 100644 addons/crm_sale/wizard/crm_lead_to_partner_view.xml
delete mode 100644 addons/crm_sale/wizard/crm_opportunity_to_phonecall.py
delete mode 100644 addons/crm_sale/wizard/crm_opportunity_to_phonecall_view.xml
diff --git a/addons/crm_sale/__init__.py b/addons/crm_sale/__init__.py
deleted file mode 100644
index 9e87d6f4cc5..00000000000
--- a/addons/crm_sale/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_lead
-import crm_opportunity
-import wizard
-import report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_sale/__openerp__.py b/addons/crm_sale/__openerp__.py
deleted file mode 100644
index bdcfbcc4c2d..00000000000
--- a/addons/crm_sale/__openerp__.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-
-{
- 'name': 'Customer & Supplier Relationship Management',
- 'version': '1.0',
- 'category': 'Generic Modules/CRM & SRM',
- 'description': """Lead and business Opportunity """,
-
- 'author': 'Tiny',
- 'website': 'http://www.openerp.com',
- 'depends': ['crm'],
- 'init_xml': [
- 'crm_lead_data.xml',
- 'crm_opportunity_data.xml',
- ],
- 'update_xml': [
- 'wizard/crm_lead_to_partner_view.xml',
- 'wizard/crm_lead_to_opportunity_view.xml',
- 'wizard/crm_opportunity_to_phonecall_view.xml',
- 'crm_lead_view.xml',
- 'crm_lead_menu.xml',
- 'crm_opportunity_view.xml',
- 'crm_opportunity_menu.xml',
- ],
- 'demo_xml': [
- 'crm_lead_demo.xml',
- 'crm_opportunity_demo.xml',
- ],
- 'test': ['test/test_crm_lead.yml',
- #'test/test_crm_opportunity.yml',
- ],
- 'installable': True,
- 'active': False,
- 'certificate': '0079056041421',
-}
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_sale/crm_lead.py b/addons/crm_sale/crm_lead.py
deleted file mode 100644
index 55da349250b..00000000000
--- a/addons/crm_sale/crm_lead.py
+++ /dev/null
@@ -1,210 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import fields, osv, orm
-from datetime import datetime, timedelta
-import crm
-import math
-import time
-import mx.DateTime
-from tools.translate import _
-
-
-AVAILABLE_PRIORITIES = [
- ('5', 'Lowest'),
- ('4', 'Low'),
- ('3', 'Normal'),
- ('2', 'High'),
- ('1', 'Highest')
-]
-
-class crm_lead(osv.osv):
- """ CRM Lead Case """
-
- _name = "crm.lead"
- _description = "Leads Cases"
- _order = "priority, id desc"
- _inherit = ['res.partner.address', 'crm.case']
-
- def case_open(self, cr, uid, ids, *args):
- """
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of case's Ids
- @param *args: Give Tuple Value
- """
-
- res = super(crm_lead, self).case_open(cr, uid, ids, *args)
- self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
- return res
-
- def _compute_day(self, cr, uid, ids, fields, args, context={}):
- """
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Openday’s IDs
- @return: difference between current date and log date
- @param context: A standard dictionary for contextual values
- """
- cal_obj = self.pool.get('resource.calendar')
- res_obj = self.pool.get('resource.resource')
-
- res = {}
- for lead in self.browse(cr, uid, ids , context):
- for field in fields:
- res[lead.id] = {}
- duration = 0
- ans = False
- if field == 'day_open':
- if lead.date_open:
- date_create = datetime.strptime(lead.create_date, "%Y-%m-%d %H:%M:%S")
- date_open = datetime.strptime(lead.date_open, "%Y-%m-%d %H:%M:%S")
- ans = date_open - date_create
- date_until = lead.date_open
- elif field == 'day_close':
- if lead.date_closed:
- date_create = datetime.strptime(lead.create_date, "%Y-%m-%d %H:%M:%S")
- date_close = datetime.strptime(lead.date_closed, "%Y-%m-%d %H:%M:%S")
- date_until = lead.date_closed
- ans = date_close - date_create
- if ans:
- resource_id = False
- if lead.user_id:
- resource_ids = res_obj.search(cr, uid, [('user_id','=',lead.user_id.id)])
- if len(resource_ids):
- resource_id = resource_ids[0]
-
- duration = float(ans.days)
- if lead.section_id.resource_calendar_id:
- duration = float(ans.days) * 24
- new_dates = cal_obj.interval_get(cr,
- uid,
- lead.section_id.resource_calendar_id and lead.section_id.resource_calendar_id.id or False,
- mx.DateTime.strptime(lead.create_date, '%Y-%m-%d %H:%M:%S'),
- duration,
- resource=resource_id
- )
- no_days = []
- date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
- for in_time, out_time in new_dates:
- if in_time.date not in no_days:
- no_days.append(in_time.date)
- if out_time > date_until:
- break
- duration = len(no_days)
- res[lead.id][field] = abs(int(duration))
- return res
-
- _columns = {
-
- 'categ_id': fields.many2one('crm.case.categ', 'Lead Source', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.opportunity')]"),
- 'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.lead')]"),
- 'partner_name': fields.char("Contact Name", size=64),
-
- 'priority': fields.selection([('5', 'Lowest'),
- ('4', 'Low'),
- ('3', 'Normal'),
- ('2', 'High'),
- ('1', 'Highest')], 'Priority'),
- 'date_closed': fields.datetime('Closed', readonly=True),
- 'stage_id': fields.many2one('crm.case.stage', 'Stage', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.lead')]"),
- 'opportunity_id': fields.many2one('crm.opportunity', 'Opportunity'),
-
- 'user_id': fields.many2one('res.users', 'Salesman'),
- 'referred': fields.char('Referred By', size=64),
- 'date_open': fields.datetime('Opened', readonly=True),
- 'day_open': fields.function(_compute_day, string='Days to Open', \
- method=True, multi='day_open', type="float", store=True),
- 'day_close': fields.function(_compute_day, string='Days to Close', \
- method=True, multi='day_close', type="float", store=True),
- 'function_name': fields.char('Function', size=64),
- }
-
- _defaults = {
- 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
- # 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
- }
-
- def convert_opportunity(self, cr, uid, ids, context=None):
- """ Precomputation for converting lead to opportunity
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of closeday’s IDs
- @param context: A standard dictionary for contextual values
- @return: Value of action in dict
- """
- if not context:
- context = {}
- context.update({'active_ids': ids})
-
- data_obj = self.pool.get('ir.model.data')
- data_id = data_obj._get_id(cr, uid, 'crm_sale', 'view_crm_lead2opportunity_create')
- value = {}
-
- view_id = False
- if data_id:
- view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
- for case in self.browse(cr, uid, ids):
- context.update({'opportunity_id': case.id})
- context.update({'active_id': case.id})
- if not case.partner_id:
- data_id = data_obj._get_id(cr, uid, 'crm_sale', 'view_crm_lead2opportunity_partner')
- view_id1 = False
- if data_id:
- view_id1 = data_obj.browse(cr, uid, data_id, context=context).res_id
- value = {
- 'name': _('Create Partner'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.lead2opportunity.partner',
- 'view_id': False,
- 'context': context,
- 'views': [(view_id1, 'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'nodestroy': True
- }
- break
- else:
- value = {
- 'name': _('Create Opportunity'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.lead2opportunity',
- 'view_id': False,
- 'context': context,
- 'views': [(view_id, 'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'nodestroy': True
- }
- return value
-
-crm_lead()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_sale/crm_lead_data.xml b/addons/crm_sale/crm_lead_data.xml
deleted file mode 100644
index cf0a2671dc0..00000000000
--- a/addons/crm_sale/crm_lead_data.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-
-
-
-
-
- New
-
-
-
-
- Assigned
-
-
-
-
- In Process
-
-
-
-
- Converted
-
-
-
-
- Recycled
-
-
-
-
- Dead
-
-
-
-
-
-
- Telesales
-
-
-
-
- Mail
-
-
-
-
- Email
-
-
-
-
- Print
-
-
-
-
- Web
-
-
-
-
- Radio
-
-
-
-
- Television
-
-
-
-
- Newsletter
-
-
-
-
-
-
diff --git a/addons/crm_sale/crm_lead_demo.xml b/addons/crm_sale/crm_lead_demo.xml
deleted file mode 100644
index af9d5bbfedb..00000000000
--- a/addons/crm_sale/crm_lead_demo.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/crm_lead_menu.xml b/addons/crm_sale/crm_lead_menu.xml
deleted file mode 100644
index 93faef7dc6e..00000000000
--- a/addons/crm_sale/crm_lead_menu.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- Leads
- crm.lead
- tree,form
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/crm_lead_view.xml b/addons/crm_sale/crm_lead_view.xml
deleted file mode 100644
index c30694ede30..00000000000
--- a/addons/crm_sale/crm_lead_view.xml
+++ /dev/null
@@ -1,331 +0,0 @@
-
-
-
-
-
-
-
- Lead Stages
- crm.case.stage
- form
-
- [('object_id.model', '=', 'crm.lead')]
- {'object_id':'crm.lead'}
-
-
-
-
-
-
- Lead Resource Type
- crm.case.resource.type
- form
-
- [('object_id.model', '=', 'crm.lead')]
- {'object_id':'crm.lead'}
-
-
-
-
-
-
- CRM - Leads Form
- crm.lead
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Leads Tree
- crm.lead
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Leads Calendar
- crm.lead
- calendar
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Leads Search
- crm.lead
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/crm_opportunity.py b/addons/crm_sale/crm_opportunity.py
deleted file mode 100644
index fee205c3439..00000000000
--- a/addons/crm_sale/crm_opportunity.py
+++ /dev/null
@@ -1,251 +0,0 @@
-#-*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-
-from crm.report import crm_report
-from datetime import datetime
-from osv import fields,osv,orm
-from tools.translate import _
-from crm import crm
-import time
-import mx.DateTime
-
-AVAILABLE_STATES = [
- ('draft','Draft'),
- ('open','Open'),
- ('cancel', 'Lost'),
- ('done', 'Converted'),
- ('pending','Pending')
-]
-
-class crm_opportunity(osv.osv):
- """ Opportunity Cases """
-
- _name = "crm.opportunity"
- _description = "Opportunity Cases"
- _order = "priority,date_action,id desc"
- _inherit = 'crm.case'
-
- def case_open(self, cr, uid, ids, *args):
- """
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of case's Ids
- @param *args: Give Tuple Value
- """
-
- res = super(crm_opportunity, self).case_open(cr, uid, ids, *args)
- self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
- return res
-
- def _compute_day(self, cr, uid, ids, fields, args, context={}):
- """
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Openday’s IDs
- @return: difference between current date and log date
- @param context: A standard dictionary for contextual values
- """
- cal_obj = self.pool.get('resource.calendar')
- res_obj = self.pool.get('resource.resource')
-
- res = {}
- for opportunity in self.browse(cr, uid, ids , context):
- for field in fields:
- res[opportunity.id] = {}
- duration = 0
- ans = False
- if field == 'day_open':
- if opportunity.date_open:
- date_create = datetime.strptime(opportunity.create_date, "%Y-%m-%d %H:%M:%S")
- date_open = datetime.strptime(opportunity.date_open, "%Y-%m-%d %H:%M:%S")
- ans = date_open - date_create
- date_until = opportunity.date_open
- elif field == 'day_close':
- if opportunity.date_closed:
- date_create = datetime.strptime(opportunity.create_date, "%Y-%m-%d %H:%M:%S")
- date_close = datetime.strptime(opportunity.date_closed, "%Y-%m-%d %H:%M:%S")
- date_until = opportunity.date_closed
- ans = date_close - date_create
- if ans:
- resource_id = False
- if opportunity.user_id:
- resource_ids = res_obj.search(cr, uid, [('user_id','=',opportunity.user_id.id)])
- if resource_ids and len(resource_ids):
- resource_id = resource_ids[0]
-
- duration = float(ans.days)
- if opportunity.section_id.resource_calendar_id:
- duration = float(ans.days) * 24
- new_dates = cal_obj.interval_get(cr,
- uid,
- opportunity.section_id.resource_calendar_id and opportunity.section_id.resource_calendar_id.id or False,
- mx.DateTime.strptime(opportunity.create_date, '%Y-%m-%d %H:%M:%S'),
- duration,
- resource=resource_id
- )
- no_days = []
- date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
- for in_time, out_time in new_dates:
- if in_time.date not in no_days:
- no_days.append(in_time.date)
- if out_time > date_until:
- break
- duration = len(no_days)
- res[opportunity.id][field] = abs(int(duration))
- return res
-
- _columns = {
- 'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.opportunity')]"),
- 'categ_id': fields.many2one('crm.case.categ', 'Category', \
- domain="[('section_id','=',section_id), \
- ('object_id.model', '=', 'crm.opportunity')]"),
- 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
- 'referred': fields.char('Referred By', size=64),
- 'probability': fields.float('Probability (%)'),
- 'planned_revenue': fields.float('Expected Revenue'),
- 'ref': fields.reference('Reference', selection=crm._links_get, size=128),
- 'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
- 'date_closed': fields.datetime('Closed', readonly=True),
- 'user_id': fields.many2one('res.users', 'Salesman'),
- 'phone': fields.char("Phone", size=64),
- 'date_deadline': fields.date('Expected Closing'),
- 'date_action': fields.date('Next Action'),
- 'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True,
- help='The state is set to \'Draft\', when a case is created.\
- \nIf the case is in progress the state is set to \'Open\'.\
- \nWhen the case is over, the state is set to \'Done\'.\
- \nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
-
- 'date_open': fields.datetime('Opened', readonly=True),
- 'day_open': fields.function(_compute_day, string='Days to Open', \
- method=True, multi='day_open', type="float", store=True),
- 'day_close': fields.function(_compute_day, string='Days to Close', \
- method=True, multi='day_close', type="float", store=True),
- }
-
- def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
-
- """ @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of stage’s IDs
- @stage_id: change state id on run time """
-
- if not stage_id:
- return {'value':{}}
-
- stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
- if not stage.on_change:
- return {'value':{}}
- return {'value':{'probability':stage.probability}}
-
- def stage_next(self, cr, uid, ids, context={}):
-
- """ @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of stage next’s IDs
- @param context: A standard dictionary for contextual values """
-
- res = super(crm_opportunity, self).stage_next(cr, uid, ids, context=context)
- for case in self.browse(cr, uid, ids, context):
- if case.stage_id and case.stage_id.on_change:
- self.write(cr, uid, [case.id], {'probability': case.stage_id.probability})
- return res
-
- def stage_previous(self, cr, uid, ids, context={}):
-
- """ @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of stage previous’s IDs
- @param context: A standard dictionary for contextual values """
-
- res = super(crm_opportunity, self).stage_previous(cr, uid, ids, context=context)
- for case in self.browse(cr, uid, ids, context):
- if case.stage_id and case.stage_id.on_change:
- self.write(cr, uid, [case.id], {'probability': case.stage_id.probability})
- return res
-
- _defaults = {
- 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.opportunity', context=c),
- 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
- 'state' : 'draft',
- }
-
- def action_makeMeeting(self, cr, uid, ids, context=None):
- """
- This opens Meeting's calendar view to schedule meeting on current Opportunity
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Opportunity to Meeting IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Meeting view
- """
- value = {}
- for opp in self.browse(cr, uid, ids):
- data_obj = self.pool.get('ir.model.data')
-
- # Get meeting views
- result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_meetings_filter')
- res = data_obj.read(cr, uid, result, ['res_id'])
- id1 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
- id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
- id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
- if id1:
- id1 = data_obj.browse(cr, uid, id1, context=context).res_id
- if id2:
- id2 = data_obj.browse(cr, uid, id2, context=context).res_id
- if id3:
- id3 = data_obj.browse(cr, uid, id3, context=context).res_id
-
- context = {
- 'default_opportunity_id': opp.id,
- 'default_partner_id': opp.partner_id and opp.partner_id.id or False,
- 'default_section_id': opp.section_id and opp.section_id.id or False,
- 'default_email_from': opp.email_from,
- 'default_state': 'open',
- 'default_name': opp.name
- }
- value = {
- 'name': _('Meetings'),
- 'domain': "[('user_id','=',%s)]" % (uid),
- 'context': context,
- 'view_type': 'form',
- 'view_mode': 'calendar,form,tree',
- 'res_model': 'crm.meeting',
- 'view_id': False,
- 'views': [(id1, 'calendar'), (id2, 'form'), (id3, 'tree')],
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id'],
- 'nodestroy': True
- }
-
- return value
-
-crm_opportunity()
-
diff --git a/addons/crm_sale/crm_opportunity_data.xml b/addons/crm_sale/crm_opportunity_data.xml
deleted file mode 100644
index b914198ab16..00000000000
--- a/addons/crm_sale/crm_opportunity_data.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
- Existing Customer
-
-
-
-
- Self Generated
-
-
-
-
- Employee
-
-
-
-
- Partner
-
-
-
-
- Campaign
-
-
-
-
- Website
-
-
-
-
- Word of mouth
-
-
-
-
- Other
-
-
-
-
-
-
- Prospecting
-
-
-
-
- Needs Analysis
-
-
-
-
- Value Proposition
-
-
-
-
- Proposal/Price Quote
-
-
-
-
- Negotiation/Review
-
-
-
-
- Closed Won
-
-
-
-
- Closed Lost
-
-
-
-
-
-
- Existing Business
-
-
-
-
- New Business
-
-
-
-
-
-
diff --git a/addons/crm_sale/crm_opportunity_demo.xml b/addons/crm_sale/crm_opportunity_demo.xml
deleted file mode 100644
index 0de8f6bbdcc..00000000000
--- a/addons/crm_sale/crm_opportunity_demo.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/crm_opportunity_menu.xml b/addons/crm_sale/crm_opportunity_menu.xml
deleted file mode 100644
index 9e5e3e161ad..00000000000
--- a/addons/crm_sale/crm_opportunity_menu.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
- Opportunities
- crm.opportunity
- tree,form,graph
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- graph
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/crm_opportunity_view.xml b/addons/crm_sale/crm_opportunity_view.xml
deleted file mode 100644
index 6a65c0e510e..00000000000
--- a/addons/crm_sale/crm_opportunity_view.xml
+++ /dev/null
@@ -1,329 +0,0 @@
-
-
-
-
-
-
-
- Opportunity Categories
- crm.case.categ
- form
-
- [('object_id.model', '=', 'crm.opportunity')]
- {'object_id':'crm.opportunity'}
-
-
-
-
-
-
-
- Opportunity Stages
- crm.case.stage
- form
-
- [('object_id.model', '=', 'crm.opportunity')]
- {'object_id':'crm.opportunity'}
-
-
-
-
-
-
-
- Opportunity Resource Type
- crm.case.resource.type
- form
-
- [('object_id.model', '=', 'crm.opportunity')]
- {'object_id':'crm.opportunity'}
-
-
-
-
-
-
-
- Opportunities
- crm.opportunity
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Opportunities Tree
- crm.opportunity
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Opportunity Graph
- crm.opportunity
- graph
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Opportunities Search
- crm.opportunity
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/report/__init__.py b/addons/crm_sale/report/__init__.py
deleted file mode 100644
index 7c8912e1ea5..00000000000
--- a/addons/crm_sale/report/__init__.py
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-#import report_businessopp
-#import crm_report
-#import crm_claim_report
-import crm_lead_report
-#import crm_phonecall_report
-#import crm_fundraising_report
-import crm_opportunity_report
-#import crm_helpdesk_report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_sale/report/crm_lead_report.py b/addons/crm_sale/report/crm_lead_report.py
deleted file mode 100644
index d400700c0b5..00000000000
--- a/addons/crm_sale/report/crm_lead_report.py
+++ /dev/null
@@ -1,88 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import fields,osv
-import tools
-
-AVAILABLE_STATES = [
- ('draft','Draft'),
- ('open','Open'),
- ('cancel', 'Cancelled'),
- ('done', 'Closed'),
- ('pending','Pending')
-]
-
-class crm_lead_report(osv.osv):
- """ CRM Lead Report """
- _name = "crm.lead.report"
- _auto = False
- _inherit = "crm.case.report"
- _description = "CRM Lead Report"
-
- _columns = {
- 'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
- 'categ_id': fields.many2one('crm.case.categ', 'Category',\
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.lead')]" , readonly=True),
- 'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.lead')]", readonly=True),
- 'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
- 'company_id': fields.many2one('res.company', 'Company', readonly=True),
- }
- def init(self, cr):
-
- """
- CRM Lead Report
- @param cr: the current row, from the database cursor
- """
-
- tools.drop_view_if_exists(cr, 'crm_lead_report')
- cr.execute("""
- create or replace view crm_lead_report as (
- select
- min(c.id) as id,
- to_char(c.create_date, 'YYYY') as name,
- to_char(c.create_date, 'MM') as month,
- to_char(c.create_date, 'YYYY-MM-DD') as day,
- c.state as state,
- c.user_id,
- c.stage_id,
- c.company_id,
- c.section_id,
- c.categ_id,
- c.partner_id,
- count(*) as nbr,
- 0 as avg_answers,
- 0.0 as perc_done,
- 0.0 as perc_cancel,
- date_trunc('day',c.create_date) as create_date,
- avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
- from
- crm_lead c
- group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
- c.state, c.user_id,c.section_id,c.stage_id,categ_id,c.partner_id,c.company_id
- ,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
- )""")
-
-crm_lead_report()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_sale/report/crm_lead_report_view.xml b/addons/crm_sale/report/crm_lead_report_view.xml
deleted file mode 100644
index d6502c190d9..00000000000
--- a/addons/crm_sale/report/crm_lead_report_view.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
- crm.lead.report.tree
- crm.lead.report
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.lead.report.form
- crm.lead.report
-
- form
-
-
-
-
-
-
-
-
-
-
-
- crm.lead.report.graph
- crm.lead.report
- graph
-
-
-
-
-
-
-
-
-
-
-
-
- crm.lead.report.select
- crm.lead.report
-
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Leads
- crm.lead.report
- form
- {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}
- tree,graph
-
-
-
-
-
-
- tree
-
-
-
-
-
-
- graph
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/report/crm_opportunity_report.py b/addons/crm_sale/report/crm_opportunity_report.py
deleted file mode 100644
index db67919bf30..00000000000
--- a/addons/crm_sale/report/crm_opportunity_report.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from crm.report import crm_report
-from osv import fields,osv
-import tools
-
-
-AVAILABLE_STATES = [
- ('draft','Draft'),
- ('open','Open'),
- ('cancel', 'Cancelled'),
- ('done', 'Closed'),
- ('pending','Pending')
-]
-
-class crm_opportunity_report(osv.osv):
- """ CRM Opportunity Report """
- _name = "crm.opportunity.report"
- _auto = False
- _inherit = "crm.case.report"
- _description = "CRM Opportunity Report"
- _columns = {
- 'probability': fields.float('Avg. Probability', readonly=True,group_operator='avg'),
- 'amount_revenue': fields.float('Est.Revenue', readonly=True),
- 'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
- 'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
- 'categ_id': fields.many2one('crm.case.categ', 'Category',\
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.opportunity')]", readonly=True),
- 'stage_id':fields.many2one('crm.case.stage', 'Stage',\
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.opportunity')]", readonly=True),
- 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
- 'company_id': fields.many2one('res.company', 'Company', readonly=True),
- 'user_id':fields.many2one('res.users', 'User', readonly=True),
- }
-
- def init(self, cr):
- """ Display Est.Revenue , Average Probability ,Est.Revenue Probability
- @param cr: the current row, from the database cursor
- """
-
- tools.drop_view_if_exists(cr, 'crm_opportunity_report')
- cr.execute("""
- create or replace view crm_opportunity_report as (
- select
- min(c.id) as id,
- to_char(c.create_date, 'YYYY') as name,
- to_char(c.create_date, 'MM') as month,
- to_char(c.create_date, 'YYYY-MM-DD') as day,
- c.state as state,
- c.user_id,
- c.section_id,
- c.categ_id,
- c.stage_id,
- c.partner_id,
- c.company_id,
- count(*) as nbr,
- 0 as avg_answers,
- 0.0 as perc_done,
- 0.0 as perc_cancel,
- date_trunc('day',c.create_date) as create_date,
- sum(planned_revenue) as amount_revenue,
- sum((planned_revenue*probability)/100.0)::decimal(16,2) as amount_revenue_prob,
- avg(probability)::decimal(16,2) as probability,
- avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
- from
- crm_opportunity c
- group by
- to_char(c.create_date, 'YYYY'),
- to_char(c.create_date, 'MM'),
- to_char(c.create_date, 'YYYY-MM-DD'),
- c.state,
- c.user_id,
- c.section_id,
- c.stage_id,
- c.categ_id,
- c.partner_id,
- company_id,
- create_date
- )""")
-
-crm_opportunity_report()
diff --git a/addons/crm_sale/report/crm_opportunity_report_view.xml b/addons/crm_sale/report/crm_opportunity_report_view.xml
deleted file mode 100644
index 29a66b838f0..00000000000
--- a/addons/crm_sale/report/crm_opportunity_report_view.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
-
-
-
- crm.opportunity.report.tree
- crm.opportunity.report
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.opportunity.report.form
- crm.opportunity.report
-
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.opportunity.report.graph
- crm.opportunity.report
- graph
-
-
-
-
-
-
-
-
-
-
-
-
- crm.opportunity.report.select
- crm.opportunity.report
-
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Opportunities
- crm.opportunity.report
- form
- tree,graph
- {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}
-
-
-
-
- tree
-
-
-
-
-
- graph
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/security/ir.model.access.csv b/addons/crm_sale/security/ir.model.access.csv
deleted file mode 100644
index ece648be92f..00000000000
--- a/addons/crm_sale/security/ir.model.access.csv
+++ /dev/null
@@ -1,8 +0,0 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_manager",1,1,1,1
-"access_crm_opportunity","crm.opportunity","model_crm_opportunity","crm.group_crm_manager",1,1,1,1
-"access_crm_lead_report_user","crm.lead.report","model_crm_lead_report","crm.group_crm_user",1,0,0,0
-"access_crm_opportunity_report_user","crm.opportunity.report","model_crm_opportunity_report","crm.group_crm_user",1,0,0,0
-"access_crm_lead2partner","crm.lead2partner","model_crm_lead2partner","crm.group_crm_user",1,1,1,1
-"access_crm_lead2opportunity","crm.lead2opportunity","model_crm_lead2opportunity","crm.group_crm_user",1,1,1,1
-"access_crm_lead2opportunity_partner","crm.lead2opportunity.partner","model_crm_lead2opportunity_partner","crm.group_crm_user",1,1,1,1
diff --git a/addons/crm_sale/test/test_crm_lead.yml b/addons/crm_sale/test/test_crm_lead.yml
deleted file mode 100644
index 22fdfffca1b..00000000000
--- a/addons/crm_sale/test/test_crm_lead.yml
+++ /dev/null
@@ -1,113 +0,0 @@
-- |
- In order to test the CRM in OpenERP,
- I will do a customer qualification process that
- starts with a fist contact with a customer (a lead), which will be converted to a
- business opportunity and a partner.
-- |
- In order to test the flow, I create a two new users "user_crm" and
- I assign the group "salesman".
--
- !record {model: res.users, id: res_users_usercrm0}:
- company_id: base.main_company
- context_lang: en_US
- context_section_id: crm.section_sales_department
- groups_id:
- - crm.group_crm_user
- login: user_crm
- name: user_crm
- password: user_crm
-
-
-- |
- I start by creating a new lead "New Customer" and I provide an address to this
- new customer, as well as an email "info@mycustomer.com".
--
- !record {model: crm.lead, id: crm_lead_newcustomer0}:
- email_from: info@mycustomer.com
- name: New Customer
- partner_name: Sandip zala
- phone: (855) 924-4364
- mobile: (333) 715-1450
- section_id: crm.section_sales_department
- referred: False
- title: M.
-- |
- I check that the lead is in 'draft' state,
--
- !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in Draft}:
- - state == "draft"
--
- I open lead by click on "Open" button,
--
- !python {model: crm.lead}: |
- self.case_open(cr, uid, [ref("crm_lead_newcustomer0")])
-
-- |
- As the lead seems to be a real business opportunity, I will convert it to a
- partner
- and a business opportunity by clicking on the "Convert" button.
--
- !python {model: crm.lead}: |
- lead = self.browse(cr, uid, ref('crm_lead_newcustomer0'))
- if not lead.partner_id:
- self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
--
- |
- Now, select "create a new partner" option in this wizard.
--
- !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_0}:
- action: 'create'
--
- I click on "Continue" button of this wizard.
--
- !python {model: crm.lead2opportunity.partner}: |
- self.make_partner(cr, uid, [ref("crm_lead2opportunity_partner_create_0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
--
- Now, I give value to this wizard field.
--
- !record {model: crm.lead2opportunity, id: crm_lead2opportunity_stonage_0}:
- name: Sandip zala
- planned_revenue: 0.00
- probability: 0.00
--
- Then, Click on "Create Opportunity" button of this wizard.
--
- !python {model: crm.lead2opportunity}: |
- self.action_apply(cr, uid, [ref('crm_lead2opportunity_stonage_0')], {'active_id': ref('crm_lead_newcustomer0')})
-
-- |
- I can check that a lead and a business opportunity is now assigned to this
- lead.
--
- # !python {model: crm.lead, id: crm_lead_newcustomer0}:
- # - opportunity_id.id != False
-
-- |
- I check that the partner associated to this lead as the same country, phone number
- and name than the opportunity.
--
- !python {model: crm.lead}: |
- lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
- print "lead", lead.partner_name
- obj_opportunity = self.pool.get('crm.opportunity')
- ids = obj_opportunity.search(cr, uid, [('name', '=', lead.partner_name)])
- opportunity = obj_opportunity.browse(cr, uid, ids)[0]
- assert lead.partner_name == opportunity.partner_id.name
- assert lead.phone == opportunity.phone
--
- |
- # yaml is also not working smpt server and send new email.
-
-- |
- I configure with smtp server.
-- |
- And I communicate with lead through send New mail to Lead using it email address from user which are loged.
-- |
- I check that communication history generated when send email to lead.
-- |
- Then, I add a cc which receive copy of future communication between partner and users by mail.
-
-- |
- I Reply to last Email to lead with some document attached.and check that communication history generated or not.
-
-
\ No newline at end of file
diff --git a/addons/crm_sale/test/test_crm_opportunity.yml b/addons/crm_sale/test/test_crm_opportunity.yml
deleted file mode 100644
index d7118dd0c90..00000000000
--- a/addons/crm_sale/test/test_crm_opportunity.yml
+++ /dev/null
@@ -1,81 +0,0 @@
-- |
- I start by creating a new Opportunity. And I select partner for opportunity.
- I can see that after selecting partner his contact and email is automatically filled.
--
- !record {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
- email_from: info@balmerinc.be
- name: 'ABC FUEL CO 829264 - 10002 units '
- partner_address_id: base.res_partner_address_1
- partner_id: base.res_partner_9
- probability: 1.0
- stage_id: crm.stage_oppor1
- categ_id: crm.categ_oppor2
- section_id: crm.section_sales_department
-
-- |
- I check that the opportunity is in 'New' state.
--
- !assert {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
- - state == "draft"
-- |
- I open opportunity by click on "Open" button,
--
- !python {model: crm.opportunity}: |
- self.case_open(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
-
-- |
- I schedule Meeting on this current opportunity by clicking on "schedule
- Meeting".
--
- !python {model: crm.opportunity}: |
- self.action_makeMeeting(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
-
-- |
- I can see that Meeting's calendar view is shown.
- then I click on the date on which I want schedule meeting.
- I fill proper data for that meeting and save it
--
- !record {model: crm.meeting, id: crm_meeting_abcfuelcounits0}:
- alarm_id: base_calendar.alarm3
- date: '2010-04-16 00:00:00'
- date_deadline: '2010-04-16 08:00:00'
- duration: 8.0
- email_from: info@balmerinc.be
- name: 'ABC FUEL CO 829264 - 10002 units '
- opportunity_id: 'crm_opportunity_abcfuelcounits0'
- partner_address_id: base.res_partner_address_1
- partner_id: base.res_partner_9
- rrule_type: weekly
- section_id: crm.section_sales_department
- state: open
-- |
- In order to schedule a phonecall to the partner
- I click on "schedule call" button and select planned date for the call.
--
- !record {model: crm.opportunity2phonecall, id: crm_opportunity2phonecall_abcfuelcounits0}:
- date: '2010-04-17 11:15:00'
- name: 'ABC FUEL CO 829264 - 10002 units '
- section_id: crm.section_sales_department
- user_id: base.user_demo
-- |
- schedule phonecall by apply (action_apply)function of opportunity2phoncall wizard
--
- !python {model: crm.opportunity2phonecall}: |
- self.action_apply(cr, uid, [ref('crm_opportunity2phonecall_abcfuelcounits0')], {'active_ids': [ref("crm_opportunity_abcfuelcounits0")]})
-- |
- I check that phonecall record is created for that opportunity.
--
- !python {model: crm.phonecall}: |
- ids = self.search(cr, uid, [('name', '=', 'ABC FUEL CO 829264 - 10002 units')])
- assert len(ids)
-- |
- I can see phonecall record after click on "Schedule call" wizard.
--
- !record {model: crm.phonecall, id: crm_phonecall_abcfuelcounits0}:
- date: '2010-04-17 11:15:00'
- duration: 3.0
- name: 'ABC FUEL CO 829264 - 10002 units'
- partner_address_id: base.res_partner_address_1
- partner_id: base.res_partner_9
- section_id: crm.section_sales_department
-
\ No newline at end of file
diff --git a/addons/crm_sale/wizard/__init__.py b/addons/crm_sale/wizard/__init__.py
deleted file mode 100644
index 58a13f8c1e4..00000000000
--- a/addons/crm_sale/wizard/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_lead_to_partner
-import crm_lead_to_opportunity
-import crm_opportunity_to_phonecall
-#import crm_phonecall_to_phonecall
-#import crm_phonecall_to_partner
-#import crm_phonecall_to_opportunity
-#import crm_partner_to_opportunity
\ No newline at end of file
diff --git a/addons/crm_sale/wizard/crm_lead_to_opportunity.py b/addons/crm_sale/wizard/crm_lead_to_opportunity.py
deleted file mode 100644
index 5aef886ab5c..00000000000
--- a/addons/crm_sale/wizard/crm_lead_to_opportunity.py
+++ /dev/null
@@ -1,327 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from mx.DateTime import now
-from osv import osv, fields
-from tools.translate import _
-
-
-class crm_lead2opportunity(osv.osv_memory):
- _name = 'crm.lead2opportunity'
- _description = 'Lead To Opportunity'
-
- def action_cancel(self, cr, uid, ids, context=None):
- """
- Closes Lead To Opportunity form
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- """
- return {'type': 'ir.actions.act_window_close'}
-
- def action_apply(self, cr, uid, ids, context=None):
- """
- This converts lead to opportunity and opens Opportunity view
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Opportunity IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Opportunity form
- """
- record_id = context and context.get('active_id', False) or False
- if not record_id:
- return {}
-
- lead_obj = self.pool.get('crm.lead')
- opp_obj = self. pool.get('crm.opportunity')
- data_obj = self.pool.get('ir.model.data')
- history_obj = self.pool.get('crm.case.history')
- model_obj = self.pool.get('ir.model')
-
- # Get Opportunity views
- result = data_obj._get_id(cr, uid, 'crm_sale', 'view_crm_case_opportunities_filter')
- res = data_obj.read(cr, uid, result, ['res_id'])
- id2 = data_obj._get_id(cr, uid, 'crm_sale', 'crm_case_form_view_oppor')
- id3 = data_obj._get_id(cr, uid, 'crm_sale', 'crm_case_tree_view_oppor')
- if id2:
- id2 = data_obj.browse(cr, uid, id2, context=context).res_id
- if id3:
- id3 = data_obj.browse(cr, uid, id3, context=context).res_id
-
- lead = lead_obj.browse(cr, uid, record_id, context=context)
- model_ids = model_obj.search(cr, uid, [('model', '=', 'crm.opportunity')])
-
-
- for this in self.browse(cr, uid, ids, context=context):
- new_opportunity_id = opp_obj.create(cr, uid, {
- 'name': this.name,
- 'referred': lead.referred,
- 'planned_revenue': this.planned_revenue,
- 'probability': this.probability,
- 'partner_id': lead.partner_id and lead.partner_id.id or False,
- 'section_id': lead.section_id and lead.section_id.id or False,
- 'description': lead.description or False,
- 'date_deadline': lead.date_deadline or False,
- 'partner_address_id': lead.partner_address_id and lead.partner_address_id.id or False ,
- 'priority': lead.priority,
- 'phone': lead.phone,
- 'email_from': lead.email_from
- })
- new_opportunity = opp_obj.browse(cr, uid, new_opportunity_id)
- vals = {
- 'partner_id': this.partner_id and this.partner_id.id or False,
- }
- if not lead.opportunity_id:
- vals.update({'opportunity_id' : new_opportunity.id})
-
- model_opportunity_id = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'crm.opportunity')], context=context)[0]
-
- for model in ('crm.case.log', 'crm.case.history'):
- log_proxy = self.pool.get(model)
- log_ids = log_proxy.search(cr, uid, [('model_id.model', '=', 'crm.lead'),('res_id', '=', lead.id)], context=context)
- for log_id in log_ids:
- log_proxy.copy(cr, uid, log_id, {'model_id':model_opportunity_id}, context=context)
-
- lead_obj.write(cr, uid, [lead.id], vals)
- lead_obj.case_close(cr, uid, [lead.id])
-
- # Copy lead history to opportunity
- for his_id in lead.history_line:
- history_ids = history_obj.copy(cr, uid, his_id.id, \
- {'model_id': model_ids[0], \
- 'res_id': new_opportunity_id})
-
- #opp_obj.case_open(cr, uid, [new_opportunity_id])
-
- value = {
- 'name': _('Opportunity'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.opportunity',
- 'res_id': int(new_opportunity_id),
- 'view_id': False,
- 'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id']
- }
- return value
-
- _columns = {
- 'name' : fields.char('Opportunity Summary', size=64, required=True, select=1),
- 'probability': fields.float('Success Probability'),
- 'planned_revenue': fields.float('Expected Revenue'),
- 'partner_id': fields.many2one('res.partner', 'Partner'),
- }
-
- def view_init(self, cr, uid, fields, context=None):
- """
- This function checks for precondition before wizard executes
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- """
- lead_obj = self.pool.get('crm.lead')
-
- for lead in lead_obj.browse(cr, uid, context.get('active_ids', [])):
- if lead.state in ['done', 'cancel']:
- raise osv.except_osv(_("Warning !"), _("Closed/Cancelled \
-Leads Could not convert into Opportunity"))
- if lead.state != 'open':
- raise osv.except_osv(_('Warning !'), _('Lead should be in \
-\'Open\' state before converting to Opportunity.'))
- return False
-
- def default_get(self, cr, uid, fields, context=None):
- """
- This function gets default values
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- @return : default values of fields.
- """
- lead_obj = self.pool.get('crm.lead')
- rec_ids = context and context.get('active_ids', [])
- partner_id = context.get('partner_id', False)
- data = context and context.get('active_ids', []) or []
- res = super(crm_lead2opportunity, self).default_get(cr, uid, fields, context=context)
- for lead in lead_obj.browse(cr, uid, data, context=context):
- if 'name' in fields:
- res.update({'name': lead.partner_name})
- if 'partner_id' in fields:
- res.update({'partner_id': partner_id and partner_id[0] or False})
- return res
-
-crm_lead2opportunity()
-
-class crm_lead2opportunity_partner(osv.osv_memory):
- _name = 'crm.lead2opportunity.partner'
- _description = 'Lead To Opportunity Partner'
- _inherit = 'crm.lead2partner'
-
- _columns = {
- 'partner_id': fields.many2one('res.partner', 'Partner'),
- 'action': fields.selection([('exist', 'Link to an existing partner'), ('create', 'Create a new partner')], 'Action'),
- }
-
- def default_get(self, cr, uid, fields, context=None):
- """
- This function gets default values
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- @return : default values of fields.
- """
- lead_obj = self.pool.get('crm.lead')
- partner_obj = self.pool.get('res.partner')
- contact_obj = self.pool.get('res.partner.address')
- rec_ids = context and context.get('active_ids', [])
- partner_id = False
-
- data = context and context.get('active_ids', []) or []
- res = super(crm_lead2opportunity_partner, self).default_get(cr, uid, fields, context=context)
-
- for lead in lead_obj.browse(cr, uid, data, context=context):
- partner_ids = partner_obj.search(cr, uid, [('name', '=', lead.partner_name or lead.name)])
- if not partner_ids and lead.email_from:
- address_ids = contact_obj.search(cr, uid, [('email', '=', lead.email_from)])
- if address_ids:
- addresses = contact_obj.browse(cr, uid, address_ids)
- partner_ids = addresses and [addresses[0].partner_id.id] or False
- partner_id = partner_ids and partner_ids[0] or False
-
- if 'partner_id' in fields:
- res.update({'partner_id': partner_id})
- if 'action' in fields:
- res.update({'action': partner_id and 'exist' or 'create'})
- return res
-
- def make_partner(self, cr, uid, ids, context=None):
- """
- This function Makes partner based on action.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Partner form.
- """
- if not context:
- context = {}
-
- partner_ids = self._create_partner(cr, uid, ids, context)
- mod_obj = self.pool.get('ir.model.data')
- result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
- res = mod_obj.read(cr, uid, result, ['res_id'])
- value = {}
- data_obj = self.pool.get('ir.model.data')
- data_id = data_obj._get_id(cr, uid, 'crm_sale', 'view_crm_lead2opportunity_create')
-
- view_id = False
- if data_id:
- view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
-
- context.update({'partner_id': partner_ids})
- value = {
- 'name': _('Create Opportunity'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.lead2opportunity',
- 'view_id': False,
- 'context': context,
- 'views': [(view_id, 'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
- return value
-
- def action_skip(self, cr, uid, ids, context=None):
- """
- This skips partner creation
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Opportunity IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for Opportunity form
- """
- value = {}
- data_obj = self.pool.get('ir.model.data')
- data_id = data_obj._get_id(cr, uid, 'crm_sale', 'view_crm_lead2opportunity_create')
- view_id = False
- if data_id:
- view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
-
- context.update({'partner_id': False})
- value = {
- 'name': _('Create Opportunity'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.lead2opportunity',
- 'view_id': False,
- 'context': context,
- 'views': [(view_id, 'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
- return value
-
-
- def view_init(self, cr, uid, fields, context=None):
- """
- This function checks for precondition before wizard executes
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- """
- lead_obj = self.pool.get('crm.lead')
-
- for lead in lead_obj.browse(cr, uid, context.get('active_ids', [])):
- if lead.state in ['done', 'cancel']:
- raise osv.except_osv(_("Warning !"), _("Closed/Cancelled \
-Leads Could not convert into Opportunity"))
- if lead.state != 'open':
- raise osv.except_osv(_('Warning !'), _('Lead should be in \
-\'Open\' state before converting to Opportunity.'))
- return False
-
-crm_lead2opportunity_partner()
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_sale/wizard/crm_lead_to_opportunity_view.xml b/addons/crm_sale/wizard/crm_lead_to_opportunity_view.xml
deleted file mode 100644
index 229b54e09fe..00000000000
--- a/addons/crm_sale/wizard/crm_lead_to_opportunity_view.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
- crm.lead2opportunity.create
- crm.lead2opportunity
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create Opportunity
- ir.actions.act_window
- crm.lead2opportunity
- form
- form
- new
-
-
-
-
- crm.lead2opportunity.partner.form
- crm.lead2opportunity.partner
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/wizard/crm_lead_to_partner.py b/addons/crm_sale/wizard/crm_lead_to_partner.py
deleted file mode 100644
index 267c3296844..00000000000
--- a/addons/crm_sale/wizard/crm_lead_to_partner.py
+++ /dev/null
@@ -1,216 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import osv, fields
-from tools.translate import _
-
-class crm_lead2partner(osv.osv_memory):
- """ Converts lead to partner """
-
- _name = 'crm.lead2partner'
- _description = 'Lead to Partner'
-
- _columns = {
- 'action': fields.selection([('exist', 'Link to an existing partner'), \
- ('create', 'Create a new partner')], \
- 'Action', required=True),
- 'partner_id': fields.many2one('res.partner', 'Partner')
- }
-
- def view_init(self, cr, uid, fields, context=None):
- """
- This function checks for precondition before wizard executes
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- """
-
- lead_obj = self.pool.get('crm.lead')
- rec_ids = context and context.get('active_ids', [])
- for lead in lead_obj.browse(cr, uid, rec_ids, context=context):
- if lead.partner_id:
- raise osv.except_osv(_('Warning !'),
- _('A partner is already defined on this lead.'))
-
- def default_get(self, cr, uid, fields, context=None):
- """
- This function gets default values
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- @return : default values of fields.
- """
- lead_obj = self.pool.get('crm.lead')
- partner_obj = self.pool.get('res.partner')
- contact_obj = self.pool.get('res.partner.address')
- rec_ids = context and context.get('active_ids', [])
- partner_id = False
-
- data = context and context.get('active_ids', []) or []
- res = super(crm_lead2partner, self).default_get(cr, uid, fields, context=context)
-
- for lead in lead_obj.browse(cr, uid, data, context=context):
- partner_ids = partner_obj.search(cr, uid, [('name', '=', lead.partner_name or lead.name)])
- if not partner_ids and lead.email_from:
- address_ids = contact_obj.search(cr, uid, [('email', '=', lead.email_from)])
- if address_ids:
- addresses = contact_obj.browse(cr, uid, address_ids)
- partner_ids = addresses and [addresses[0].partner_id.id] or False
- partner_id = partner_ids and partner_ids[0] or False
-
- if 'partner_id' in fields:
- res.update({'partner_id': partner_id})
- if 'action' in fields:
- res.update({'action': partner_id and 'exist' or 'create'})
- return res
-
- def open_create_partner(self, cr, uid, ids, context=None):
- """
- This function Opens form of create partner.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for next form.
- """
- if not context:
- context = {}
-
- view_obj = self.pool.get('ir.ui.view')
- view_id = view_obj.search(cr, uid, [('model', '=', 'crm.lead2partner'), \
- ('name', '=', 'crm.lead2partner.view')])
- return {
- 'view_mode': 'form',
- 'view_type': 'form',
- 'view_id': view_id or False,
- 'res_model': 'crm.lead2partner',
- 'context': context,
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
-
- def _create_partner(self, cr, uid, ids, context=None):
- """
- This function Creates partner based on action.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary {}.
- """
- if not context:
- context = {}
-
- lead_obj = self.pool.get('crm.lead')
- partner_obj = self.pool.get('res.partner')
- contact_obj = self.pool.get('res.partner.address')
- partner_ids = []
- partner_id = False
- contact_id = False
- rec_ids = context and context.get('active_ids', [])
-
- for data in self.browse(cr, uid, ids):
- for lead in lead_obj.browse(cr, uid, rec_ids):
- if data.action == 'create':
- partner_id = partner_obj.create(cr, uid, {
- 'name': lead.partner_name or lead.name,
- 'user_id': lead.user_id.id,
- 'comment': lead.description,
- })
- function_id = self.pool.get('res.partner.function').search(cr,uid,[('name','=',lead.function_name)])
- contact_id = contact_obj.create(cr, uid, {
- 'partner_id': partner_id,
- 'name': lead.name,
- 'phone': lead.phone,
- 'mobile': lead.mobile,
- 'email': lead.email_from,
- 'fax': lead.fax,
- 'title': lead.title,
- 'function': function_id and function_id[0] or False,
- 'street': lead.street,
- 'street2': lead.street2,
- 'zip': lead.zip,
- 'city': lead.city,
- 'country_id': lead.country_id and lead.country_id.id or False,
- 'state_id': lead.state_id and lead.state_id.id or False,
- })
-
- else:
- if data.partner_id:
- partner_id = data.partner_id.id
- contact_id = partner_obj.address_get(cr, uid, [partner_id])['default']
-
- partner_ids.append(partner_id)
-
- vals = {}
- if partner_id:
- vals.update({'partner_id': partner_id})
- if contact_id:
- vals.update({'partner_address_id': contact_id})
- lead_obj.write(cr, uid, [lead.id], vals)
- return partner_ids
-
- def make_partner(self, cr, uid, ids, context=None):
- """
- This function Makes partner based on action.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Partner form.
- """
- if not context:
- context = {}
-
- partner_ids = self._create_partner(cr, uid, ids, context)
- mod_obj = self.pool.get('ir.model.data')
- result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
- res = mod_obj.read(cr, uid, result, ['res_id'])
-
- value = {
- 'domain': "[]",
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'res.partner',
- 'res_id': partner_ids and int(partner_ids[0]) or False,
- 'view_id': False,
- 'context': context,
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id']
- }
- return value
-
-crm_lead2partner()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_sale/wizard/crm_lead_to_partner_view.xml b/addons/crm_sale/wizard/crm_lead_to_partner_view.xml
deleted file mode 100644
index 53d4f1b5476..00000000000
--- a/addons/crm_sale/wizard/crm_lead_to_partner_view.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
- crm.lead2partner.view.create
- crm.lead2partner
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.lead2partner.view
- crm.lead2partner
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm_sale/wizard/crm_opportunity_to_phonecall.py b/addons/crm_sale/wizard/crm_opportunity_to_phonecall.py
deleted file mode 100644
index 73046fb4007..00000000000
--- a/addons/crm_sale/wizard/crm_opportunity_to_phonecall.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import osv, fields
-from tools.translate import _
-
-class crm_opportunity2phonecall(osv.osv_memory):
- """Converts Opportunity to Phonecall"""
-
- _name = 'crm.opportunity2phonecall'
- _description = 'Opportunity to Phonecall'
-
- _columns = {
- 'name' : fields.char('Call summary', size=64, required=True, select=1),
- 'user_id' : fields.many2one('res.users', "Assign To"),
- 'date': fields.datetime('Date' , required=True),
- 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
- }
-
- def default_get(self, cr, uid, fields, context=None):
- """
- This function gets default values
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
- @return : default values of fields.
- """
-
- opp_obj = self.pool.get('crm.opportunity')
- record_ids = context and context.get('active_ids', []) or []
- res = super(crm_opportunity2phonecall, self).default_get(cr, uid, fields, context=context)
- for opp in opp_obj.browse(cr, uid, record_ids, context=context):
- if 'name' in fields:
- res.update({'name': opp.name})
- if 'user_id' in fields:
- res.update({'user_id': opp.user_id and opp.user_id.id or False})
- if 'section_id' in fields:
- res.update({'section_id': opp.section_id and opp.section_id.id or False})
- return res
-
- def action_cancel(self, cr, uid, ids, context=None):
- """
- Closes Opportunity to Phonecall form
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Opportunity to Phonecall's IDs
- @param context: A standard dictionary for contextual values
- """
- return {'type': 'ir.actions.act_window_close'}
-
- def action_apply(self, cr, uid, ids, context=None):
- """
- This converts Opportunity to Phonecall and opens Phonecall view
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Opportunity to Phonecall IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Opportunity form
- """
- value = {}
- record_ids = context and context.get('active_ids', []) or []
-
- phonecall_obj = self.pool.get('crm.phonecall')
- opp_obj = self.pool.get('crm.opportunity')
- mod_obj = self.pool.get('ir.model.data')
- result = mod_obj._get_id(cr, uid, 'crm', 'view_crm_case_phonecalls_filter')
- res = mod_obj.read(cr, uid, result, ['res_id'])
-
- data_obj = self.pool.get('ir.model.data')
- categ_id = mod_obj._get_id(cr, uid, 'crm', 'categ_phone1')
- categ_id = data_obj.browse(cr, uid, categ_id, context=context).res_id
-
- # Select the view
- id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_tree_view')
- id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_form_view')
- if id2:
- id2 = data_obj.browse(cr, uid, id2, context=context).res_id
- if id3:
- id3 = data_obj.browse(cr, uid, id3, context=context).res_id
-
- for this in self.browse(cr, uid, ids, context=context):
- for opp in opp_obj.browse(cr, uid, record_ids, context=context):
- new_case = phonecall_obj.create(cr, uid, {
- 'name' : opp.name,
- 'case_id' : opp.id ,
- 'user_id' : this.user_id and this.user_id.id or False,
- 'categ_id' : categ_id,
- 'description' : opp.description or False,
- 'date' : this.date,
- 'section_id' : opp.section_id and opp.section_id.id or False,
- 'partner_id': opp.partner_id and opp.partner_id.id or False,
- 'partner_address_id': opp.partner_address_id and opp.partner_address_id.id or False,
- 'partner_phone' : opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False),
- 'partner_mobile' : opp.partner_address_id and opp.partner_address_id.mobile or False,
- 'priority': opp.priority,
- 'opp_id': opp.id
- }, context=context)
-
- phonecall_obj.case_open(cr, uid, [new_case])
-
- value = {
- 'name': _('Phone Call'),
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'crm.phonecall',
- 'res_id' : new_case,
- 'views': [(id3, 'form'), (id2, 'tree'), (False, 'calendar'), (False, 'graph')],
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id']
- }
- return value
-
-crm_opportunity2phonecall()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_sale/wizard/crm_opportunity_to_phonecall_view.xml b/addons/crm_sale/wizard/crm_opportunity_to_phonecall_view.xml
deleted file mode 100644
index 827ee867169..00000000000
--- a/addons/crm_sale/wizard/crm_opportunity_to_phonecall_view.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- crm.opportunity2phonecall.form
- crm.opportunity2phonecall
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Schedule Call
- crm.opportunity2phonecall
- form
- form
-
- new
-
-
-
-
\ No newline at end of file
From 75fdca9e4581e2290aa84a71315522a8d21f40e3 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Wed, 28 Apr 2010 12:46:17 +0530
Subject: [PATCH 051/148] [REVERT]:Uncommited changes for separating lead and
opportunity as separate module from crm.
bzr revid: atp@tinyerp.co.in-20100428071617-jushfbq1q3grm5mm
---
addons/crm/crm_lead.py | 198 +++++++++++
addons/crm/crm_lead_data.xml | 81 +++++
addons/crm/crm_lead_demo.xml | 112 ++++++
addons/crm/crm_lead_menu.xml | 33 ++
addons/crm/crm_lead_view.xml | 331 ++++++++++++++++++
addons/crm/crm_meeting.py | 25 +-
addons/crm/crm_opportunity.py | 249 +++++++++++++
addons/crm/crm_opportunity_data.xml | 95 +++++
addons/crm/crm_opportunity_demo.xml | 88 +++++
addons/crm/crm_opportunity_menu.xml | 57 +++
addons/crm/crm_opportunity_view.xml | 329 +++++++++++++++++
addons/crm/report/crm_lead_report.py | 88 +++++
addons/crm/report/crm_lead_report_view.xml | 116 ++++++
addons/crm/report/crm_opportunity_report.py | 100 ++++++
.../report/crm_opportunity_report_view.xml | 122 +++++++
addons/crm/test/test_crm_lead.yml | 113 ++++++
addons/crm/test/test_crm_opportunity.yml | 81 +++++
addons/crm/wizard/crm_lead_to_opportunity.py | 327 +++++++++++++++++
.../wizard/crm_lead_to_opportunity_view.xml | 63 ++++
addons/crm/wizard/crm_lead_to_partner.py | 216 ++++++++++++
.../crm/wizard/crm_lead_to_partner_view.xml | 53 +++
.../wizard/crm_opportunity_to_phonecall.py | 139 ++++++++
.../crm_opportunity_to_phonecall_view.xml | 41 +++
23 files changed, 3044 insertions(+), 13 deletions(-)
create mode 100644 addons/crm/crm_lead.py
create mode 100644 addons/crm/crm_lead_data.xml
create mode 100644 addons/crm/crm_lead_demo.xml
create mode 100644 addons/crm/crm_lead_menu.xml
create mode 100644 addons/crm/crm_lead_view.xml
create mode 100644 addons/crm/crm_opportunity.py
create mode 100644 addons/crm/crm_opportunity_data.xml
create mode 100644 addons/crm/crm_opportunity_demo.xml
create mode 100644 addons/crm/crm_opportunity_menu.xml
create mode 100644 addons/crm/crm_opportunity_view.xml
create mode 100644 addons/crm/report/crm_lead_report.py
create mode 100644 addons/crm/report/crm_lead_report_view.xml
create mode 100644 addons/crm/report/crm_opportunity_report.py
create mode 100644 addons/crm/report/crm_opportunity_report_view.xml
create mode 100644 addons/crm/test/test_crm_lead.yml
create mode 100644 addons/crm/test/test_crm_opportunity.yml
create mode 100644 addons/crm/wizard/crm_lead_to_opportunity.py
create mode 100644 addons/crm/wizard/crm_lead_to_opportunity_view.xml
create mode 100644 addons/crm/wizard/crm_lead_to_partner.py
create mode 100644 addons/crm/wizard/crm_lead_to_partner_view.xml
create mode 100644 addons/crm/wizard/crm_opportunity_to_phonecall.py
create mode 100644 addons/crm/wizard/crm_opportunity_to_phonecall_view.xml
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
new file mode 100644
index 00000000000..9c4c38875c5
--- /dev/null
+++ b/addons/crm/crm_lead.py
@@ -0,0 +1,198 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from osv import fields, osv, orm
+from datetime import datetime, timedelta
+import crm
+import math
+import time
+import mx.DateTime
+from tools.translate import _
+
+class crm_lead(osv.osv):
+ """ CRM Lead Case """
+
+ _name = "crm.lead"
+ _description = "Leads Cases"
+ _order = "priority, id desc"
+ _inherit = ['res.partner.address', 'crm.case']
+
+ def case_open(self, cr, uid, ids, *args):
+ """
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of case's Ids
+ @param *args: Give Tuple Value
+ """
+
+ res = super(crm_lead, self).case_open(cr, uid, ids, *args)
+ self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
+ return res
+
+ def _compute_day(self, cr, uid, ids, fields, args, context={}):
+ """
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Openday’s IDs
+ @return: difference between current date and log date
+ @param context: A standard dictionary for contextual values
+ """
+ cal_obj = self.pool.get('resource.calendar')
+ res_obj = self.pool.get('resource.resource')
+
+ res = {}
+ for lead in self.browse(cr, uid, ids , context):
+ for field in fields:
+ res[lead.id] = {}
+ duration = 0
+ ans = False
+ if field == 'day_open':
+ if lead.date_open:
+ date_create = datetime.strptime(lead.create_date, "%Y-%m-%d %H:%M:%S")
+ date_open = datetime.strptime(lead.date_open, "%Y-%m-%d %H:%M:%S")
+ ans = date_open - date_create
+ date_until = lead.date_open
+ elif field == 'day_close':
+ if lead.date_closed:
+ date_create = datetime.strptime(lead.create_date, "%Y-%m-%d %H:%M:%S")
+ date_close = datetime.strptime(lead.date_closed, "%Y-%m-%d %H:%M:%S")
+ date_until = lead.date_closed
+ ans = date_close - date_create
+ if ans:
+ resource_id = False
+ if lead.user_id:
+ resource_ids = res_obj.search(cr, uid, [('user_id','=',lead.user_id.id)])
+ if len(resource_ids):
+ resource_id = resource_ids[0]
+
+ duration = float(ans.days)
+ if lead.section_id.resource_calendar_id:
+ duration = float(ans.days) * 24
+ new_dates = cal_obj.interval_get(cr,
+ uid,
+ lead.section_id.resource_calendar_id and lead.section_id.resource_calendar_id.id or False,
+ mx.DateTime.strptime(lead.create_date, '%Y-%m-%d %H:%M:%S'),
+ duration,
+ resource=resource_id
+ )
+ no_days = []
+ date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
+ for in_time, out_time in new_dates:
+ if in_time.date not in no_days:
+ no_days.append(in_time.date)
+ if out_time > date_until:
+ break
+ duration = len(no_days)
+ res[lead.id][field] = abs(int(duration))
+ return res
+
+ _columns = {
+
+ 'categ_id': fields.many2one('crm.case.categ', 'Lead Source', \
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.opportunity')]"),
+ 'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', \
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.lead')]"),
+ 'partner_name': fields.char("Contact Name", size=64),
+
+ 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'stage_id': fields.many2one('crm.case.stage', 'Stage', \
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.lead')]"),
+ 'opportunity_id': fields.many2one('crm.opportunity', 'Opportunity'),
+
+ 'user_id': fields.many2one('res.users', 'Salesman'),
+ 'referred': fields.char('Referred By', size=64),
+ 'date_open': fields.datetime('Opened', readonly=True),
+ 'day_open': fields.function(_compute_day, string='Days to Open', \
+ method=True, multi='day_open', type="float", store=True),
+ 'day_close': fields.function(_compute_day, string='Days to Close', \
+ method=True, multi='day_close', type="float", store=True),
+ 'function_name': fields.char('Function', size=64),
+ }
+
+ _defaults = {
+ 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
+ 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
+ }
+
+
+ def convert_opportunity(self, cr, uid, ids, context=None):
+ """ Precomputation for converting lead to opportunity
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of closeday’s IDs
+ @param context: A standard dictionary for contextual values
+ @return: Value of action in dict
+ """
+ if not context:
+ context = {}
+ context.update({'active_ids': ids})
+
+ data_obj = self.pool.get('ir.model.data')
+ data_id = data_obj._get_id(cr, uid, 'crm', 'view_crm_lead2opportunity_create')
+ value = {}
+
+ view_id = False
+ if data_id:
+ view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
+ for case in self.browse(cr, uid, ids):
+ context.update({'opportunity_id': case.id})
+ context.update({'active_id': case.id})
+ if not case.partner_id:
+ data_id = data_obj._get_id(cr, uid, 'crm', 'view_crm_lead2opportunity_partner')
+ view_id1 = False
+ if data_id:
+ view_id1 = data_obj.browse(cr, uid, data_id, context=context).res_id
+ value = {
+ 'name': _('Create Partner'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'crm.lead2opportunity.partner',
+ 'view_id': False,
+ 'context': context,
+ 'views': [(view_id1, 'form')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'nodestroy': True
+ }
+ break
+ else:
+ value = {
+ 'name': _('Create Opportunity'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'crm.lead2opportunity',
+ 'view_id': False,
+ 'context': context,
+ 'views': [(view_id, 'form')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'nodestroy': True
+ }
+ return value
+
+crm_lead()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_lead_data.xml b/addons/crm/crm_lead_data.xml
new file mode 100644
index 00000000000..17211a9ef66
--- /dev/null
+++ b/addons/crm/crm_lead_data.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+ New
+
+
+
+
+ Assigned
+
+
+
+
+ In Process
+
+
+
+
+ Converted
+
+
+
+
+ Recycled
+
+
+
+
+ Dead
+
+
+
+
+
+
+ Telesales
+
+
+
+
+ Mail
+
+
+
+
+ Email
+
+
+
+
+ Print
+
+
+
+
+ Web
+
+
+
+
+ Radio
+
+
+
+
+ Television
+
+
+
+
+ Newsletter
+
+
+
+
+
+
diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml
new file mode 100644
index 00000000000..bc6638601c2
--- /dev/null
+++ b/addons/crm/crm_lead_demo.xml
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_lead_menu.xml b/addons/crm/crm_lead_menu.xml
new file mode 100644
index 00000000000..4d752ca8a9b
--- /dev/null
+++ b/addons/crm/crm_lead_menu.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+ Leads
+ crm.lead
+ tree,form
+
+
+
+
+
+ tree
+
+
+
+
+
+ form
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
new file mode 100644
index 00000000000..03318270e9b
--- /dev/null
+++ b/addons/crm/crm_lead_view.xml
@@ -0,0 +1,331 @@
+
+
+
+
+
+
+
+ Lead Stages
+ crm.case.stage
+ form
+
+ [('object_id.model', '=', 'crm.lead')]
+ {'object_id':'crm.lead'}
+
+
+
+
+
+
+ Lead Resource Type
+ crm.case.resource.type
+ form
+
+ [('object_id.model', '=', 'crm.lead')]
+ {'object_id':'crm.lead'}
+
+
+
+
+
+
+ CRM - Leads Form
+ crm.lead
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CRM - Leads Tree
+ crm.lead
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CRM - Leads Calendar
+ crm.lead
+ calendar
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CRM - Leads Search
+ crm.lead
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py
index 6979f3e5eee..495eb9f351a 100644
--- a/addons/crm/crm_meeting.py
+++ b/addons/crm/crm_meeting.py
@@ -65,7 +65,7 @@ class crm_meeting(osv.osv):
_defaults = {
'state': lambda *a: 'draft',
}
-
+
def open_meeting(self, cr, uid, ids, context=None):
"""
Open Crm Meeting Form for Crm Meeting.
@@ -75,14 +75,13 @@ class crm_meeting(osv.osv):
@param context: A standard dictionary for contextual values
@return: Dictionary value which open Crm Meeting form.
"""
-
if not context:
context = {}
-
+
data_obj = self.pool.get('ir.model.data')
-
+
value = {}
-
+
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
id4 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
@@ -94,17 +93,17 @@ class crm_meeting(osv.osv):
id4 = data_obj.browse(cr, uid, id4, context=context).res_id
for id in ids:
value = {
- 'name': _('Meeting'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.meeting',
- 'view_id': False,
+ 'name': _('Meeting'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'crm.meeting',
+ 'view_id': False,
'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
- 'type': 'ir.actions.act_window',
- 'res_id': base_calendar.base_calendar_id2real_id(id),
+ 'type': 'ir.actions.act_window',
+ 'res_id': base_calendar.base_calendar_id2real_id(id),
'nodestroy': True
}
-
+
return value
crm_meeting()
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
new file mode 100644
index 00000000000..204890e348c
--- /dev/null
+++ b/addons/crm/crm_opportunity.py
@@ -0,0 +1,249 @@
+#-*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from datetime import datetime
+from osv import fields,osv,orm
+from tools.translate import _
+import crm
+import time
+import mx.DateTime
+
+AVAILABLE_STATES = [
+ ('draft','Draft'),
+ ('open','Open'),
+ ('cancel', 'Lost'),
+ ('done', 'Converted'),
+ ('pending','Pending')
+]
+
+class crm_opportunity(osv.osv):
+ """ Opportunity Cases """
+
+ _name = "crm.opportunity"
+ _description = "Opportunity Cases"
+ _order = "priority,date_action,id desc"
+ _inherit = 'crm.case'
+
+ def case_open(self, cr, uid, ids, *args):
+ """
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of case's Ids
+ @param *args: Give Tuple Value
+ """
+
+ res = super(crm_opportunity, self).case_open(cr, uid, ids, *args)
+ self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
+ return res
+
+ def _compute_day(self, cr, uid, ids, fields, args, context={}):
+ """
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Openday’s IDs
+ @return: difference between current date and log date
+ @param context: A standard dictionary for contextual values
+ """
+ cal_obj = self.pool.get('resource.calendar')
+ res_obj = self.pool.get('resource.resource')
+
+ res = {}
+ for opportunity in self.browse(cr, uid, ids , context):
+ for field in fields:
+ res[opportunity.id] = {}
+ duration = 0
+ ans = False
+ if field == 'day_open':
+ if opportunity.date_open:
+ date_create = datetime.strptime(opportunity.create_date, "%Y-%m-%d %H:%M:%S")
+ date_open = datetime.strptime(opportunity.date_open, "%Y-%m-%d %H:%M:%S")
+ ans = date_open - date_create
+ date_until = opportunity.date_open
+ elif field == 'day_close':
+ if opportunity.date_closed:
+ date_create = datetime.strptime(opportunity.create_date, "%Y-%m-%d %H:%M:%S")
+ date_close = datetime.strptime(opportunity.date_closed, "%Y-%m-%d %H:%M:%S")
+ date_until = opportunity.date_closed
+ ans = date_close - date_create
+ if ans:
+ resource_id = False
+ if opportunity.user_id:
+ resource_ids = res_obj.search(cr, uid, [('user_id','=',opportunity.user_id.id)])
+ if resource_ids and len(resource_ids):
+ resource_id = resource_ids[0]
+
+ duration = float(ans.days)
+ if opportunity.section_id.resource_calendar_id:
+ duration = float(ans.days) * 24
+ new_dates = cal_obj.interval_get(cr,
+ uid,
+ opportunity.section_id.resource_calendar_id and opportunity.section_id.resource_calendar_id.id or False,
+ mx.DateTime.strptime(opportunity.create_date, '%Y-%m-%d %H:%M:%S'),
+ duration,
+ resource=resource_id
+ )
+ no_days = []
+ date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
+ for in_time, out_time in new_dates:
+ if in_time.date not in no_days:
+ no_days.append(in_time.date)
+ if out_time > date_until:
+ break
+ duration = len(no_days)
+ res[opportunity.id][field] = abs(int(duration))
+ return res
+
+ _columns = {
+ 'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.opportunity')]"),
+ 'categ_id': fields.many2one('crm.case.categ', 'Category', \
+ domain="[('section_id','=',section_id), \
+ ('object_id.model', '=', 'crm.opportunity')]"),
+ 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
+ 'referred': fields.char('Referred By', size=64),
+ 'probability': fields.float('Probability (%)'),
+ 'planned_revenue': fields.float('Expected Revenue'),
+ 'ref': fields.reference('Reference', selection=crm._links_get, size=128),
+ 'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'user_id': fields.many2one('res.users', 'Salesman'),
+ 'phone': fields.char("Phone", size=64),
+ 'date_deadline': fields.date('Expected Closing'),
+ 'date_action': fields.date('Next Action'),
+ 'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True,
+ help='The state is set to \'Draft\', when a case is created.\
+ \nIf the case is in progress the state is set to \'Open\'.\
+ \nWhen the case is over, the state is set to \'Done\'.\
+ \nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
+
+ 'date_open': fields.datetime('Opened', readonly=True),
+ 'day_open': fields.function(_compute_day, string='Days to Open', \
+ method=True, multi='day_open', type="float", store=True),
+ 'day_close': fields.function(_compute_day, string='Days to Close', \
+ method=True, multi='day_close', type="float", store=True),
+ }
+
+ def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
+
+ """ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of stage’s IDs
+ @stage_id: change state id on run time """
+
+ if not stage_id:
+ return {'value':{}}
+
+ stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
+ if not stage.on_change:
+ return {'value':{}}
+ return {'value':{'probability':stage.probability}}
+
+ def stage_next(self, cr, uid, ids, context={}):
+
+ """ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of stage next’s IDs
+ @param context: A standard dictionary for contextual values """
+
+ res = super(crm_opportunity, self).stage_next(cr, uid, ids, context=context)
+ for case in self.browse(cr, uid, ids, context):
+ if case.stage_id and case.stage_id.on_change:
+ self.write(cr, uid, [case.id], {'probability': case.stage_id.probability})
+ return res
+
+ def stage_previous(self, cr, uid, ids, context={}):
+
+ """ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of stage previous’s IDs
+ @param context: A standard dictionary for contextual values """
+
+ res = super(crm_opportunity, self).stage_previous(cr, uid, ids, context=context)
+ for case in self.browse(cr, uid, ids, context):
+ if case.stage_id and case.stage_id.on_change:
+ self.write(cr, uid, [case.id], {'probability': case.stage_id.probability})
+ return res
+
+ _defaults = {
+ 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.opportunity', context=c),
+ 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
+ 'state' : 'draft',
+ }
+
+ def action_makeMeeting(self, cr, uid, ids, context=None):
+ """
+ This opens Meeting's calendar view to schedule meeting on current Opportunity
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Opportunity to Meeting IDs
+ @param context: A standard dictionary for contextual values
+
+ @return : Dictionary value for created Meeting view
+ """
+ value = {}
+ for opp in self.browse(cr, uid, ids):
+ data_obj = self.pool.get('ir.model.data')
+
+ # Get meeting views
+ result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_meetings_filter')
+ res = data_obj.read(cr, uid, result, ['res_id'])
+ id1 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
+ id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
+ id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
+ if id1:
+ id1 = data_obj.browse(cr, uid, id1, context=context).res_id
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ if id3:
+ id3 = data_obj.browse(cr, uid, id3, context=context).res_id
+
+ context = {
+ 'default_opportunity_id': opp.id,
+ 'default_partner_id': opp.partner_id and opp.partner_id.id or False,
+ 'default_section_id': opp.section_id and opp.section_id.id or False,
+ 'default_email_from': opp.email_from,
+ 'default_state': 'open',
+ 'default_name': opp.name
+ }
+ value = {
+ 'name': _('Meetings'),
+ 'domain': "[('user_id','=',%s)]" % (uid),
+ 'context': context,
+ 'view_type': 'form',
+ 'view_mode': 'calendar,form,tree',
+ 'res_model': 'crm.meeting',
+ 'view_id': False,
+ 'views': [(id1, 'calendar'), (id2, 'form'), (id3, 'tree')],
+ 'type': 'ir.actions.act_window',
+ 'search_view_id': res['res_id'],
+ 'nodestroy': True
+ }
+
+ return value
+
+crm_opportunity()
+
diff --git a/addons/crm/crm_opportunity_data.xml b/addons/crm/crm_opportunity_data.xml
new file mode 100644
index 00000000000..b3780990a13
--- /dev/null
+++ b/addons/crm/crm_opportunity_data.xml
@@ -0,0 +1,95 @@
+
+
+
+
+ Existing Customer
+
+
+
+
+ Self Generated
+
+
+
+
+ Employee
+
+
+
+
+ Partner
+
+
+
+
+ Campaign
+
+
+
+
+ Website
+
+
+
+
+ Word of mouth
+
+
+
+
+ Other
+
+
+
+
+
+
+ Prospecting
+
+
+
+
+ Needs Analysis
+
+
+
+
+ Value Proposition
+
+
+
+
+ Proposal/Price Quote
+
+
+
+
+ Negotiation/Review
+
+
+
+
+ Closed Won
+
+
+
+
+ Closed Lost
+
+
+
+
+
+
+ Existing Business
+
+
+
+
+ New Business
+
+
+
+
+
+
diff --git a/addons/crm/crm_opportunity_demo.xml b/addons/crm/crm_opportunity_demo.xml
new file mode 100644
index 00000000000..b893d536e44
--- /dev/null
+++ b/addons/crm/crm_opportunity_demo.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_opportunity_menu.xml b/addons/crm/crm_opportunity_menu.xml
new file mode 100644
index 00000000000..3bcdbc7bb9f
--- /dev/null
+++ b/addons/crm/crm_opportunity_menu.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+ Opportunities
+ crm.opportunity
+ tree,form,graph
+
+
+
+
+
+ tree
+
+
+
+
+
+ form
+
+
+
+
+
+ graph
+
+
+
+
+
+
+
+
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
new file mode 100644
index 00000000000..4bdc0d90158
--- /dev/null
+++ b/addons/crm/crm_opportunity_view.xml
@@ -0,0 +1,329 @@
+
+
+
+
+
+
+
+ Opportunity Categories
+ crm.case.categ
+ form
+
+ [('object_id.model', '=', 'crm.opportunity')]
+ {'object_id':'crm.opportunity'}
+
+
+
+
+
+
+
+ Opportunity Stages
+ crm.case.stage
+ form
+
+ [('object_id.model', '=', 'crm.opportunity')]
+ {'object_id':'crm.opportunity'}
+
+
+
+
+
+
+
+ Opportunity Resource Type
+ crm.case.resource.type
+ form
+
+ [('object_id.model', '=', 'crm.opportunity')]
+ {'object_id':'crm.opportunity'}
+
+
+
+
+
+
+
+ Opportunities
+ crm.opportunity
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Opportunities Tree
+ crm.opportunity
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CRM - Opportunity Graph
+ crm.opportunity
+ graph
+
+
+
+
+
+
+
+
+
+
+
+
+ CRM - Opportunities Search
+ crm.opportunity
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py
new file mode 100644
index 00000000000..d400700c0b5
--- /dev/null
+++ b/addons/crm/report/crm_lead_report.py
@@ -0,0 +1,88 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from osv import fields,osv
+import tools
+
+AVAILABLE_STATES = [
+ ('draft','Draft'),
+ ('open','Open'),
+ ('cancel', 'Cancelled'),
+ ('done', 'Closed'),
+ ('pending','Pending')
+]
+
+class crm_lead_report(osv.osv):
+ """ CRM Lead Report """
+ _name = "crm.lead.report"
+ _auto = False
+ _inherit = "crm.case.report"
+ _description = "CRM Lead Report"
+
+ _columns = {
+ 'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
+ 'categ_id': fields.many2one('crm.case.categ', 'Category',\
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.lead')]" , readonly=True),
+ 'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.lead')]", readonly=True),
+ 'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
+ 'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ }
+ def init(self, cr):
+
+ """
+ CRM Lead Report
+ @param cr: the current row, from the database cursor
+ """
+
+ tools.drop_view_if_exists(cr, 'crm_lead_report')
+ cr.execute("""
+ create or replace view crm_lead_report as (
+ select
+ min(c.id) as id,
+ to_char(c.create_date, 'YYYY') as name,
+ to_char(c.create_date, 'MM') as month,
+ to_char(c.create_date, 'YYYY-MM-DD') as day,
+ c.state as state,
+ c.user_id,
+ c.stage_id,
+ c.company_id,
+ c.section_id,
+ c.categ_id,
+ c.partner_id,
+ count(*) as nbr,
+ 0 as avg_answers,
+ 0.0 as perc_done,
+ 0.0 as perc_cancel,
+ date_trunc('day',c.create_date) as create_date,
+ avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
+ from
+ crm_lead c
+ group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
+ c.state, c.user_id,c.section_id,c.stage_id,categ_id,c.partner_id,c.company_id
+ ,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
+ )""")
+
+crm_lead_report()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
new file mode 100644
index 00000000000..d6502c190d9
--- /dev/null
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+ crm.lead.report.tree
+ crm.lead.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ crm.lead.report.form
+ crm.lead.report
+
+ form
+
+
+
+
+
+
+
+
+
+
+
+ crm.lead.report.graph
+ crm.lead.report
+ graph
+
+
+
+
+
+
+
+
+
+
+
+
+ crm.lead.report.select
+ crm.lead.report
+
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Leads
+ crm.lead.report
+ form
+ {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}
+ tree,graph
+
+
+
+
+
+
+ tree
+
+
+
+
+
+
+ graph
+
+
+
+
+
+
+
+
diff --git a/addons/crm/report/crm_opportunity_report.py b/addons/crm/report/crm_opportunity_report.py
new file mode 100644
index 00000000000..a3af4be8b7c
--- /dev/null
+++ b/addons/crm/report/crm_opportunity_report.py
@@ -0,0 +1,100 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from osv import fields,osv
+import tools
+
+AVAILABLE_STATES = [
+ ('draft','Draft'),
+ ('open','Open'),
+ ('cancel', 'Cancelled'),
+ ('done', 'Closed'),
+ ('pending','Pending')
+]
+
+class crm_opportunity_report(osv.osv):
+ """ CRM Opportunity Report """
+ _name = "crm.opportunity.report"
+ _auto = False
+ _inherit = "crm.case.report"
+ _description = "CRM Opportunity Report"
+ _columns = {
+ 'probability': fields.float('Avg. Probability', readonly=True,group_operator='avg'),
+ 'amount_revenue': fields.float('Est.Revenue', readonly=True),
+ 'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
+ 'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
+ 'categ_id': fields.many2one('crm.case.categ', 'Category',\
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.opportunity')]", readonly=True),
+ 'stage_id':fields.many2one('crm.case.stage', 'Stage',\
+ domain="[('section_id','=',section_id),\
+ ('object_id.model', '=', 'crm.opportunity')]", readonly=True),
+ 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
+ 'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ 'user_id':fields.many2one('res.users', 'User', readonly=True),
+ }
+
+ def init(self, cr):
+ """ Display Est.Revenue , Average Probability ,Est.Revenue Probability
+ @param cr: the current row, from the database cursor
+ """
+
+ tools.drop_view_if_exists(cr, 'crm_opportunity_report')
+ cr.execute("""
+ create or replace view crm_opportunity_report as (
+ select
+ min(c.id) as id,
+ to_char(c.create_date, 'YYYY') as name,
+ to_char(c.create_date, 'MM') as month,
+ to_char(c.create_date, 'YYYY-MM-DD') as day,
+ c.state as state,
+ c.user_id,
+ c.section_id,
+ c.categ_id,
+ c.stage_id,
+ c.partner_id,
+ c.company_id,
+ count(*) as nbr,
+ 0 as avg_answers,
+ 0.0 as perc_done,
+ 0.0 as perc_cancel,
+ date_trunc('day',c.create_date) as create_date,
+ sum(planned_revenue) as amount_revenue,
+ sum((planned_revenue*probability)/100.0)::decimal(16,2) as amount_revenue_prob,
+ avg(probability)::decimal(16,2) as probability,
+ avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
+ from
+ crm_opportunity c
+ group by
+ to_char(c.create_date, 'YYYY'),
+ to_char(c.create_date, 'MM'),
+ to_char(c.create_date, 'YYYY-MM-DD'),
+ c.state,
+ c.user_id,
+ c.section_id,
+ c.stage_id,
+ c.categ_id,
+ c.partner_id,
+ company_id,
+ create_date
+ )""")
+
+crm_opportunity_report()
diff --git a/addons/crm/report/crm_opportunity_report_view.xml b/addons/crm/report/crm_opportunity_report_view.xml
new file mode 100644
index 00000000000..29a66b838f0
--- /dev/null
+++ b/addons/crm/report/crm_opportunity_report_view.xml
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+ crm.opportunity.report.tree
+ crm.opportunity.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ crm.opportunity.report.form
+ crm.opportunity.report
+
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ crm.opportunity.report.graph
+ crm.opportunity.report
+ graph
+
+
+
+
+
+
+
+
+
+
+
+
+ crm.opportunity.report.select
+ crm.opportunity.report
+
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Opportunities
+ crm.opportunity.report
+ form
+ tree,graph
+ {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}
+
+
+
+
+ tree
+
+
+
+
+
+ graph
+
+
+
+
+
+
+
+
diff --git a/addons/crm/test/test_crm_lead.yml b/addons/crm/test/test_crm_lead.yml
new file mode 100644
index 00000000000..22fdfffca1b
--- /dev/null
+++ b/addons/crm/test/test_crm_lead.yml
@@ -0,0 +1,113 @@
+- |
+ In order to test the CRM in OpenERP,
+ I will do a customer qualification process that
+ starts with a fist contact with a customer (a lead), which will be converted to a
+ business opportunity and a partner.
+- |
+ In order to test the flow, I create a two new users "user_crm" and
+ I assign the group "salesman".
+-
+ !record {model: res.users, id: res_users_usercrm0}:
+ company_id: base.main_company
+ context_lang: en_US
+ context_section_id: crm.section_sales_department
+ groups_id:
+ - crm.group_crm_user
+ login: user_crm
+ name: user_crm
+ password: user_crm
+
+
+- |
+ I start by creating a new lead "New Customer" and I provide an address to this
+ new customer, as well as an email "info@mycustomer.com".
+-
+ !record {model: crm.lead, id: crm_lead_newcustomer0}:
+ email_from: info@mycustomer.com
+ name: New Customer
+ partner_name: Sandip zala
+ phone: (855) 924-4364
+ mobile: (333) 715-1450
+ section_id: crm.section_sales_department
+ referred: False
+ title: M.
+- |
+ I check that the lead is in 'draft' state,
+-
+ !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in Draft}:
+ - state == "draft"
+-
+ I open lead by click on "Open" button,
+-
+ !python {model: crm.lead}: |
+ self.case_open(cr, uid, [ref("crm_lead_newcustomer0")])
+
+- |
+ As the lead seems to be a real business opportunity, I will convert it to a
+ partner
+ and a business opportunity by clicking on the "Convert" button.
+-
+ !python {model: crm.lead}: |
+ lead = self.browse(cr, uid, ref('crm_lead_newcustomer0'))
+ if not lead.partner_id:
+ self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
+-
+ |
+ Now, select "create a new partner" option in this wizard.
+-
+ !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_0}:
+ action: 'create'
+-
+ I click on "Continue" button of this wizard.
+-
+ !python {model: crm.lead2opportunity.partner}: |
+ self.make_partner(cr, uid, [ref("crm_lead2opportunity_partner_create_0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
+-
+ Now, I give value to this wizard field.
+-
+ !record {model: crm.lead2opportunity, id: crm_lead2opportunity_stonage_0}:
+ name: Sandip zala
+ planned_revenue: 0.00
+ probability: 0.00
+-
+ Then, Click on "Create Opportunity" button of this wizard.
+-
+ !python {model: crm.lead2opportunity}: |
+ self.action_apply(cr, uid, [ref('crm_lead2opportunity_stonage_0')], {'active_id': ref('crm_lead_newcustomer0')})
+
+- |
+ I can check that a lead and a business opportunity is now assigned to this
+ lead.
+-
+ # !python {model: crm.lead, id: crm_lead_newcustomer0}:
+ # - opportunity_id.id != False
+
+- |
+ I check that the partner associated to this lead as the same country, phone number
+ and name than the opportunity.
+-
+ !python {model: crm.lead}: |
+ lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
+ print "lead", lead.partner_name
+ obj_opportunity = self.pool.get('crm.opportunity')
+ ids = obj_opportunity.search(cr, uid, [('name', '=', lead.partner_name)])
+ opportunity = obj_opportunity.browse(cr, uid, ids)[0]
+ assert lead.partner_name == opportunity.partner_id.name
+ assert lead.phone == opportunity.phone
+-
+ |
+ # yaml is also not working smpt server and send new email.
+
+- |
+ I configure with smtp server.
+- |
+ And I communicate with lead through send New mail to Lead using it email address from user which are loged.
+- |
+ I check that communication history generated when send email to lead.
+- |
+ Then, I add a cc which receive copy of future communication between partner and users by mail.
+
+- |
+ I Reply to last Email to lead with some document attached.and check that communication history generated or not.
+
+
\ No newline at end of file
diff --git a/addons/crm/test/test_crm_opportunity.yml b/addons/crm/test/test_crm_opportunity.yml
new file mode 100644
index 00000000000..d7118dd0c90
--- /dev/null
+++ b/addons/crm/test/test_crm_opportunity.yml
@@ -0,0 +1,81 @@
+- |
+ I start by creating a new Opportunity. And I select partner for opportunity.
+ I can see that after selecting partner his contact and email is automatically filled.
+-
+ !record {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
+ email_from: info@balmerinc.be
+ name: 'ABC FUEL CO 829264 - 10002 units '
+ partner_address_id: base.res_partner_address_1
+ partner_id: base.res_partner_9
+ probability: 1.0
+ stage_id: crm.stage_oppor1
+ categ_id: crm.categ_oppor2
+ section_id: crm.section_sales_department
+
+- |
+ I check that the opportunity is in 'New' state.
+-
+ !assert {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
+ - state == "draft"
+- |
+ I open opportunity by click on "Open" button,
+-
+ !python {model: crm.opportunity}: |
+ self.case_open(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
+
+- |
+ I schedule Meeting on this current opportunity by clicking on "schedule
+ Meeting".
+-
+ !python {model: crm.opportunity}: |
+ self.action_makeMeeting(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
+
+- |
+ I can see that Meeting's calendar view is shown.
+ then I click on the date on which I want schedule meeting.
+ I fill proper data for that meeting and save it
+-
+ !record {model: crm.meeting, id: crm_meeting_abcfuelcounits0}:
+ alarm_id: base_calendar.alarm3
+ date: '2010-04-16 00:00:00'
+ date_deadline: '2010-04-16 08:00:00'
+ duration: 8.0
+ email_from: info@balmerinc.be
+ name: 'ABC FUEL CO 829264 - 10002 units '
+ opportunity_id: 'crm_opportunity_abcfuelcounits0'
+ partner_address_id: base.res_partner_address_1
+ partner_id: base.res_partner_9
+ rrule_type: weekly
+ section_id: crm.section_sales_department
+ state: open
+- |
+ In order to schedule a phonecall to the partner
+ I click on "schedule call" button and select planned date for the call.
+-
+ !record {model: crm.opportunity2phonecall, id: crm_opportunity2phonecall_abcfuelcounits0}:
+ date: '2010-04-17 11:15:00'
+ name: 'ABC FUEL CO 829264 - 10002 units '
+ section_id: crm.section_sales_department
+ user_id: base.user_demo
+- |
+ schedule phonecall by apply (action_apply)function of opportunity2phoncall wizard
+-
+ !python {model: crm.opportunity2phonecall}: |
+ self.action_apply(cr, uid, [ref('crm_opportunity2phonecall_abcfuelcounits0')], {'active_ids': [ref("crm_opportunity_abcfuelcounits0")]})
+- |
+ I check that phonecall record is created for that opportunity.
+-
+ !python {model: crm.phonecall}: |
+ ids = self.search(cr, uid, [('name', '=', 'ABC FUEL CO 829264 - 10002 units')])
+ assert len(ids)
+- |
+ I can see phonecall record after click on "Schedule call" wizard.
+-
+ !record {model: crm.phonecall, id: crm_phonecall_abcfuelcounits0}:
+ date: '2010-04-17 11:15:00'
+ duration: 3.0
+ name: 'ABC FUEL CO 829264 - 10002 units'
+ partner_address_id: base.res_partner_address_1
+ partner_id: base.res_partner_9
+ section_id: crm.section_sales_department
+
\ No newline at end of file
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
new file mode 100644
index 00000000000..c8cce059f09
--- /dev/null
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -0,0 +1,327 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from mx.DateTime import now
+from osv import osv, fields
+from tools.translate import _
+
+
+class crm_lead2opportunity(osv.osv_memory):
+ _name = 'crm.lead2opportunity'
+ _description = 'Lead To Opportunity'
+
+ def action_cancel(self, cr, uid, ids, context=None):
+ """
+ Closes Lead To Opportunity form
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Lead to Partner's IDs
+ @param context: A standard dictionary for contextual values
+
+ """
+ return {'type': 'ir.actions.act_window_close'}
+
+ def action_apply(self, cr, uid, ids, context=None):
+ """
+ This converts lead to opportunity and opens Opportunity view
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Lead to Opportunity IDs
+ @param context: A standard dictionary for contextual values
+
+ @return : Dictionary value for created Opportunity form
+ """
+ record_id = context and context.get('active_id', False) or False
+ if not record_id:
+ return {}
+
+ lead_obj = self.pool.get('crm.lead')
+ opp_obj = self. pool.get('crm.opportunity')
+ data_obj = self.pool.get('ir.model.data')
+ history_obj = self.pool.get('crm.case.history')
+ model_obj = self.pool.get('ir.model')
+
+ # Get Opportunity views
+ result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_opportunities_filter')
+ res = data_obj.read(cr, uid, result, ['res_id'])
+ id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_oppor')
+ id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_oppor')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ if id3:
+ id3 = data_obj.browse(cr, uid, id3, context=context).res_id
+
+ lead = lead_obj.browse(cr, uid, record_id, context=context)
+ model_ids = model_obj.search(cr, uid, [('model', '=', 'crm.opportunity')])
+
+
+ for this in self.browse(cr, uid, ids, context=context):
+ new_opportunity_id = opp_obj.create(cr, uid, {
+ 'name': this.name,
+ 'referred': lead.referred,
+ 'planned_revenue': this.planned_revenue,
+ 'probability': this.probability,
+ 'partner_id': lead.partner_id and lead.partner_id.id or False,
+ 'section_id': lead.section_id and lead.section_id.id or False,
+ 'description': lead.description or False,
+ 'date_deadline': lead.date_deadline or False,
+ 'partner_address_id': lead.partner_address_id and lead.partner_address_id.id or False ,
+ 'priority': lead.priority,
+ 'phone': lead.phone,
+ 'email_from': lead.email_from
+ })
+ new_opportunity = opp_obj.browse(cr, uid, new_opportunity_id)
+ vals = {
+ 'partner_id': this.partner_id and this.partner_id.id or False,
+ }
+ if not lead.opportunity_id:
+ vals.update({'opportunity_id' : new_opportunity.id})
+
+ model_opportunity_id = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'crm.opportunity')], context=context)[0]
+
+ for model in ('crm.case.log', 'crm.case.history'):
+ log_proxy = self.pool.get(model)
+ log_ids = log_proxy.search(cr, uid, [('model_id.model', '=', 'crm.lead'),('res_id', '=', lead.id)], context=context)
+ for log_id in log_ids:
+ log_proxy.copy(cr, uid, log_id, {'model_id':model_opportunity_id}, context=context)
+
+ lead_obj.write(cr, uid, [lead.id], vals)
+ lead_obj.case_close(cr, uid, [lead.id])
+
+ # Copy lead history to opportunity
+ for his_id in lead.history_line:
+ history_ids = history_obj.copy(cr, uid, his_id.id, \
+ {'model_id': model_ids[0], \
+ 'res_id': new_opportunity_id})
+
+ #opp_obj.case_open(cr, uid, [new_opportunity_id])
+
+ value = {
+ 'name': _('Opportunity'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'crm.opportunity',
+ 'res_id': int(new_opportunity_id),
+ 'view_id': False,
+ 'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
+ 'type': 'ir.actions.act_window',
+ 'search_view_id': res['res_id']
+ }
+ return value
+
+ _columns = {
+ 'name' : fields.char('Opportunity Summary', size=64, required=True, select=1),
+ 'probability': fields.float('Success Probability'),
+ 'planned_revenue': fields.float('Expected Revenue'),
+ 'partner_id': fields.many2one('res.partner', 'Partner'),
+ }
+
+ def view_init(self, cr, uid, fields, context=None):
+ """
+ This function checks for precondition before wizard executes
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ """
+ lead_obj = self.pool.get('crm.lead')
+
+ for lead in lead_obj.browse(cr, uid, context.get('active_ids', [])):
+ if lead.state in ['done', 'cancel']:
+ raise osv.except_osv(_("Warning !"), _("Closed/Cancelled \
+Leads Could not convert into Opportunity"))
+ if lead.state != 'open':
+ raise osv.except_osv(_('Warning !'), _('Lead should be in \
+\'Open\' state before converting to Opportunity.'))
+ return False
+
+ def default_get(self, cr, uid, fields, context=None):
+ """
+ This function gets default values
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ @return : default values of fields.
+ """
+ lead_obj = self.pool.get('crm.lead')
+ rec_ids = context and context.get('active_ids', [])
+ partner_id = context.get('partner_id', False)
+ data = context and context.get('active_ids', []) or []
+ res = super(crm_lead2opportunity, self).default_get(cr, uid, fields, context=context)
+ for lead in lead_obj.browse(cr, uid, data, context=context):
+ if 'name' in fields:
+ res.update({'name': lead.partner_name})
+ if 'partner_id' in fields:
+ res.update({'partner_id': partner_id and partner_id[0] or False})
+ return res
+
+crm_lead2opportunity()
+
+
+class crm_lead2opportunity_partner(osv.osv_memory):
+ _name = 'crm.lead2opportunity.partner'
+ _description = 'Lead To Opportunity Partner'
+ _inherit = 'crm.lead2partner'
+
+ _columns = {
+ 'partner_id': fields.many2one('res.partner', 'Partner'),
+ 'action': fields.selection([('exist', 'Link to an existing partner'), ('create', 'Create a new partner')], 'Action'),
+ }
+
+ def default_get(self, cr, uid, fields, context=None):
+ """
+ This function gets default values
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ @return : default values of fields.
+ """
+ lead_obj = self.pool.get('crm.lead')
+ partner_obj = self.pool.get('res.partner')
+ contact_obj = self.pool.get('res.partner.address')
+ rec_ids = context and context.get('active_ids', [])
+ partner_id = False
+
+ data = context and context.get('active_ids', []) or []
+ res = super(crm_lead2opportunity_partner, self).default_get(cr, uid, fields, context=context)
+
+ for lead in lead_obj.browse(cr, uid, data, context=context):
+ partner_ids = partner_obj.search(cr, uid, [('name', '=', lead.partner_name or lead.name)])
+ if not partner_ids and lead.email_from:
+ address_ids = contact_obj.search(cr, uid, [('email', '=', lead.email_from)])
+ if address_ids:
+ addresses = contact_obj.browse(cr, uid, address_ids)
+ partner_ids = addresses and [addresses[0].partner_id.id] or False
+ partner_id = partner_ids and partner_ids[0] or False
+
+ if 'partner_id' in fields:
+ res.update({'partner_id': partner_id})
+ if 'action' in fields:
+ res.update({'action': partner_id and 'exist' or 'create'})
+ return res
+
+ def make_partner(self, cr, uid, ids, context=None):
+ """
+ This function Makes partner based on action.
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Lead to Partner's IDs
+ @param context: A standard dictionary for contextual values
+
+ @return : Dictionary value for created Partner form.
+ """
+ if not context:
+ context = {}
+
+ partner_ids = self._create_partner(cr, uid, ids, context)
+ mod_obj = self.pool.get('ir.model.data')
+ result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
+ res = mod_obj.read(cr, uid, result, ['res_id'])
+ value = {}
+ data_obj = self.pool.get('ir.model.data')
+ data_id = data_obj._get_id(cr, uid, 'crm', 'view_crm_lead2opportunity_create')
+ view_id = False
+ if data_id:
+ view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
+
+ context.update({'partner_id': partner_ids})
+ value = {
+ 'name': _('Create Opportunity'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'crm.lead2opportunity',
+ 'view_id': False,
+ 'context': context,
+ 'views': [(view_id, 'form')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ }
+ return value
+
+ def action_skip(self, cr, uid, ids, context=None):
+ """
+ This skips partner creation
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Lead to Opportunity IDs
+ @param context: A standard dictionary for contextual values
+
+ @return : Dictionary value for Opportunity form
+ """
+ value = {}
+ data_obj = self.pool.get('ir.model.data')
+ data_id = data_obj._get_id(cr, uid, 'crm', 'view_crm_lead2opportunity_create')
+ view_id = False
+ if data_id:
+ view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
+
+ context.update({'partner_id': False})
+ value = {
+ 'name': _('Create Opportunity'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'crm.lead2opportunity',
+ 'view_id': False,
+ 'context': context,
+ 'views': [(view_id, 'form')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ }
+ return value
+
+
+ def view_init(self, cr, uid, fields, context=None):
+ """
+ This function checks for precondition before wizard executes
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ """
+ lead_obj = self.pool.get('crm.lead')
+
+ for lead in lead_obj.browse(cr, uid, context.get('active_ids', [])):
+ if lead.state in ['done', 'cancel']:
+ raise osv.except_osv(_("Warning !"), _("Closed/Cancelled \
+Leads Could not convert into Opportunity"))
+ if lead.state != 'open':
+ raise osv.except_osv(_('Warning !'), _('Lead should be in \
+\'Open\' state before converting to Opportunity.'))
+ return False
+
+crm_lead2opportunity_partner()
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_lead_to_opportunity_view.xml b/addons/crm/wizard/crm_lead_to_opportunity_view.xml
new file mode 100644
index 00000000000..229b54e09fe
--- /dev/null
+++ b/addons/crm/wizard/crm_lead_to_opportunity_view.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+ crm.lead2opportunity.create
+ crm.lead2opportunity
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create Opportunity
+ ir.actions.act_window
+ crm.lead2opportunity
+ form
+ form
+ new
+
+
+
+
+ crm.lead2opportunity.partner.form
+ crm.lead2opportunity.partner
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/wizard/crm_lead_to_partner.py b/addons/crm/wizard/crm_lead_to_partner.py
new file mode 100644
index 00000000000..267c3296844
--- /dev/null
+++ b/addons/crm/wizard/crm_lead_to_partner.py
@@ -0,0 +1,216 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from osv import osv, fields
+from tools.translate import _
+
+class crm_lead2partner(osv.osv_memory):
+ """ Converts lead to partner """
+
+ _name = 'crm.lead2partner'
+ _description = 'Lead to Partner'
+
+ _columns = {
+ 'action': fields.selection([('exist', 'Link to an existing partner'), \
+ ('create', 'Create a new partner')], \
+ 'Action', required=True),
+ 'partner_id': fields.many2one('res.partner', 'Partner')
+ }
+
+ def view_init(self, cr, uid, fields, context=None):
+ """
+ This function checks for precondition before wizard executes
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ """
+
+ lead_obj = self.pool.get('crm.lead')
+ rec_ids = context and context.get('active_ids', [])
+ for lead in lead_obj.browse(cr, uid, rec_ids, context=context):
+ if lead.partner_id:
+ raise osv.except_osv(_('Warning !'),
+ _('A partner is already defined on this lead.'))
+
+ def default_get(self, cr, uid, fields, context=None):
+ """
+ This function gets default values
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ @return : default values of fields.
+ """
+ lead_obj = self.pool.get('crm.lead')
+ partner_obj = self.pool.get('res.partner')
+ contact_obj = self.pool.get('res.partner.address')
+ rec_ids = context and context.get('active_ids', [])
+ partner_id = False
+
+ data = context and context.get('active_ids', []) or []
+ res = super(crm_lead2partner, self).default_get(cr, uid, fields, context=context)
+
+ for lead in lead_obj.browse(cr, uid, data, context=context):
+ partner_ids = partner_obj.search(cr, uid, [('name', '=', lead.partner_name or lead.name)])
+ if not partner_ids and lead.email_from:
+ address_ids = contact_obj.search(cr, uid, [('email', '=', lead.email_from)])
+ if address_ids:
+ addresses = contact_obj.browse(cr, uid, address_ids)
+ partner_ids = addresses and [addresses[0].partner_id.id] or False
+ partner_id = partner_ids and partner_ids[0] or False
+
+ if 'partner_id' in fields:
+ res.update({'partner_id': partner_id})
+ if 'action' in fields:
+ res.update({'action': partner_id and 'exist' or 'create'})
+ return res
+
+ def open_create_partner(self, cr, uid, ids, context=None):
+ """
+ This function Opens form of create partner.
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Lead to Partner's IDs
+ @param context: A standard dictionary for contextual values
+
+ @return : Dictionary value for next form.
+ """
+ if not context:
+ context = {}
+
+ view_obj = self.pool.get('ir.ui.view')
+ view_id = view_obj.search(cr, uid, [('model', '=', 'crm.lead2partner'), \
+ ('name', '=', 'crm.lead2partner.view')])
+ return {
+ 'view_mode': 'form',
+ 'view_type': 'form',
+ 'view_id': view_id or False,
+ 'res_model': 'crm.lead2partner',
+ 'context': context,
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ }
+
+
+ def _create_partner(self, cr, uid, ids, context=None):
+ """
+ This function Creates partner based on action.
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Lead to Partner's IDs
+ @param context: A standard dictionary for contextual values
+
+ @return : Dictionary {}.
+ """
+ if not context:
+ context = {}
+
+ lead_obj = self.pool.get('crm.lead')
+ partner_obj = self.pool.get('res.partner')
+ contact_obj = self.pool.get('res.partner.address')
+ partner_ids = []
+ partner_id = False
+ contact_id = False
+ rec_ids = context and context.get('active_ids', [])
+
+ for data in self.browse(cr, uid, ids):
+ for lead in lead_obj.browse(cr, uid, rec_ids):
+ if data.action == 'create':
+ partner_id = partner_obj.create(cr, uid, {
+ 'name': lead.partner_name or lead.name,
+ 'user_id': lead.user_id.id,
+ 'comment': lead.description,
+ })
+ function_id = self.pool.get('res.partner.function').search(cr,uid,[('name','=',lead.function_name)])
+ contact_id = contact_obj.create(cr, uid, {
+ 'partner_id': partner_id,
+ 'name': lead.name,
+ 'phone': lead.phone,
+ 'mobile': lead.mobile,
+ 'email': lead.email_from,
+ 'fax': lead.fax,
+ 'title': lead.title,
+ 'function': function_id and function_id[0] or False,
+ 'street': lead.street,
+ 'street2': lead.street2,
+ 'zip': lead.zip,
+ 'city': lead.city,
+ 'country_id': lead.country_id and lead.country_id.id or False,
+ 'state_id': lead.state_id and lead.state_id.id or False,
+ })
+
+ else:
+ if data.partner_id:
+ partner_id = data.partner_id.id
+ contact_id = partner_obj.address_get(cr, uid, [partner_id])['default']
+
+ partner_ids.append(partner_id)
+
+ vals = {}
+ if partner_id:
+ vals.update({'partner_id': partner_id})
+ if contact_id:
+ vals.update({'partner_address_id': contact_id})
+ lead_obj.write(cr, uid, [lead.id], vals)
+ return partner_ids
+
+ def make_partner(self, cr, uid, ids, context=None):
+ """
+ This function Makes partner based on action.
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Lead to Partner's IDs
+ @param context: A standard dictionary for contextual values
+
+ @return : Dictionary value for created Partner form.
+ """
+ if not context:
+ context = {}
+
+ partner_ids = self._create_partner(cr, uid, ids, context)
+ mod_obj = self.pool.get('ir.model.data')
+ result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
+ res = mod_obj.read(cr, uid, result, ['res_id'])
+
+ value = {
+ 'domain': "[]",
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'res.partner',
+ 'res_id': partner_ids and int(partner_ids[0]) or False,
+ 'view_id': False,
+ 'context': context,
+ 'type': 'ir.actions.act_window',
+ 'search_view_id': res['res_id']
+ }
+ return value
+
+crm_lead2partner()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_lead_to_partner_view.xml b/addons/crm/wizard/crm_lead_to_partner_view.xml
new file mode 100644
index 00000000000..53d4f1b5476
--- /dev/null
+++ b/addons/crm/wizard/crm_lead_to_partner_view.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+ crm.lead2partner.view.create
+ crm.lead2partner
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ crm.lead2partner.view
+ crm.lead2partner
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/wizard/crm_opportunity_to_phonecall.py b/addons/crm/wizard/crm_opportunity_to_phonecall.py
new file mode 100644
index 00000000000..148ec3aec6e
--- /dev/null
+++ b/addons/crm/wizard/crm_opportunity_to_phonecall.py
@@ -0,0 +1,139 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from osv import osv, fields
+from tools.translate import _
+
+class crm_opportunity2phonecall(osv.osv_memory):
+ """Converts Opportunity to Phonecall"""
+
+ _name = 'crm.opportunity2phonecall'
+ _description = 'Opportunity to Phonecall'
+
+ _columns = {
+ 'name' : fields.char('Call summary', size=64, required=True, select=1),
+ 'user_id' : fields.many2one('res.users', "Assign To"),
+ 'date': fields.datetime('Date' , required=True),
+ 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
+ }
+
+ def default_get(self, cr, uid, fields, context=None):
+ """
+ This function gets default values
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ @return : default values of fields.
+ """
+
+ opp_obj = self.pool.get('crm.opportunity')
+ record_ids = context and context.get('active_ids', []) or []
+ res = super(crm_opportunity2phonecall, self).default_get(cr, uid, fields, context=context)
+ for opp in opp_obj.browse(cr, uid, record_ids, context=context):
+ if 'name' in fields:
+ res.update({'name': opp.name})
+ if 'user_id' in fields:
+ res.update({'user_id': opp.user_id and opp.user_id.id or False})
+ if 'section_id' in fields:
+ res.update({'section_id': opp.section_id and opp.section_id.id or False})
+ return res
+
+ def action_cancel(self, cr, uid, ids, context=None):
+ """
+ Closes Opportunity to Phonecall form
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Opportunity to Phonecall's IDs
+ @param context: A standard dictionary for contextual values
+ """
+ return {'type': 'ir.actions.act_window_close'}
+
+ def action_apply(self, cr, uid, ids, context=None):
+ """
+ This converts Opportunity to Phonecall and opens Phonecall view
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Opportunity to Phonecall IDs
+ @param context: A standard dictionary for contextual values
+
+ @return : Dictionary value for created Opportunity form
+ """
+ value = {}
+ record_ids = context and context.get('active_ids', []) or []
+
+ phonecall_obj = self.pool.get('crm.phonecall')
+ opp_obj = self.pool.get('crm.opportunity')
+ mod_obj = self.pool.get('ir.model.data')
+ result = mod_obj._get_id(cr, uid, 'crm', 'view_crm_case_phonecalls_filter')
+ res = mod_obj.read(cr, uid, result, ['res_id'])
+
+ data_obj = self.pool.get('ir.model.data')
+ categ_id = mod_obj._get_id(cr, uid, 'crm', 'categ_phone1')
+ categ_id = data_obj.browse(cr, uid, categ_id, context=context).res_id
+
+ # Select the view
+ id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_tree_view')
+ id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_form_view')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ if id3:
+ id3 = data_obj.browse(cr, uid, id3, context=context).res_id
+
+ for this in self.browse(cr, uid, ids, context=context):
+ for opp in opp_obj.browse(cr, uid, record_ids, context=context):
+ new_case = phonecall_obj.create(cr, uid, {
+ 'name' : opp.name,
+ 'case_id' : opp.id ,
+ 'user_id' : this.user_id and this.user_id.id or False,
+ 'categ_id' : categ_id,
+ 'description' : opp.description or False,
+ 'date' : this.date,
+ 'section_id' : opp.section_id and opp.section_id.id or False,
+ 'partner_id': opp.partner_id and opp.partner_id.id or False,
+ 'partner_address_id': opp.partner_address_id and opp.partner_address_id.id or False,
+ 'partner_phone' : opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False),
+ 'partner_mobile' : opp.partner_address_id and opp.partner_address_id.mobile or False,
+ 'priority': opp.priority,
+ 'opp_id': opp.id
+ }, context=context)
+
+ phonecall_obj.case_open(cr, uid, [new_case])
+
+ value = {
+ 'name': _('Phone Call'),
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'crm.phonecall',
+ 'res_id' : new_case,
+ 'views': [(id3, 'form'), (id2, 'tree'), (False, 'calendar'), (False, 'graph')],
+ 'type': 'ir.actions.act_window',
+ 'search_view_id': res['res_id']
+ }
+ return value
+
+crm_opportunity2phonecall()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml b/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml
new file mode 100644
index 00000000000..827ee867169
--- /dev/null
+++ b/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ crm.opportunity2phonecall.form
+ crm.opportunity2phonecall
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Schedule Call
+ crm.opportunity2phonecall
+ form
+ form
+
+ new
+
+
+
+
\ No newline at end of file
From 58c5b10d093c79efe9f68609f83bc415ff44feef Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Wed, 28 Apr 2010 13:04:50 +0530
Subject: [PATCH 052/148] [IMP]:crm: Added crm phonecall back to crm [REM]:
crm_phonecall: Removed crm phonecall
bzr revid: rpa@tinyerp.com-20100428073450-q41qf6dchhzfk3h9
---
addons/crm/__openerp__.py | 42 ++++++++++++---
.../{crm_phonecall => crm}/crm_phonecall.py | 2 +-
.../crm_phonecall_data.xml | 12 ++---
.../crm_phonecall_demo.xml | 24 ++++-----
.../crm_phonecall_menu.xml | 22 ++++----
.../crm_phonecall_view.xml | 18 +++----
addons/crm/report/__init__.py | 1 +
.../report/crm_phonecall_report.py | 0
.../report/crm_phonecall_report_view.xml | 4 +-
addons/crm/security/ir.model.access.csv | 5 ++
addons/crm/wizard/__init__.py | 3 ++
.../wizard/crm_opportunity_to_phonecall.py | 50 ++++++++---------
.../wizard/crm_phonecall_to_meeting.py | 12 ++---
.../wizard/crm_phonecall_to_meeting_view.xml | 0
.../wizard/crm_phonecall_to_opportunity.py | 6 +--
.../crm_phonecall_to_opportunity_view.xml | 0
.../wizard/crm_phonecall_to_partner.py | 0
.../wizard/crm_phonecall_to_partner_view.xml | 0
.../wizard/crm_phonecall_to_phonecall.py | 6 +--
.../crm_phonecall_to_phonecall_view.xml | 0
addons/crm_phonecall/__init__.py | 27 ----------
addons/crm_phonecall/__openerp__.py | 53 -------------------
addons/crm_phonecall/report/__init__.py | 25 ---------
.../security/ir.model.access.csv | 6 ---
addons/crm_phonecall/wizard/__init__.py | 27 ----------
25 files changed, 122 insertions(+), 223 deletions(-)
rename addons/{crm_phonecall => crm}/crm_phonecall.py (99%)
rename addons/{crm_phonecall => crm}/crm_phonecall_data.xml (76%)
rename addons/{crm_phonecall => crm}/crm_phonecall_demo.xml (85%)
rename addons/{crm_phonecall => crm}/crm_phonecall_menu.xml (85%)
rename addons/{crm_phonecall => crm}/crm_phonecall_view.xml (94%)
rename addons/{crm_phonecall => crm}/report/crm_phonecall_report.py (100%)
rename addons/{crm_phonecall => crm}/report/crm_phonecall_report_view.xml (97%)
rename addons/{crm_phonecall => crm}/wizard/crm_phonecall_to_meeting.py (92%)
rename addons/{crm_phonecall => crm}/wizard/crm_phonecall_to_meeting_view.xml (100%)
rename addons/{crm_phonecall => crm}/wizard/crm_phonecall_to_opportunity.py (96%)
rename addons/{crm_phonecall => crm}/wizard/crm_phonecall_to_opportunity_view.xml (100%)
rename addons/{crm_phonecall => crm}/wizard/crm_phonecall_to_partner.py (100%)
rename addons/{crm_phonecall => crm}/wizard/crm_phonecall_to_partner_view.xml (100%)
rename addons/{crm_phonecall => crm}/wizard/crm_phonecall_to_phonecall.py (95%)
rename addons/{crm_phonecall => crm}/wizard/crm_phonecall_to_phonecall_view.xml (100%)
delete mode 100644 addons/crm_phonecall/__init__.py
delete mode 100644 addons/crm_phonecall/__openerp__.py
delete mode 100644 addons/crm_phonecall/report/__init__.py
delete mode 100644 addons/crm_phonecall/security/ir.model.access.csv
delete mode 100644 addons/crm_phonecall/wizard/__init__.py
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index f60483f6f59..ecf7d33261b 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -26,7 +26,7 @@
'category': 'Generic Modules/CRM & SRM',
'description': """The generic Open ERP Customer Relationship Management
system enables a group of people to intelligently and efficiently manage
-leads, opportunities, claims, meeting, phonecall etc.
+leads, opportunities, meeting, phonecall etc.
It manages key tasks such as communication, identification, prioritization,
assignment, resolution and notification.
@@ -54,35 +54,63 @@ between mails and Open ERP.""",
],
'init_xml': [
'crm_data.xml',
+ 'crm_meeting_data.xml',
+ 'crm_lead_data.xml',
+ 'crm_meeting_data.xml',
+ 'crm_opportunity_data.xml',
+ 'crm_phonecall_data.xml',
],
'update_xml': [
+ 'wizard/crm_lead_to_partner_view.xml',
+ 'wizard/crm_lead_to_opportunity_view.xml',
+
+ 'wizard/crm_phonecall_to_phonecall_view.xml',
+ 'wizard/crm_phonecall_to_partner_view.xml',
+ 'wizard/crm_phonecall_to_opportunity_view.xml',
+
+ 'wizard/crm_opportunity_to_phonecall_view.xml',
+ 'wizard/crm_partner_to_opportunity_view.xml',
+
'wizard/crm_send_email_view.xml',
'wizard/crm_email_add_cc_view.xml',
'crm_view.xml',
+
'crm_action_rule_view.xml',
+ 'crm_lead_view.xml',
+ 'crm_lead_menu.xml',
+ 'crm_meeting_view.xml',
+ 'crm_meeting_menu.xml',
+ 'crm_phonecall_view.xml',
+ 'crm_phonecall_menu.xml',
+ 'crm_opportunity_view.xml',
+ 'crm_opportunity_menu.xml',
'security/crm_security.xml',
'security/ir.model.access.csv',
'report/crm_report_view.xml',
+ 'report/crm_lead_report_view.xml',
+ 'report/crm_opportunity_report_view.xml' ,
+ 'report/crm_phonecall_report_view.xml',
'process/crm_configuration_process.xml',
],
'demo_xml': [
- 'test/test_crm_meeting.yml',
'crm_demo.xml',
+ 'crm_lead_demo.xml',
+ 'crm_meeting_demo.xml',
+ 'crm_opportunity_demo.xml',
+ 'crm_phonecall_demo.xml'
],
- 'test': ['test/test_crm_lead.yml',
+ 'test': [
+ 'test/test_crm_meeting.yml',
+ 'test/test_crm_lead.yml',
'test/test_crm_opportunity.yml',
'test/test_crm_phonecall.yml',
- 'test/test_crm_fund.yml',
- 'test/test_crm_claim.yml',
- 'test/test_crm_helpdesk.yml',
],
'installable': True,
'active': False,
'certificate': '0079056041421',
}
-
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_phonecall/crm_phonecall.py b/addons/crm/crm_phonecall.py
similarity index 99%
rename from addons/crm_phonecall/crm_phonecall.py
rename to addons/crm/crm_phonecall.py
index 713ff414f97..c452e1b5055 100644
--- a/addons/crm_phonecall/crm_phonecall.py
+++ b/addons/crm/crm_phonecall.py
@@ -21,7 +21,7 @@
from osv import fields, osv
from tools.translate import _
-from crm import crm
+import crm
import time
class crm_phonecall(osv.osv):
diff --git a/addons/crm_phonecall/crm_phonecall_data.xml b/addons/crm/crm_phonecall_data.xml
similarity index 76%
rename from addons/crm_phonecall/crm_phonecall_data.xml
rename to addons/crm/crm_phonecall_data.xml
index a716420ad5e..49d02f8848e 100644
--- a/addons/crm_phonecall/crm_phonecall_data.xml
+++ b/addons/crm/crm_phonecall_data.xml
@@ -8,13 +8,13 @@
-->
Inbound
-
+
Outbound
-
+
@@ -23,18 +23,18 @@
-->
Planned
-
+
Held
-
+
Not Held
-
+
-
+
\ No newline at end of file
diff --git a/addons/crm_phonecall/crm_phonecall_demo.xml b/addons/crm/crm_phonecall_demo.xml
similarity index 85%
rename from addons/crm_phonecall/crm_phonecall_demo.xml
rename to addons/crm/crm_phonecall_demo.xml
index 264ad840e1a..571848c54c7 100644
--- a/addons/crm_phonecall/crm_phonecall_demo.xml
+++ b/addons/crm/crm_phonecall_demo.xml
@@ -15,8 +15,8 @@
-
-
+
+
@@ -30,8 +30,8 @@
-
-
+
+
@@ -45,8 +45,8 @@
-
-
+
+
@@ -60,8 +60,8 @@
-
-
+
+
@@ -75,8 +75,8 @@
-
-
+
+
@@ -90,8 +90,8 @@
-
-
+
+
diff --git a/addons/crm_phonecall/crm_phonecall_menu.xml b/addons/crm/crm_phonecall_menu.xml
similarity index 85%
rename from addons/crm_phonecall/crm_phonecall_menu.xml
rename to addons/crm/crm_phonecall_menu.xml
index 2c47797ecbe..176e5aed7bc 100644
--- a/addons/crm_phonecall/crm_phonecall_menu.xml
+++ b/addons/crm/crm_phonecall_menu.xml
@@ -20,28 +20,28 @@
form
tree,calendar
-
+
tree
-
-
+
+
calendar
-
-
+
+
form
-
-
+
+
{'set_editable':True,'default_state':'open'}
-
+
@@ -81,7 +81,7 @@
@@ -92,7 +92,7 @@
{'default_state':'open'}
-
+
@@ -117,7 +117,7 @@
diff --git a/addons/crm_phonecall/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
similarity index 94%
rename from addons/crm_phonecall/crm_phonecall_view.xml
rename to addons/crm/crm_phonecall_view.xml
index 678e5b6db5d..e5d6c7565df 100644
--- a/addons/crm_phonecall/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -75,18 +75,18 @@
-
-
-
-
-
+
+
-
-
-
-
+
crm.phonecall.report.form
crm.phonecall.report
-
+
form
@@ -62,7 +62,7 @@
crm.phonecall.report.select
crm.phonecall.report
-
+
search
diff --git a/addons/crm/security/ir.model.access.csv b/addons/crm/security/ir.model.access.csv
index 0207e6cb39c..37a36fc5504 100644
--- a/addons/crm/security/ir.model.access.csv
+++ b/addons/crm/security/ir.model.access.csv
@@ -8,6 +8,7 @@
"access_crm_meeting","crm.meeting","model_crm_meeting","crm.group_crm_manager",1,1,1,1
"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_manager",1,1,1,1
"access_crm_opportunity","crm.opportunity","model_crm_opportunity","crm.group_crm_manager",1,1,1,1
+"access_crm_phonecall","crm.phonecall","model_crm_phonecall","crm.group_crm_manager",1,1,1,1
"access_crm_case_log","crm.case.log","model_crm_case_log","crm.group_crm_user",1,1,1,1
"access_crm_case_history","crm.case.history","model_crm_case_history","crm.group_crm_user",1,1,1,1
"access_crm_case_section_manager","crm.case.section.manager","model_crm_case_section","crm.group_crm_manager",1,1,1,1
@@ -23,11 +24,15 @@
"access_crm_case_report_user","crm.case.report","model_crm_case_report","crm.group_crm_user",1,0,0,0
"access_crm_case_report_manager","crm.case.report manager","model_crm_case_report","crm.group_crm_manager",1,1,1,1
"access_crm_lead_report_user","crm.lead.report","model_crm_lead_report","crm.group_crm_user",1,0,0,0
+"access_crm_phonecall_report_user","crm.phonecall.report","model_crm_phonecall_report","crm.group_crm_user",1,0,0,0
"access_crm_opportunity_report_user","crm.opportunity.report","model_crm_opportunity_report","crm.group_crm_user",1,0,0,0
"access_report_crm_case_service_dashboard","report.crm.case.service.dashboard","model_report_crm_case_service_dashboard","crm.group_crm_user",1,0,0,0
"access_crm_lead2partner","crm.lead2partner","model_crm_lead2partner","crm.group_crm_user",1,1,1,1
"access_crm_lead2opportunity","crm.lead2opportunity","model_crm_lead2opportunity","crm.group_crm_user",1,1,1,1
"access_crm_opportunity2phonecall","crm.opportunity2phonecall","model_crm_opportunity2phonecall","crm.group_crm_user",1,1,1,1
+"access_crm_phonecall2phonecall","crm.phonecall2phonecall","model_crm_phonecall2phonecall","crm.group_crm_user",1,1,1,1
+"access_crm_phonecall2partner","crm.phonecall2partner","model_crm_phonecall2partner","crm.group_crm_user",1,1,1,1
+"access_crm_phonecall2opportunity","crm.phonecall2opportunity","model_crm_phonecall2opportunity","crm.group_crm_user",1,1,1,1
"access_crm_send_mail","crm.send.mail","model_crm_send_mail","crm.group_crm_user",1,1,1,1
"access_crm_partner2opportunity","crm.partner2opportunity","model_crm_partner2opportunity","crm.group_crm_user",1,1,1,1
"access_crm_lead2opportunity_partner","crm.lead2opportunity.partner","model_crm_lead2opportunity_partner","crm.group_crm_user",1,1,1,1
diff --git a/addons/crm/wizard/__init__.py b/addons/crm/wizard/__init__.py
index 75c6a21caa3..f3d92447acd 100644
--- a/addons/crm/wizard/__init__.py
+++ b/addons/crm/wizard/__init__.py
@@ -25,6 +25,9 @@ import crm_email_add_cc
import crm_lead_to_partner
import crm_lead_to_opportunity
import crm_opportunity_to_phonecall
+import crm_phonecall_to_phonecall
+import crm_phonecall_to_partner
+import crm_phonecall_to_opportunity
import crm_partner_to_opportunity
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_opportunity_to_phonecall.py b/addons/crm/wizard/crm_opportunity_to_phonecall.py
index ffe91a927d2..148ec3aec6e 100644
--- a/addons/crm/wizard/crm_opportunity_to_phonecall.py
+++ b/addons/crm/wizard/crm_opportunity_to_phonecall.py
@@ -29,10 +29,10 @@ class crm_opportunity2phonecall(osv.osv_memory):
_description = 'Opportunity to Phonecall'
_columns = {
- 'name' : fields.char('Call summary', size=64, required=True, select=1),
- 'user_id' : fields.many2one('res.users', "Assign To"),
- 'date': fields.datetime('Date' , required=True),
- 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
+ 'name' : fields.char('Call summary', size=64, required=True, select=1),
+ 'user_id' : fields.many2one('res.users', "Assign To"),
+ 'date': fields.datetime('Date' , required=True),
+ 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
def default_get(self, cr, uid, fields, context=None):
@@ -46,6 +46,7 @@ class crm_opportunity2phonecall(osv.osv_memory):
@return : default values of fields.
"""
+
opp_obj = self.pool.get('crm.opportunity')
record_ids = context and context.get('active_ids', []) or []
res = super(crm_opportunity2phonecall, self).default_get(cr, uid, fields, context=context)
@@ -92,7 +93,7 @@ class crm_opportunity2phonecall(osv.osv_memory):
data_obj = self.pool.get('ir.model.data')
categ_id = mod_obj._get_id(cr, uid, 'crm', 'categ_phone1')
categ_id = data_obj.browse(cr, uid, categ_id, context=context).res_id
-
+
# Select the view
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_tree_view')
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_form_view')
@@ -104,32 +105,31 @@ class crm_opportunity2phonecall(osv.osv_memory):
for this in self.browse(cr, uid, ids, context=context):
for opp in opp_obj.browse(cr, uid, record_ids, context=context):
new_case = phonecall_obj.create(cr, uid, {
- 'name' : opp.name,
- 'case_id' : opp.id ,
- 'user_id' : this.user_id and this.user_id.id or False,
- 'categ_id' : categ_id,
- 'description' : opp.description or False,
- 'date' : this.date,
- 'section_id' : opp.section_id and opp.section_id.id or False,
- 'partner_id': opp.partner_id and opp.partner_id.id or False,
- 'partner_address_id': opp.partner_address_id and opp.partner_address_id.id or False,
- 'partner_phone' : opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False),
- 'partner_mobile' : opp.partner_address_id and opp.partner_address_id.mobile or False,
- 'priority': opp.priority,
+ 'name' : opp.name,
+ 'case_id' : opp.id ,
+ 'user_id' : this.user_id and this.user_id.id or False,
+ 'categ_id' : categ_id,
+ 'description' : opp.description or False,
+ 'date' : this.date,
+ 'section_id' : opp.section_id and opp.section_id.id or False,
+ 'partner_id': opp.partner_id and opp.partner_id.id or False,
+ 'partner_address_id': opp.partner_address_id and opp.partner_address_id.id or False,
+ 'partner_phone' : opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False),
+ 'partner_mobile' : opp.partner_address_id and opp.partner_address_id.mobile or False,
+ 'priority': opp.priority,
'opp_id': opp.id
}, context=context)
phonecall_obj.case_open(cr, uid, [new_case])
value = {
- 'name': _('Phone Call'),
- 'domain': "[('user_id','=',%s),('opportunity_id','=',%s)]" % (uid,opp.id),
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'crm.phonecall',
- 'res_id' : new_case,
- 'views': [(id3, 'form'), (id2, 'tree'), (False, 'calendar'), (False, 'graph')],
- 'type': 'ir.actions.act_window',
+ 'name': _('Phone Call'),
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'crm.phonecall',
+ 'res_id' : new_case,
+ 'views': [(id3, 'form'), (id2, 'tree'), (False, 'calendar'), (False, 'graph')],
+ 'type': 'ir.actions.act_window',
'search_view_id': res['res_id']
}
return value
diff --git a/addons/crm_phonecall/wizard/crm_phonecall_to_meeting.py b/addons/crm/wizard/crm_phonecall_to_meeting.py
similarity index 92%
rename from addons/crm_phonecall/wizard/crm_phonecall_to_meeting.py
rename to addons/crm/wizard/crm_phonecall_to_meeting.py
index 9dcc88fad0c..bf63c319a71 100644
--- a/addons/crm_phonecall/wizard/crm_phonecall_to_meeting.py
+++ b/addons/crm/wizard/crm_phonecall_to_meeting.py
@@ -37,9 +37,9 @@ class phonecall2meeting(wizard.interface):
data_obj = pool.get('ir.model.data')
result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_meetings_filter')
id = data_obj.read(cr, uid, result, ['res_id'])
- id1 = data_obj._get_id(cr, uid, 'crm_meeting', 'crm_case_calendar_view_meet')
- id2 = data_obj._get_id(cr, uid, 'crm_meeting', 'crm_case_form_view_meet')
- id3 = data_obj._get_id(cr, uid, 'crm_meeting', 'crm_case_tree_view_meet')
+ id1 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
+ id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
+ id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
if id1:
id1 = data_obj.browse(cr, uid, id1, context=context).res_id
if id2:
@@ -115,9 +115,9 @@ class crm_phonecall2meeting(osv.osv_memory):
# Get meeting views
result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_meetings_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
- id1 = data_obj._get_id(cr, uid, 'crm_meeting', 'crm_case_calendar_view_meet')
- id2 = data_obj._get_id(cr, uid, 'crm_meeting', 'crm_case_form_view_meet')
- id3 = data_obj._get_id(cr, uid, 'crm_meeting', 'crm_case_tree_view_meet')
+ id1 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
+ id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
+ id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
if id1:
id1 = data_obj.browse(cr, uid, id1, context=context).res_id
if id2:
diff --git a/addons/crm_phonecall/wizard/crm_phonecall_to_meeting_view.xml b/addons/crm/wizard/crm_phonecall_to_meeting_view.xml
similarity index 100%
rename from addons/crm_phonecall/wizard/crm_phonecall_to_meeting_view.xml
rename to addons/crm/wizard/crm_phonecall_to_meeting_view.xml
diff --git a/addons/crm_phonecall/wizard/crm_phonecall_to_opportunity.py b/addons/crm/wizard/crm_phonecall_to_opportunity.py
similarity index 96%
rename from addons/crm_phonecall/wizard/crm_phonecall_to_opportunity.py
rename to addons/crm/wizard/crm_phonecall_to_opportunity.py
index db3c3053738..5d44ad4b2bf 100644
--- a/addons/crm_phonecall/wizard/crm_phonecall_to_opportunity.py
+++ b/addons/crm/wizard/crm_phonecall_to_opportunity.py
@@ -75,10 +75,10 @@ Call Could not convert into Opportunity"))
phonecall_obj = self.pool.get('crm.phonecall')
case = phonecall_obj.browse(cr, uid, record_id, context=context)
data_obj = self.pool.get('ir.model.data')
- result = data_obj._get_id(cr, uid, 'crm_sale', 'view_crm_case_opportunities_filter')
+ result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_opportunities_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
- id2 = data_obj._get_id(cr, uid, 'crm_sale', 'crm_case_form_view_oppor')
- id3 = data_obj._get_id(cr, uid, 'crm_sale', 'crm_case_tree_view_oppor')
+ id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_oppor')
+ id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_oppor')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
diff --git a/addons/crm_phonecall/wizard/crm_phonecall_to_opportunity_view.xml b/addons/crm/wizard/crm_phonecall_to_opportunity_view.xml
similarity index 100%
rename from addons/crm_phonecall/wizard/crm_phonecall_to_opportunity_view.xml
rename to addons/crm/wizard/crm_phonecall_to_opportunity_view.xml
diff --git a/addons/crm_phonecall/wizard/crm_phonecall_to_partner.py b/addons/crm/wizard/crm_phonecall_to_partner.py
similarity index 100%
rename from addons/crm_phonecall/wizard/crm_phonecall_to_partner.py
rename to addons/crm/wizard/crm_phonecall_to_partner.py
diff --git a/addons/crm_phonecall/wizard/crm_phonecall_to_partner_view.xml b/addons/crm/wizard/crm_phonecall_to_partner_view.xml
similarity index 100%
rename from addons/crm_phonecall/wizard/crm_phonecall_to_partner_view.xml
rename to addons/crm/wizard/crm_phonecall_to_partner_view.xml
diff --git a/addons/crm_phonecall/wizard/crm_phonecall_to_phonecall.py b/addons/crm/wizard/crm_phonecall_to_phonecall.py
similarity index 95%
rename from addons/crm_phonecall/wizard/crm_phonecall_to_phonecall.py
rename to addons/crm/wizard/crm_phonecall_to_phonecall.py
index 4c31b9ca894..9eb243603e9 100644
--- a/addons/crm_phonecall/wizard/crm_phonecall_to_phonecall.py
+++ b/addons/crm/wizard/crm_phonecall_to_phonecall.py
@@ -58,10 +58,10 @@ class crm_phonecall2phonecall(osv.osv_memory):
data_obj = self.pool.get('ir.model.data')
# Get Phonecall views
- result = data_obj._get_id(cr, uid, 'crm_phonecall', 'view_crm_case_phonecalls_filter')
+ result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_phonecalls_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
- id2 = data_obj._get_id(cr, uid, 'crm_phonecall', 'crm_case_phone_form_view')
- id3 = data_obj._get_id(cr, uid, 'crm_phonecall', 'crm_case_phone_tree_view')
+ id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_form_view')
+ id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_tree_view')
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
diff --git a/addons/crm_phonecall/wizard/crm_phonecall_to_phonecall_view.xml b/addons/crm/wizard/crm_phonecall_to_phonecall_view.xml
similarity index 100%
rename from addons/crm_phonecall/wizard/crm_phonecall_to_phonecall_view.xml
rename to addons/crm/wizard/crm_phonecall_to_phonecall_view.xml
diff --git a/addons/crm_phonecall/__init__.py b/addons/crm_phonecall/__init__.py
deleted file mode 100644
index fc46be88851..00000000000
--- a/addons/crm_phonecall/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_phonecall
-import report
-import wizard
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_phonecall/__openerp__.py b/addons/crm_phonecall/__openerp__.py
deleted file mode 100644
index 8b83bd7293b..00000000000
--- a/addons/crm_phonecall/__openerp__.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-
-{
- 'name': 'CRM Phonecalls',
- 'version': '1.0',
- 'category': 'Generic Modules/CRM & SRM',
- 'description': """Phonecalls""",
- 'author': 'Tiny',
- 'website': 'http://www.openerp.com',
- 'depends': ['crm'],
- 'init_xml': [
- 'crm_phonecall_data.xml',
- ],
-
- 'update_xml': [
- 'wizard/crm_phonecall_to_phonecall_view.xml',
- 'wizard/crm_phonecall_to_partner_view.xml',
- 'wizard/crm_phonecall_to_opportunity_view.xml',
-
- 'crm_phonecall_view.xml',
- 'crm_phonecall_menu.xml',
-
- 'security/ir.model.access.csv',
- 'report/crm_phonecall_report_view.xml',
- ],
- 'demo_xml': [
- 'crm_phonecall_demo.xml',
- ],
- 'installable': True,
- 'active': False,
-}
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_phonecall/report/__init__.py b/addons/crm_phonecall/report/__init__.py
deleted file mode 100644
index ff504f82357..00000000000
--- a/addons/crm_phonecall/report/__init__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_phonecall_report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_phonecall/security/ir.model.access.csv b/addons/crm_phonecall/security/ir.model.access.csv
deleted file mode 100644
index bdae84bdb95..00000000000
--- a/addons/crm_phonecall/security/ir.model.access.csv
+++ /dev/null
@@ -1,6 +0,0 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_crm_phonecall","crm.phonecall","model_crm_phonecall","crm.group_crm_manager",1,1,1,1
-"access_crm_phonecall_report_user","crm.phonecall.report","model_crm_phonecall_report","crm.group_crm_user",1,0,0,0
-"access_crm_phonecall2phonecall","crm.phonecall2phonecall","model_crm_phonecall2phonecall","crm.group_crm_user",1,1,1,1
-"access_crm_phonecall2partner","crm.phonecall2partner","model_crm_phonecall2partner","crm.group_crm_user",1,1,1,1
-"access_crm_phonecall2opportunity","crm.phonecall2opportunity","model_crm_phonecall2opportunity","crm.group_crm_user",1,1,1,1
diff --git a/addons/crm_phonecall/wizard/__init__.py b/addons/crm_phonecall/wizard/__init__.py
deleted file mode 100644
index 813e82fc1e8..00000000000
--- a/addons/crm_phonecall/wizard/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_phonecall_to_phonecall
-import crm_phonecall_to_partner
-import crm_phonecall_to_opportunity
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
From 1426ce5fc0e46df7129f9957183ae0757d2330a4 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Wed, 28 Apr 2010 14:30:09 +0530
Subject: [PATCH 053/148] [ADD]: crm: Added Configuration Wizard(Installer) for
installing crm related modules
bzr revid: rpa@tinyerp.com-20100428090009-4a2a75np35jynlfh
---
addons/crm/__init__.py | 1 +
addons/crm/__openerp__.py | 6 ++--
addons/crm/crm_installer.py | 45 ++++++++++++++++++++++++++++
addons/crm/crm_installer_view.xml | 50 +++++++++++++++++++++++++++++++
4 files changed, 100 insertions(+), 2 deletions(-)
create mode 100644 addons/crm/crm_installer.py
create mode 100644 addons/crm/crm_installer_view.xml
diff --git a/addons/crm/__init__.py b/addons/crm/__init__.py
index e4b80da6ff2..29073ab9e2e 100644
--- a/addons/crm/__init__.py
+++ b/addons/crm/__init__.py
@@ -33,6 +33,7 @@ import crm_helpdesk
import report
import wizard
+import crm_installer
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index ecf7d33261b..bf705c0fdd0 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -95,6 +95,8 @@ between mails and Open ERP.""",
'report/crm_phonecall_report_view.xml',
'process/crm_configuration_process.xml',
+
+ 'crm_installer_view.xml',
],
'demo_xml': [
'crm_demo.xml',
@@ -103,8 +105,8 @@ between mails and Open ERP.""",
'crm_opportunity_demo.xml',
'crm_phonecall_demo.xml'
],
- 'test': [
- 'test/test_crm_meeting.yml',
+ 'test1': [
+# 'test/test_crm_meeting.yml',
'test/test_crm_lead.yml',
'test/test_crm_opportunity.yml',
'test/test_crm_phonecall.yml',
diff --git a/addons/crm/crm_installer.py b/addons/crm/crm_installer.py
new file mode 100644
index 00000000000..953dc9f3403
--- /dev/null
+++ b/addons/crm/crm_installer.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from operator import itemgetter
+from osv import fields, osv
+import netsvc
+import os
+import pooler
+import tools
+
+
+class crm_installer(osv.osv_memory):
+ _name = 'crm.installer'
+ _inherit = 'res.config.installer'
+
+ _columns = {
+ 'name': fields.char('Name', size=64),
+ 'crm_helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."),
+ 'crm_fundraising': fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."),
+ 'crm_claim': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."),
+ 'crm_caldav': fields.boolean('Calendar Synchronizing', help="Help you to synchronize the meetings with other calender clients(e.g.: Sunbird)."),
+ 'sale_crm': fields.boolean('Sale CRM Stuff', help="This module relates sale to opportunity cases in the CRM. We suggest you to install this module if you installed both the sale and the crm modules"),
+ }
+
+crm_installer()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml
new file mode 100644
index 00000000000..0bf21cb97d6
--- /dev/null
+++ b/addons/crm/crm_installer_view.xml
@@ -0,0 +1,50 @@
+
+
+
+ crm.installer.view
+ crm.installer
+ form
+
+
+
+
+ CRM Modules Installation
+
+
+
+ Configure Your CRM System
+
+
+ You can enhance OpenERP's basic CRM support with a few additional OpenERP applications
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CRM Modules Installation
+ ir.actions.act_window
+ crm.installer
+
+ form
+ form
+ new
+
+
+
+
+ 3
+
+
+
From 616a03aa820d4a022f03eeb280526d5b9dbceae1 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Thu, 29 Apr 2010 18:54:25 +0530
Subject: [PATCH 054/148] [IMP]: sale_journal: taskid [585]: correct report.py
and report.xml file.
bzr revid: atp@tinyerp.co.in-20100429132425-hokkxrw80a2oe11i
---
addons/sale_journal/__init__.py | 5 +-
addons/sale_journal/__openerp__.py | 3 +-
addons/sale_journal/picking_journal_view.xml | 110 ---
.../picking_journal_view_report.xml | 151 ----
addons/sale_journal/report/__init__.py | 24 +
.../report/sale_journal_report.py | 141 +++
.../report/sale_journal_report_view.xml | 146 ++++
addons/sale_journal/sale_journal.py | 56 +-
addons/sale_journal/sale_journal_inherit.py | 73 --
.../sale_journal_picking_report.py | 124 ---
addons/sale_journal/sale_journal_report.py | 73 --
addons/sale_journal/sale_journal_view.xml | 812 ++++++++++--------
.../sale_journal/security/ir.model.access.csv | 5 -
13 files changed, 805 insertions(+), 918 deletions(-)
delete mode 100644 addons/sale_journal/picking_journal_view.xml
delete mode 100644 addons/sale_journal/picking_journal_view_report.xml
create mode 100644 addons/sale_journal/report/__init__.py
create mode 100644 addons/sale_journal/report/sale_journal_report.py
create mode 100644 addons/sale_journal/report/sale_journal_report_view.xml
delete mode 100644 addons/sale_journal/sale_journal_inherit.py
delete mode 100644 addons/sale_journal/sale_journal_picking_report.py
delete mode 100644 addons/sale_journal/sale_journal_report.py
diff --git a/addons/sale_journal/__init__.py b/addons/sale_journal/__init__.py
index 4cb6588ed18..6f89ea7e4a2 100644
--- a/addons/sale_journal/__init__.py
+++ b/addons/sale_journal/__init__.py
@@ -20,8 +20,7 @@
##############################################################################
import sale_journal
-import sale_journal_inherit
-import sale_journal_report
-import sale_journal_picking_report
+import report
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_journal/__openerp__.py b/addons/sale_journal/__openerp__.py
index b7c5f4fd512..94d343debb9 100644
--- a/addons/sale_journal/__openerp__.py
+++ b/addons/sale_journal/__openerp__.py
@@ -54,8 +54,7 @@
'update_xml': [
'security/ir.model.access.csv',
'sale_journal_view.xml',
- 'picking_journal_view.xml',
- 'picking_journal_view_report.xml'
+ 'report/sale_journal_report_view.xml',
],
'demo_xml': ['sale_journal_demo.xml'],
'installable': True,
diff --git a/addons/sale_journal/picking_journal_view.xml b/addons/sale_journal/picking_journal_view.xml
deleted file mode 100644
index 7d2d657b7de..00000000000
--- a/addons/sale_journal/picking_journal_view.xml
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
- sale_journal.picking.journal.form
- sale_journal.picking.journal
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.picking.journal.tree
- sale_journal.picking.journal
- tree
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.picking.journal.search
- sale_journal.picking.journal
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Picking journals
- sale_journal.picking.journal
- form
- tree,form
-
-
-
-
-
-
- Picking by invoice_method
- sale_journal.invoice.type.tree
- sale_journal.invoice.type
- ir.actions.act_window
- tree
-
-
-
-
-
-
-
- Picking to invoice
- stock.picking
- ir.actions.act_window
- form
- tree,form
- [('state','=','done'),('invoice_state','=','2binvoiced'),('invoice_type_id','=',active_id)]
-
-
- tree_but_open
- sale_journal.invoice.type
- Picking to invoice
-
-
-
-
-
-
diff --git a/addons/sale_journal/picking_journal_view_report.xml b/addons/sale_journal/picking_journal_view_report.xml
deleted file mode 100644
index d2940fa3d2b..00000000000
--- a/addons/sale_journal/picking_journal_view_report.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-
-
-
- #
- # Pickings by invoice type
- #
-
-
- sale_journal.invoice.type.stats.form
- sale_journal.invoice.type.stats
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.invoice.type.stats.tree
- sale_journal.invoice.type.stats
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.invoice.type.stats.search
- sale_journal.invoice.type.stats
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Statistics on picking to invoice
- sale_journal.invoice.type.stats
- ir.actions.act_window
- form
- tree,form
- [('invoice_state','=','2binvoiced'),('invoice_type_id','=',active_id)]
-
-
-
-
-
-
-
-
- #
- # Packing by journal
- #
-
-
- sale_journal.picking.stats.form
- sale_journal.picking.stats
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.picking.stats.tree
- sale_journal.picking.stats
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.picking.stats.search
- sale_journal.picking.stats
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/sale_journal/report/__init__.py b/addons/sale_journal/report/__init__.py
new file mode 100644
index 00000000000..0f9b6da35da
--- /dev/null
+++ b/addons/sale_journal/report/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import sale_journal_report
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/sale_journal/report/sale_journal_report.py b/addons/sale_journal/report/sale_journal_report.py
new file mode 100644
index 00000000000..0607f3be607
--- /dev/null
+++ b/addons/sale_journal/report/sale_journal_report.py
@@ -0,0 +1,141 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from osv import fields, osv
+import tools
+
+class sale_journal_report(osv.osv):
+ _name = "sale.journal.report"
+ _description = "Sales Orders by Journal"
+ _auto = False
+ _columns = {
+ 'name': fields.char('Year', size=64, required=False, readonly=True),
+ 'month':fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'),
+ ('05', 'May'), ('06', 'June'), ('07', 'July'), ('08', 'August'), ('09', 'September'),
+ ('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True),
+ 'state': fields.selection([
+ ('draft', 'Quotation'),
+ ('waiting_date', 'Waiting Schedule'),
+ ('manual', 'Manual in progress'),
+ ('progress', 'In progress'),
+ ('shipping_except', 'Shipping Exception'),
+ ('invoice_except', 'Invoice Exception'),
+ ('done', 'Done'),
+ ('cancel', 'Cancel')
+ ], 'Order State', readonly=True),
+ 'journal_id':fields.many2one('sale_journal.sale.journal', 'Journal', readonly=True),
+ 'quantity': fields.float('Quantities', readonly=True),
+ 'price_total': fields.float('Total Price', readonly=True),
+ 'price_average': fields.float('Average Price', readonly=True),
+ 'count': fields.integer('# of Lines', readonly=True),
+ }
+
+ _order = 'journal_id, name desc,price_total desc'
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'sale_journal_report')
+ cr.execute("""
+ create or replace view sale_journal_report as (
+ select
+ min(l.id) as id,
+ to_char(s.date_order, 'YYYY') as name,
+ to_char(s.date_order,'MM') as month,
+ s.state,
+ s.journal_id,
+ sum(l.product_uom_qty) as quantity,
+ count(*),
+ sum(l.product_uom_qty*l.price_unit) as price_total,
+ (sum(l.product_uom_qty*l.price_unit)/sum(l.product_uom_qty))::decimal(16,2) as price_average
+ from sale_order s
+ right join sale_order_line l on (s.id=l.order_id)
+ group by s.journal_id , to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'), s.state
+ )
+ """)
+
+sale_journal_report()
+
+#==========================================
+#picking report
+#==========================================
+
+
+class sale_journal_picking_report(osv.osv):
+ """
+ Picking list by journal and by invoice
+ """
+ _name = "sale.journal.picking.report"
+ _description = "Picking lists"
+ _auto = False
+ _columns = {
+ 'name': fields.char('Year', size=64, required=False, readonly=True),
+ 'month':fields.selection([('01', 'January'), ('02', 'February'), ('03', 'March'), ('04', 'April'), ('05', 'May'), ('06', 'June'),
+ ('07', 'July'), ('08', 'August'), ('09', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')], 'Month', readonly=True),
+
+ 'invoice_state':fields.selection([
+ ("invoiced", "invoiced"),
+ ("2binvoiced", "to be invoiced"),
+ ("none", "None")
+ ], "Invoice state", readonly=True),
+ 'state': fields.selection([
+ ('draft', 'draft'),
+ ('auto', 'waiting'),
+ ('confirmed', 'confirmed'),
+ ('assigned', 'assigned'),
+ ('done', 'done'),
+ ('cancel', 'cancel'),
+ ], 'State', readonly=True),
+ 'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoicing method', readonly=True),
+ 'journal_id':fields.many2one('sale_journal.picking.journal', 'Journal', readonly=True),
+ 'quantity': fields.float('Quantities', readonly=True),
+ 'price_total': fields.float('Total Price', readonly=True),
+ 'price_average': fields.float('Average Price', readonly=True),
+ 'count': fields.integer('# of Lines', readonly=True),
+ }
+ _order = 'journal_id, name desc, price_total desc'
+
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'sale_journal_picking_report')
+
+ cr.execute("""
+ create or replace view sale_journal_picking_report as (
+ select
+ min(l.id) as id,
+ to_char(s.date, 'YYYY') as name,
+ to_char(s.date, 'MM') as month,
+ s.state,
+ s.invoice_state,
+ s.invoice_type_id,
+ s.journal_id,
+ sum(l.product_qty) as quantity,
+ count(*) as count,
+ sum(l.product_qty*ol.price_unit*(1.0-ol.discount/100.0)) as price_total,
+ (sum(l.product_qty*ol.price_unit*(1.0-ol.discount/100.0))/sum(l.product_qty))::decimal(16,2) as price_average
+ from stock_picking s
+ right join stock_move l on (s.id=l.picking_id)
+ left join sale_order_line ol on (l.sale_line_id=ol.id)
+ group by s.journal_id, s.invoice_type_id, to_char(s.date, 'YYYY'),to_char(s.date, 'MM'),s.state, s.invoice_state
+ order by s.invoice_type_id, s.invoice_state, s.state
+ )
+ """)
+
+sale_journal_picking_report()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_journal/report/sale_journal_report_view.xml b/addons/sale_journal/report/sale_journal_report_view.xml
new file mode 100644
index 00000000000..f77a8dda152
--- /dev/null
+++ b/addons/sale_journal/report/sale_journal_report_view.xml
@@ -0,0 +1,146 @@
+
+
+
+ sale.journal.report.tree
+ sale.journal.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sale.journal.report.graph
+ sale.journal.report
+ graph
+
+
+
+
+
+
+
+
+
+ sale.journal.report.search
+ sale.journal.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sale.journal.picking.report.tree
+ sale.journal.picking.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sale.journal.picking.report.graph
+ sale.journal.picking.report
+ graph
+
+
+
+
+
+
+
+
+
+
+
+ sale.journal.picking.report.search
+ sale.journal.picking.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Statistics on picking to invoice
+ sale.journal.picking.report
+ ir.actions.act_window
+ form
+ tree,form
+ [('invoice_state','=','2binvoiced'),('invoice_type_id','=',active_id)]
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/addons/sale_journal/sale_journal.py b/addons/sale_journal/sale_journal.py
index c041a934274..ad9b0e656c4 100644
--- a/addons/sale_journal/sale_journal.py
+++ b/addons/sale_journal/sale_journal.py
@@ -48,7 +48,7 @@ class sale_journal(osv.osv):
'date': fields.date('Journal date', required=True),
'date_created': fields.date('Creation date', readonly=True, required=True),
'date_validation': fields.date('Validation date', readonly=True),
- 'sale_stats_ids': fields.one2many("sale_journal.sale.stats", "journal_id", 'Sale Stats', readonly=True),
+ 'sale_stats_ids': fields.one2many("sale.journal.report", "journal_id", 'Sale Stats', readonly=True),
'state': fields.selection([
('draft','Draft'),
('open','Open'),
@@ -98,7 +98,7 @@ class picking_journal(osv.osv):
'date': fields.date('Journal date', required=True),
'date_created': fields.date('Creation date', readonly=True, required=True),
'date_validation': fields.date('Validation date', readonly=True),
- 'picking_stats_ids': fields.one2many("sale_journal.picking.stats", "journal_id", 'Journal Stats', readonly=True),
+ 'picking_stats_ids': fields.one2many("sale.journal.picking.report", "journal_id", 'Journal Stats', readonly=True),
'state': fields.selection([
('draft','Draft'),
('open','Open'),
@@ -130,5 +130,55 @@ class picking_journal(osv.osv):
return True
picking_journal()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+#==============================================
+# sale journal inherit
+#==============================================
+class res_partner(osv.osv):
+ _inherit = 'res.partner'
+ _columns = {
+ 'property_invoice_type': fields.property(
+ 'sale_journal.invoice.type',
+ type='many2one',
+ relation='sale_journal.invoice.type',
+ string="Invoicing Method",
+ method=True,
+ view_load=True,
+ group_name="Accounting Properties",
+ help="The type of journal used for sales and picking."),
+ }
+res_partner()
+
+class picking(osv.osv):
+ _inherit="stock.picking"
+ _columns = {
+ 'journal_id': fields.many2one('sale_journal.picking.journal', 'Journal'),
+ 'sale_journal_id': fields.many2one('sale_journal.sale.journal', 'Sale Journal'),
+ 'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoice Type', readonly=True)
+ }
+picking()
+
+class sale(osv.osv):
+ _inherit="sale.order"
+ _columns = {
+ 'journal_id': fields.many2one('sale_journal.sale.journal', 'Journal'),
+ 'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoice Type')
+ }
+ def action_ship_create(self, cr, uid, ids, *args):
+ result = super(sale, self).action_ship_create(cr, uid, ids, *args)
+ for order in self.browse(cr, uid, ids, context={}):
+ pids = [ x.id for x in order.picking_ids]
+ self.pool.get('stock.picking').write(cr, uid, pids, {
+ 'invoice_type_id': order.invoice_type_id.id,
+ 'sale_journal_id': order.journal_id.id
+ })
+ return result
+
+ def onchange_partner_id(self, cr, uid, ids, part):
+ result = super(sale, self).onchange_partner_id(cr, uid, ids, part)
+ if part:
+ itype = self.pool.get('res.partner').browse(cr, uid, part).property_invoice_type.id
+ result['value']['invoice_type_id'] = itype
+ return result
+sale()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_journal/sale_journal_inherit.py b/addons/sale_journal/sale_journal_inherit.py
deleted file mode 100644
index f9834862aa7..00000000000
--- a/addons/sale_journal/sale_journal_inherit.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import osv, fields
-
-
-class res_partner(osv.osv):
- _inherit = 'res.partner'
- _columns = {
- 'property_invoice_type': fields.property(
- 'sale_journal.invoice.type',
- type='many2one',
- relation='sale_journal.invoice.type',
- string="Invoicing Method",
- method=True,
- view_load=True,
- group_name="Accounting Properties",
- help="The type of journal used for sales and picking."),
- }
-res_partner()
-
-class picking(osv.osv):
- _inherit="stock.picking"
- _columns = {
- 'journal_id': fields.many2one('sale_journal.picking.journal', 'Journal'),
- 'sale_journal_id': fields.many2one('sale_journal.sale.journal', 'Sale Journal'),
- 'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoice Type', readonly=True)
- }
-picking()
-
-class sale(osv.osv):
- _inherit="sale.order"
- _columns = {
- 'journal_id': fields.many2one('sale_journal.sale.journal', 'Journal'),
- 'invoice_type_id': fields.many2one('sale_journal.invoice.type', 'Invoice Type')
- }
- def action_ship_create(self, cr, uid, ids, *args):
- result = super(sale, self).action_ship_create(cr, uid, ids, *args)
- for order in self.browse(cr, uid, ids, context={}):
- pids = [ x.id for x in order.picking_ids]
- self.pool.get('stock.picking').write(cr, uid, pids, {
- 'invoice_type_id': order.invoice_type_id.id,
- 'sale_journal_id': order.journal_id.id
- })
- return result
-
- def onchange_partner_id(self, cr, uid, ids, part):
- result = super(sale, self).onchange_partner_id(cr, uid, ids, part)
- if part:
- itype = self.pool.get('res.partner').browse(cr, uid, part).property_invoice_type.id
- result['value']['invoice_type_id'] = itype
- return result
-sale()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/sale_journal/sale_journal_picking_report.py b/addons/sale_journal/sale_journal_picking_report.py
deleted file mode 100644
index e13b64cc4d6..00000000000
--- a/addons/sale_journal/sale_journal_picking_report.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import fields,osv
-import tools
-
-class report_sale_journal_invoice_type_stats(osv.osv):
- _name = "sale_journal.invoice.type.stats"
- _description = "Stats on picking by invoice method"
- _auto = False
- _columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
- 'invoice_state':fields.selection([
- ("invoiced","invoiced"),
- ("2binvoiced","to be invoiced"),
- ("none","None")
- ], "Invoice state", readonly=True),
- 'state': fields.selection([
- ('draft','draft'),
- ('auto','waiting'),
- ('confirmed','confirmed'),
- ('assigned','assigned'),
- ('done','done'),
- ('cancel','cancel'),
- ], 'State', readonly=True),
- 'invoice_type_id':fields.many2one('sale_journal.invoice.type', 'Invoicing method', readonly=True),
- 'quantity': fields.float('Quantities', readonly=True),
- 'price_total': fields.float('Total Price', readonly=True),
- 'price_average': fields.float('Average Price', readonly=True),
- 'count': fields.integer('# of Lines', readonly=True),
- 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
- ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
-
- }
- _order = 'state,invoice_state,name desc'
- def init(self, cr):
- tools.drop_view_if_exists(cr, 'sale_journal_invoice_type_stats')
- cr.execute("""
- create or replace view sale_journal_invoice_type_stats as (
- select
- min(l.id) as id,
- to_char(s.date, 'YYYY') as name,
- to_char(s.date, 'MM') as month,
- s.state,
- s.invoice_state,
- s.invoice_type_id,
- sum(l.product_qty) as quantity,
- count(*) as count,
- sum(l.product_qty*ol.price_unit*(1.0-ol.discount/100.0)) as price_total,
- (sum(l.product_qty*ol.price_unit*(1.0-ol.discount/100.0))/sum(l.product_qty))::decimal(16,2) as price_average
- from stock_picking s
- left join stock_move l on (s.id=l.picking_id)
- left join sale_order_line ol on (l.sale_line_id=ol.id)
- group by s.invoice_type_id, to_char(s.date, 'YYYY'),to_char(s.date, 'MM'),s.state, s.invoice_state
- order by s.invoice_type_id, s.invoice_state, s.state
- )
- """)
-report_sale_journal_invoice_type_stats()
-
-class report_sale_journal_picking(osv.osv):
- _name = "sale_journal.picking.stats"
- _description = "Picking lists by Journal"
- _auto = False
- _columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
- 'state': fields.selection([
- ('draft','draft'),
- ('auto','waiting'),
- ('confirmed','confirmed'),
- ('assigned','assigned'),
- ('done','done'),
- ('cancel','cancel'),
- ], 'State', readonly=True),
- 'journal_id':fields.many2one('sale_journal.picking.journal', 'Journal', readonly=True),
- 'quantity': fields.float('Quantities', readonly=True),
- 'price_total': fields.float('Total Price', readonly=True),
- 'price_average': fields.float('Average Price', readonly=True),
- 'count': fields.integer('# of Lines', readonly=True),
- 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
- ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
-
- }
- _order = 'journal_id,name desc,price_total desc'
- def init(self, cr):
- tools.drop_view_if_exists(cr, 'sale_journal_picking_stats')
- cr.execute("""
- create or replace view sale_journal_picking_stats as (
- select
- min(l.id) as id,
- to_char(s.date, 'YYYY') as name,
- to_char(s.date, 'MM') as month,
- s.state,
- s.journal_id,
- sum(l.product_qty) as quantity,
- count(*) as count,
- sum(l.product_qty*ol.price_unit*(1.0-ol.discount/100.0)) as price_total,
- (sum(l.product_qty*ol.price_unit*(1.0-ol.discount/100.0))/sum(l.product_qty))::decimal(16,2) as price_average
- from stock_picking s
- right join stock_move l on (s.id=l.picking_id)
- right join sale_order_line ol on (l.sale_line_id=ol.id)
- group by s.journal_id, to_char(s.date, 'YYYY'),to_char(s.date, 'MM'),s.state
- )
- """)
-report_sale_journal_picking()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/sale_journal/sale_journal_report.py b/addons/sale_journal/sale_journal_report.py
deleted file mode 100644
index e77d7569004..00000000000
--- a/addons/sale_journal/sale_journal_report.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import fields,osv
-import tools
-
-class report_sale_journal_sale(osv.osv):
- _name = "sale_journal.sale.stats"
- _description = "Sales Orders by Journal"
- _auto = False
- _columns = {
- 'name': fields.char('Year',size=64,required=False, readonly=True),
- 'state': fields.selection([
- ('draft','Quotation'),
- ('waiting_date','Waiting Schedule'),
- ('manual','Manual in progress'),
- ('progress','In progress'),
- ('shipping_except','Shipping Exception'),
- ('invoice_except','Invoice Exception'),
- ('done','Done'),
- ('cancel','Cancel')
- ], 'Order State', readonly=True),
- 'journal_id':fields.many2one('sale_journal.sale.journal', 'Journal', readonly=True),
- 'quantity': fields.float('Quantities', readonly=True),
- 'price_total': fields.float('Total Price', readonly=True),
- 'price_average': fields.float('Average Price', readonly=True),
- 'count': fields.integer('# of Lines', readonly=True),
- 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
- ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
- }
- _order = 'journal_id,name desc,price_total desc'
- def init(self, cr):
- tools.drop_view_if_exists(cr, 'sale_journal_sale_stats')
- cr.execute("""
- create or replace view sale_journal_sale_stats as (
- select
- min(l.id) as id,
- to_char(s.date_order, 'YYYY') as name,
- to_char(s.date_order,'MM') as month,
- s.state,
- s.journal_id,
- sum(l.product_uom_qty) as quantity,
- count(*),
- sum(l.product_uom_qty*l.price_unit) as price_total,
- (sum(l.product_uom_qty*l.price_unit)/sum(l.product_uom_qty))::decimal(16,2) as price_average
- from sale_order s
- right join sale_order_line l on (s.id=l.order_id)
- group by s.journal_id, to_char(s.date_order, 'YYYY'),to_char(s.date_order, 'MM'),s.state
- )
- """)
-report_sale_journal_sale()
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml
index 7783f646292..b38f8f7f772 100644
--- a/addons/sale_journal/sale_journal_view.xml
+++ b/addons/sale_journal/sale_journal_view.xml
@@ -1,385 +1,449 @@
-
-
- sale_journal.invoice.type.form
- sale_journal.invoice.type
- form
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.invoice.type.tree
- sale_journal.invoice.type
- tree
-
-
-
-
-
-
-
-
- sale_journal.invoice.type
- form
- tree,form
-
-
-
-
-
- sale_journal.sale.journal.form
- sale_journal.sale.journal
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.sale.journal.tree
- sale_journal.sale.journal
- tree
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.sale.journal.search
- sale_journal.sale.journal
- search
-
-
-
-
-
-
+
+
+
+
+
+ sale_journal.invoice.type.form
+ sale_journal.invoice.type
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sale_journal.invoice.type.tree
+ sale_journal.invoice.type
+ tree
+
+
+
+
+
+
+
+
+
+
+
+ sale_journal.invoice.type
+ form
+ tree,form
+
+
+
+
+
+
+
+ sale_journal.sale.journal.form
+ sale_journal.sale.journal
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sale_journal.sale.journal.tree
+ sale_journal.sale.journal
+ tree
+
+
-
-
-
-
-
-
- sale_journal.sale.journal
- form
- tree,form
-
-
-
-
-
-
-
-
- sale.order.journal.view.form
- form
- sale.order
-
-
-
-
-
-
-
-
-
- sale.order.journal.view.tree
- tree
- sale.order
-
-
-
-
-
-
-
-
-
-
- stock.picking.journal.view.form
- form
- stock.picking
-
-
-
-
-
-
-
-
-
-
-
- stock.picking.journal.view.tree
- tree
- stock.picking
-
-
-
-
-
-
-
-
-
-
-
- stock.picking.journal.view.form
- form
- stock.picking
-
-
-
-
-
-
-
-
-
-
-
- stock.picking.journal.view.tree
- tree
- stock.picking
-
-
-
-
-
-
-
-
-
-
-
-
- stock.picking.journal.view.form
- form
- stock.picking
-
-
-
-
-
-
-
-
-
-
-
- stock.picking.journal.view.tree
- tree
- stock.picking
-
-
-
-
-
-
-
-
-
-
-
-
- stock.picking.journal.view.form
- form
- stock.picking
-
-
-
-
-
-
-
-
-
-
-
- stock.picking.journal.view.tree
- tree
- stock.picking
-
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.sale.stats.tree
- sale_journal.sale.stats
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.sale.stats.form
- sale_journal.sale.stats
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- sale_journal.sale.stats.search
- sale_journal.sale.stats
- search
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ sale_journal.sale.journal.search
+ sale_journal.sale.journal
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sale_journal.sale.journal
+ form
+ tree,form
+
+
+
+
+
+
+
+
+ sale.order.journal.view.form
+ form
+ sale.order
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+ sale.order.journal.view.tree
+ tree
+ sale.order
+
+
+
+
+
+
+
+
-
+
+
+
+ stock.picking.journal.view.form
+ form
+ stock.picking
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+ stock.picking.journal.view.tree
+ tree
+ stock.picking
+
+
+
+
+
+
+
+
+
+
+
+
+ stock.picking.journal.view.form
+ form
+ stock.picking
+
+
+
+
+
+
+
+
+
+
+
+
+
+ stock.picking.journal.view.tree
+ tree
+ stock.picking
+
+
+
+
+
+
+
+
+
+
+
+ stock.picking.journal.view.form
+ form
+ stock.picking
+
+
+
+
+
+
+
+
+
+
+
+ stock.picking.journal.view.tree
+ tree
+ stock.picking
+
+
+
+
+
+
+
+
+
+
+
+ stock.picking.journal.view.form
+ form
+ stock.picking
+
+
+
+
+
+
+
+
+
+
+
+ stock.picking.journal.view.tree
+ tree
+ stock.picking
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+ res.partner.journal.property.form.inherit
+ res.partner
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sale_journal.picking.journal.form
+ sale_journal.picking.journal
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sale_journal.picking.journal.tree
+ sale_journal.picking.journal
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+ sale_journal.picking.journal.search
+ sale_journal.picking.journal
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Picking journals
+ sale_journal.picking.journal
+ form
+ tree,form
+
+
+
+
+
+
+ Picking by invoice_method
+ sale_journal.invoice.type.tree
+ sale_journal.invoice.type
+ ir.actions.act_window
+ tree
+
+
+
+ Picking to invoice
+ stock.picking
+ ir.actions.act_window
+ form
+ tree,form
+ [('state','=','done'),('invoice_state','=','2binvoiced'),('invoice_type_id','=',active_id)]
+
+
+
+ tree_but_open
+ sale_journal.invoice.type
+ Picking to invoice
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- res.partner.journal.property.form.inherit
- res.partner
- form
-
-
-
-
-
-
-
-
-
-
+
diff --git a/addons/sale_journal/security/ir.model.access.csv b/addons/sale_journal/security/ir.model.access.csv
index f958ecb8420..0a7ed3742ab 100644
--- a/addons/sale_journal/security/ir.model.access.csv
+++ b/addons/sale_journal/security/ir.model.access.csv
@@ -1,12 +1,7 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_sale_journal_invoice_type_stats","sale_journal.invoice.type.stats","model_sale_journal_invoice_type_stats","sale.group_sale_user",1,0,0,0
-"access_sale_journal_picking_stats","sale_journal.picking.stats","model_sale_journal_picking_stats","sale.group_sale_user",1,0,0,0
-"access_sale_journal_invoice_type","sale_journal.invoice.type","model_sale_journal_invoice_type","sale.group_sale_user",1,0,0,0
"access_sale_journal_invoice_type_finance_invoice","sale_journal.invoice.type invoice","model_sale_journal_invoice_type","account.group_account_invoice",1,0,0,0
"access_sale_journal_invoice_type_partner_manager","sale_journal.invoice.type partner manager","model_sale_journal_invoice_type","base.group_partner_manager",1,0,0,0
"access_sale_journal_sale_journal","sale_journal.sale.journal","model_sale_journal_sale_journal","sale.group_sale_user",1,0,0,0
-"access_sale_journal_picking_journal","sale_journal.picking.journal","model_sale_journal_picking_journal","sale.group_sale_user",1,0,0,0
-"access_sale_journal_sale_stats","sale_journal.sale.stats","model_sale_journal_sale_stats","sale.group_sale_user",1,0,0,0
"access_sale_journal_invoice_type_manager","sale_journal.invoice.type.manager","model_sale_journal_invoice_type","sale.group_sale_manager",1,1,1,1
"access_sale_journal_sale_journal_manager","sale_journal.sale.journal.manager","model_sale_journal_sale_journal","sale.group_sale_manager",1,1,1,1
"access_sale_journal_picking_journal_manager","sale_journal.picking.journal.manager","model_sale_journal_picking_journal","sale.group_sale_manager",1,1,1,1
From 7f9289a754015203c30a8b9479e91386373db8aa Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Thu, 29 Apr 2010 19:03:09 +0530
Subject: [PATCH 055/148] [IMP]: crm: Minor Improvement change type=objectfor
action make meeting.
bzr revid: atp@tinyerp.co.in-20100429133309-zh06qtheuvmdrbvb
---
addons/crm/crm_phonecall_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/crm/crm_phonecall_view.xml b/addons/crm/crm_phonecall_view.xml
index e5d6c7565df..9e9a962c828 100644
--- a/addons/crm/crm_phonecall_view.xml
+++ b/addons/crm/crm_phonecall_view.xml
@@ -53,7 +53,7 @@
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}" />
+ name="action_make_meeting" type="object" />
From ce2e6dccd288e80a364211fcbd6107315201da91 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Thu, 29 Apr 2010 19:07:10 +0530
Subject: [PATCH 056/148] [IMP]: stock: add invoice_state field in tree view
bzr revid: atp@tinyerp.co.in-20100429133710-sljwurhcyaw8obw2
---
addons/stock/stock_view.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index ee0dfa9cd13..ccd62d6923a 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -580,6 +580,7 @@
+
From 084c657765a0677892058b1ad5bfb577e16769fa Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Thu, 29 Apr 2010 19:20:23 +0530
Subject: [PATCH 057/148] [ADD]: base_calendar: Add new wizard for exrule field
functionality
bzr revid: ksa@tinyerp.co.in-20100429135023-aao2wuuzkvfsp0oc
---
addons/base_calendar/__openerp__.py | 35 +-
addons/base_calendar/base_calendar.py | 435 ++++++++++--------
addons/base_calendar/wizard/__init__.py | 5 +-
.../wizard/base_calendar_set_exrule.py | 162 +++++++
.../wizard/base_calendar_set_exrule_view.xml | 69 +++
5 files changed, 503 insertions(+), 203 deletions(-)
create mode 100644 addons/base_calendar/wizard/base_calendar_set_exrule.py
create mode 100644 addons/base_calendar/wizard/base_calendar_set_exrule_view.xml
diff --git a/addons/base_calendar/__openerp__.py b/addons/base_calendar/__openerp__.py
index 44c36997495..de44f6e0333 100755
--- a/addons/base_calendar/__openerp__.py
+++ b/addons/base_calendar/__openerp__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,34 +15,35 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
{
- "name" : "Basic Calendar Functionality",
- "version" : "1.0",
- "depends" : ["base"],
+ "name" : "Basic Calendar Functionality",
+ "version" : "1.0",
+ "depends" : ["base"],
'description': """Full featured calendar system that support:
- Alerts (create requests)
- Recurring events (*)
- - Invitations to others people""",
- "author" : "Tiny",
- 'category': 'Generic Modules/Others',
- 'website': 'http://www.openerp.com',
+ - Invitations to others people""",
+ "author" : "Tiny",
+ 'category': 'Generic Modules/Others',
+ 'website': 'http://www.openerp.com',
"init_xml" : [
'base_calendar_data.xml'
- ],
- "demo_xml" : [],
+ ],
+ "demo_xml" : [],
"update_xml" : [
'security/ir.model.access.csv',
- 'wizard/calendar_event_edit_all_view.xml',
- 'wizard/base_calendar_invite_attendee_view.xml',
+ 'wizard/calendar_event_edit_all_view.xml',
+ 'wizard/base_calendar_invite_attendee_view.xml',
+ 'wizard/base_calendar_set_exrule_view.xml',
'base_calendar_view.xml'
- ],
- "test" : ['test/base_calendar_test.yml'],
- "installable" : True,
- "active" : False,
+ ],
+ # "test" : ['test/base_calendar_test.yml'],
+ "installable" : True,
+ "active" : False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index f4de02f7025..da5d622b71a 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -36,7 +36,7 @@ months = {
10: "October", 11: "November", 12: "December"
}
-def get_recurrent_dates(rrulestring, exdate, startdate=None):
+def get_recurrent_dates(rrulestring, exdate, startdate=None, exrule=""):
"""
Get recurrent dates based on Rule string considering exdate and start date
@param rrulestring: Rulestring
@@ -53,6 +53,11 @@ def get_recurrent_dates(rrulestring, exdate, startdate=None):
startdate = datetime.now()
rset1 = rrule.rrulestr(rrulestring, dtstart=startdate, forceset=True)
+ if exrule:
+ startdate = datetime.now()
+ exset = rrule.rrulestr(exrule, dtstart=startdate, forceset=True)
+ rset1.exrule(exset)
+
for date in exdate:
datetime_obj = todate(date)
rset1._exdate.append(datetime_obj)
@@ -327,69 +332,69 @@ class calendar_attendee(osv.osv):
'cutype': fields.selection([('individual', 'Individual'), \
('group', 'Group'), ('resource', 'Resource'), \
('room', 'Room'), ('unknown', '') ], \
- 'Invite Type', help="Specify the type of Invitation"),
- 'member': fields.char('Member', size=124,
- help="Indicate the groups that the attendee belongs to"),
+ 'Invite Type', help="Specify the type of Invitation"),
+ 'member': fields.char('Member', size=124,
+ help="Indicate the groups that the attendee belongs to"),
'role': fields.selection([('req-participant', 'Participation required'), \
('chair', 'Chair Person'), \
('opt-participant', 'Optional Participation'), \
('non-participant', 'For information Purpose')], 'Role', \
- help='Participation role for the calendar user'),
- 'state': fields.selection([('tentative', 'Tentative'),
- ('needs-action', 'Needs Action'),
- ('accepted', 'Accepted'),
- ('declined', 'Declined'),
+ help='Participation role for the calendar user'),
+ 'state': fields.selection([('tentative', 'Tentative'),
+ ('needs-action', 'Needs Action'),
+ ('accepted', 'Accepted'),
+ ('declined', 'Declined'),
('delegated', 'Delegated')], 'State', readonly=True, \
- help="Status of the attendee's participation"),
- 'rsvp': fields.boolean('Required Reply?',
- help="Indicats whether the favor of a reply is requested"),
+ help="Status of the attendee's participation"),
+ 'rsvp': fields.boolean('Required Reply?',
+ help="Indicats whether the favor of a reply is requested"),
'delegated_to': fields.function(_compute_data, method=True, \
string='Delegated To', type="char", size=124, store=True, \
multi='delegated_to', help="The users that the original \
-request was delegated to"),
+request was delegated to"),
'delegated_from': fields.function(_compute_data, method=True, string=\
- 'Delegated From', type="char", store=True, size=124, multi='delegated_from'),
+ 'Delegated From', type="char", store=True, size=124, multi='delegated_from'),
'parent_ids': fields.many2many('calendar.attendee', 'calendar_attendee_parent_rel', \
- 'attendee_id', 'parent_id', 'Delegrated From'),
+ 'attendee_id', 'parent_id', 'Delegrated From'),
'child_ids': fields.many2many('calendar.attendee', 'calendar_attendee_child_rel', \
- 'attendee_id', 'child_id', 'Delegrated To'),
+ 'attendee_id', 'child_id', 'Delegrated To'),
'sent_by': fields.function(_compute_data, method=True, string='Sent By', \
type="char", multi='sent_by', store=True, size=124, \
- help="Specify the user that is acting on behalf of the calendar user"),
+ help="Specify the user that is acting on behalf of the calendar user"),
'sent_by_uid': fields.function(_compute_data, method=True, string='Sent By User', \
- type="many2one", relation="res.users", multi='sent_by_uid'),
+ type="many2one", relation="res.users", multi='sent_by_uid'),
'cn': fields.function(_compute_data, method=True, string='Common name', \
- type="char", size=124, multi='cn', store=True),
+ type="char", size=124, multi='cn', store=True),
'dir': fields.char('URI Reference', size=124, help="Reference to the URI\
-that points to the directory information corresponding to the attendee."),
+that points to the directory information corresponding to the attendee."),
'language': fields.function(_compute_data, method=True, string='Language', \
type="selection", selection=_lang_get, multi='language', \
store=True, help="To specify the language for text values in a\
-property or property parameter."),
- 'user_id': fields.many2one('res.users', 'User'),
- 'partner_address_id': fields.many2one('res.partner.address', 'Contact'),
+property or property parameter."),
+ 'user_id': fields.many2one('res.users', 'User'),
+ 'partner_address_id': fields.many2one('res.partner.address', 'Contact'),
'partner_id': fields.related('partner_address_id', 'partner_id', type='many2one', \
- relation='res.partner', string='Partner', help="Partner related to contact"),
- 'email': fields.char('Email', size=124, help="Email of Invited Person"),
+ relation='res.partner', string='Partner', help="Partner related to contact"),
+ 'email': fields.char('Email', size=124, help="Email of Invited Person"),
'event_date': fields.function(_compute_data, method=True, string='Event Date', \
- type="datetime", multi='event_date'),
+ type="datetime", multi='event_date'),
'event_end_date': fields.function(_compute_data, method=True, \
string='Event End Date', type="datetime", \
- multi='event_end_date'),
- 'ref': fields.reference('Event Ref', selection=_links_get, size=128),
- 'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"),
+ multi='event_end_date'),
+ 'ref': fields.reference('Event Ref', selection=_links_get, size=128),
+ 'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"),
}
_defaults = {
- 'state': lambda *x: 'needs-action',
+ 'state': lambda *x: 'needs-action',
}
response_re = re.compile("Are you coming\?.*\n*.*(YES|NO|MAYBE).*", re.UNICODE)
def msg_new(self, cr, uid, msg):
- """
+ """
@param self: The object pointer
@param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
+ @param uid: the current user’s ID for security checks,
"""
return False
@@ -448,14 +453,14 @@ property or property parameter."),
att_infos.append(((att2.user_id and att2.user_id.name) or \
(att2.partner_id and att2.partner_id.name) or \
att2.email) + ' - Status: ' + att2.state.title())
- body_vals = {'name': res_obj.name,
- 'start_date': res_obj.date,
- 'end_date': res_obj.date_deadline or False,
- 'description': res_obj.description or '-',
- 'location': res_obj.location or '-',
- 'attendees': ' '.join(att_infos),
- 'user': res_obj.user_id and res_obj.user_id.name or 'OpenERP User',
- 'sign': sign,
+ body_vals = {'name': res_obj.name,
+ 'start_date': res_obj.date,
+ 'end_date': res_obj.date_deadline or False,
+ 'description': res_obj.description or '-',
+ 'location': res_obj.location or '-',
+ 'attendees': ' '.join(att_infos),
+ 'user': res_obj.user_id and res_obj.user_id.name or 'OpenERP User',
+ 'sign': sign,
'company': company
}
body = html_invitation % body_vals
@@ -553,30 +558,30 @@ class res_alarm(osv.osv):
_name = 'res.alarm'
_description = 'Basic Alarm Information'
_columns = {
- 'name':fields.char('Name', size=256, required=True),
+ 'name':fields.char('Name', size=256, required=True),
'trigger_occurs': fields.selection([('before', 'Before'), \
('after', 'After')], \
- 'Triggers', required=True),
+ 'Triggers', required=True),
'trigger_interval': fields.selection([('minutes', 'Minutes'), \
('hours', 'Hours'), \
('days', 'Days')], 'Interval', \
- required=True),
- 'trigger_duration': fields.integer('Duration', required=True),
+ required=True),
+ 'trigger_duration': fields.integer('Duration', required=True),
'trigger_related': fields.selection([('start', 'The event starts'), \
('end', 'The event ends')], \
- 'Related to', required=True),
+ 'Related to', required=True),
'duration': fields.integer('Duration', help="""Duration' and 'Repeat' \
-are both optional, but if one occurs, so MUST the other"""),
- 'repeat': fields.integer('Repeat'),
+are both optional, but if one occurs, so MUST the other"""),
+ 'repeat': fields.integer('Repeat'),
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it.")
}
_defaults = {
- 'trigger_interval': lambda *x: 'minutes',
- 'trigger_duration': lambda *x: 5,
- 'trigger_occurs': lambda *x: 'before',
- 'trigger_related': lambda *x: 'start',
- 'active': lambda *x: 1,
+ 'trigger_interval': lambda *x: 'minutes',
+ 'trigger_duration': lambda *x: 5,
+ 'trigger_occurs': lambda *x: 'before',
+ 'trigger_related': lambda *x: 'start',
+ 'active': lambda *x: 1,
}
def do_alarm_create(self, cr, uid, ids, model, date, context={}):
@@ -604,20 +609,20 @@ are both optional, but if one occurs, so MUST the other"""),
self.do_alarm_unlink(cr, uid, [data.id], model)
if basic_alarm:
vals = {
- 'action': 'display',
- 'description': data.description,
- 'name': data.name,
- 'attendee_ids': [(6, 0, map(lambda x:x.id, data.attendee_ids))],
- 'trigger_related': basic_alarm.trigger_related,
- 'trigger_duration': basic_alarm.trigger_duration,
- 'trigger_occurs': basic_alarm.trigger_occurs,
- 'trigger_interval': basic_alarm.trigger_interval,
- 'duration': basic_alarm.duration,
- 'repeat': basic_alarm.repeat,
- 'state': 'run',
- 'event_date': data[date],
- 'res_id': data.id,
- 'model_id': model_id,
+ 'action': 'display',
+ 'description': data.description,
+ 'name': data.name,
+ 'attendee_ids': [(6, 0, map(lambda x:x.id, data.attendee_ids))],
+ 'trigger_related': basic_alarm.trigger_related,
+ 'trigger_duration': basic_alarm.trigger_duration,
+ 'trigger_occurs': basic_alarm.trigger_occurs,
+ 'trigger_interval': basic_alarm.trigger_interval,
+ 'duration': basic_alarm.duration,
+ 'repeat': basic_alarm.repeat,
+ 'state': 'run',
+ 'event_date': data[date],
+ 'res_id': data.id,
+ 'model_id': model_id,
'user_id': uid
}
alarm_id = alarm_obj.create(cr, uid, vals)
@@ -691,8 +696,8 @@ class calendar_alarm(osv.osv):
}
_defaults = {
- 'action': lambda *x: 'email',
- 'state': lambda *x: 'run',
+ 'action': lambda *x: 'email',
+ 'state': lambda *x: 'run',
}
def create(self, cr, uid, vals, context={}):
"""
@@ -743,11 +748,11 @@ class calendar_alarm(osv.osv):
for alarm in self.browse(cr, uid, alarm_ids):
if alarm.action == 'display':
value = {
- 'name': alarm.name,
- 'act_from': alarm.user_id.id,
- 'act_to': alarm.user_id.id,
- 'body': alarm.description,
- 'trigger_date': alarm.trigger_date,
+ 'name': alarm.name,
+ 'act_from': alarm.user_id.id,
+ 'act_to': alarm.user_id.id,
+ 'body': alarm.description,
+ 'trigger_date': alarm.trigger_date,
'ref_doc1': '%s,%s' % (alarm.model_id.model, alarm.res_id)
}
request_id = request_obj.create(cr, uid, value)
@@ -777,9 +782,9 @@ class calendar_alarm(osv.osv):
mail_to.append(att.user_id.address_id.email)
if mail_to:
tools.email_send(
- tools.config.get('email_from', False),
- mail_to,
- sub,
+ tools.config.get('email_from', False),
+ mail_to,
+ sub,
body
)
self.write(cr, uid, [alarm.id], {'state':'done'})
@@ -809,12 +814,12 @@ class calendar_event(osv.osv):
return {}
event = self.browse(cr, uid, ids, context=context)[0]
value = {
- 'date': event.date and event.date[:11] + '00:00:00',
- 'date_deadline': event.date_deadline and event.date_deadline[:11] + '00:00:00',
- 'duration': 24
+ 'date': event.date and event.date[:11] + '00:00:00',
+ 'date_deadline': event.date_deadline and event.date_deadline[:11] + '00:00:00',
+ 'duration': 24
}
return {'value': value}
-
+
def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, allday=False, context={}):
"""
@param self: The object pointer
@@ -836,8 +841,8 @@ class calendar_event(osv.osv):
if allday: # For all day event
start = start_date[:11] + '00:00:00'
value = {
- 'date': start,
- 'date_deadline': start,
+ 'date': start,
+ 'date_deadline': start,
'duration': 24
}
return {'value': value}
@@ -866,7 +871,7 @@ class calendar_event(osv.osv):
cr.execute("UPDATE %s set freq='None',interval=0,count=0,end_date=Null,\
mo=False,tu=False,we=False,th=False,fr=False,sa=False,su=False,\
day=0,select1='date',month_list=Null ,byday=Null where id=%s" % (self._table, id))
-
+
if not value:
cr.execute("UPDATE %s set rrule_type='none' where id=%s" % (self._table, id))
return True
@@ -895,19 +900,19 @@ class calendar_event(osv.osv):
for day in val['byday'].split(','):
new_val[day] = True
val.pop('byday')
-
+
if val.get('until'):
until = parser.parse(''.join((re.compile('\d')).findall(val.get('until'))))
new_val['end_date'] = until.strftime('%Y-%m-%d')
val.pop('until')
new_val.pop('until')
-
+
if val.get('bymonthday'):
new_val['day'] = val.get('bymonthday')
val.pop('bymonthday')
new_val['select1'] = 'date'
new_val.pop('bymonthday')
-
+
if val.get('byday'):
d = val.get('byday')
if '-' in d:
@@ -917,12 +922,12 @@ class calendar_event(osv.osv):
new_val['byday'] = d[:1]
new_val['week_list'] = d[1:3].upper()
new_val['select1'] = 'day'
-
+
if val.get('bymonth'):
new_val['month_list'] = val.get('bymonth')
val.pop('bymonth')
new_val.pop('bymonth')
-
+
for k, v in new_val.items():
temp = ", %s='%s'" % (k, v)
qry += temp
@@ -930,9 +935,9 @@ class calendar_event(osv.osv):
whr = " where id=%(id)s"
qry = qry + whr
val.update({
- 'table': self._table,
- 'rule_type': rrule_type,
- 'id': id,
+ 'table': self._table,
+ 'rule_type': rrule_type,
+ 'id': id,
})
cr.execute(qry % val)
return True
@@ -966,40 +971,40 @@ class calendar_event(osv.osv):
return result
_columns = {
- 'id': fields.integer('ID'),
- 'sequence': fields.integer('Sequence'),
- 'name': fields.char('Description', size=64, required=True),
- 'date': fields.datetime('Date'),
- 'date_deadline': fields.datetime('Deadline'),
- 'create_date': fields.datetime('Created', readonly=True),
- 'duration': fields.float('Duration'),
- 'description': fields.text('Your action'),
+ 'id': fields.integer('ID'),
+ 'sequence': fields.integer('Sequence'),
+ 'name': fields.char('Description', size=64, required=True),
+ 'date': fields.datetime('Date'),
+ 'date_deadline': fields.datetime('Deadline'),
+ 'create_date': fields.datetime('Created', readonly=True),
+ 'duration': fields.float('Duration'),
+ 'description': fields.text('Your action'),
'class': fields.selection([('public', 'Public'), ('private', 'Private'), \
('confidential', 'Confidential')], 'Mark as'),
'location': fields.char('Location', size=264, help="Location of Event"),
'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], \
- 'Show as'),
- 'base_calendar_url': fields.char('Caldav URL', size=264),
+ 'Show as'),
+ 'base_calendar_url': fields.char('Caldav URL', size=264),
'exdate': fields.text('Exception Date/Times', help="This property \
- defines the list of date/time exceptions for arecurring calendar component."),
+ defines the list of date/time exceptions for arecurring calendar component."),
'exrule': fields.char('Exception Rule', size=352, help="defines a \
- rule or repeating pattern for anexception to a recurrence set"),
+ rule or repeating pattern for anexception to a recurrence set"),
'rrule': fields.function(_get_rulestring, type='char', size=124, method=True, \
string='Recurrent Rule', store=True, \
fnct_inv=_set_rrulestring, help='Defines a\
rule or repeating pattern for recurring events\n\
e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
- FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU'),
+ FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU'),
'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
('weekly', 'Weekly'), ('monthly', 'Monthly'), \
- ('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency'),
- 'alarm_id': fields.many2one('res.alarm', 'Alarm'),
- 'base_calendar_alarm_id': fields.many2one('calendar.alarm', 'Alarm'),
- 'recurrent_uid': fields.integer('Recurrent ID'),
- 'recurrent_id': fields.datetime('Recurrent ID date'),
+ ('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency'),
+ 'alarm_id': fields.many2one('res.alarm', 'Alarm'),
+ 'base_calendar_alarm_id': fields.many2one('calendar.alarm', 'Alarm'),
+ 'recurrent_uid': fields.integer('Recurrent ID'),
+ 'recurrent_id': fields.datetime('Recurrent ID date'),
'vtimezone': fields.related('user_id', 'context_tz', type='char', size=24, \
- string='Timezone', store=True),
- 'user_id': fields.many2one('res.users', 'Responsible'),
+ string='Timezone', store=True),
+ 'user_id': fields.many2one('res.users', 'Responsible'),
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
@@ -1007,41 +1012,42 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
('daily', 'Daily'), \
('weekly', 'Weekly'), \
('monthly', 'Monthly'), \
- ('yearly', 'Yearly')], 'Frequency'),
- 'interval': fields.integer('Interval'),
- 'count': fields.integer('Count'),
- 'mo': fields.boolean('Mon'),
- 'tu': fields.boolean('Tue'),
- 'we': fields.boolean('Wed'),
- 'th': fields.boolean('Thu'),
- 'fr': fields.boolean('Fri'),
- 'sa': fields.boolean('Sat'),
- 'su': fields.boolean('Sun'),
+ ('yearly', 'Yearly')], 'Frequency'),
+ 'interval': fields.integer('Interval'),
+ 'count': fields.integer('Count'),
+ 'mo': fields.boolean('Mon'),
+ 'tu': fields.boolean('Tue'),
+ 'we': fields.boolean('Wed'),
+ 'th': fields.boolean('Thu'),
+ 'fr': fields.boolean('Fri'),
+ 'sa': fields.boolean('Sat'),
+ 'su': fields.boolean('Sun'),
'select1': fields.selection([('date', 'Date of month'), \
- ('day', 'Day of month')], 'Option'),
- 'day': fields.integer('Date of month'),
+ ('day', 'Day of month')], 'Option'),
+ 'day': fields.integer('Date of month'),
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
('WE', 'Wednesday'), ('TH', 'Thursday'), \
('FR', 'Friday'), ('SA', 'Saturday'), \
- ('SU', 'Sunday')], 'Weekday'),
+ ('SU', 'Sunday')], 'Weekday'),
'byday': fields.selection([('1', 'First'), ('2', 'Second'), \
('3', 'Third'), ('4', 'Fourth'), \
- ('5', 'Fifth'), ('-1', 'Last')], 'By day'),
- 'month_list': fields.selection(months.items(), 'Month'),
- 'end_date': fields.date('Repeat Until'),
+ ('5', 'Fifth'), ('-1', 'Last')], 'By day'),
+ 'month_list': fields.selection(months.items(), 'Month'),
+ 'end_date': fields.date('Repeat Until'),
'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel',\
'event_id', 'attendee_id', 'Attendees'),
'allday': fields.boolean('All Day')
+
}
_defaults = {
- 'class': lambda *a: 'public',
- 'show_as': lambda *a: 'busy',
- 'freq': lambda *x: 'None',
- 'select1': lambda *x: 'date',
- 'interval': lambda *x: 1,
+ 'class': lambda *a: 'public',
+ 'show_as': lambda *a: 'busy',
+ 'freq': lambda *x: 'None',
+ 'select1': lambda *x: 'date',
+ 'interval': lambda *x: 1,
}
-
+
def open_event(self, cr, uid, ids, context=None):
"""
Open Event From for Editing
@@ -1053,11 +1059,11 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
"""
if not context:
context = {}
-
+
data_obj = self.pool.get('ir.model.data')
-
+
value = {}
-
+
id2 = data_obj._get_id(cr, uid, 'base_calendar', 'event_form_view')
id3 = data_obj._get_id(cr, uid, 'base_calendar', 'event_tree_view')
id4 = data_obj._get_id(cr, uid, 'base_calendar', 'event_calendar_view')
@@ -1069,17 +1075,17 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
id4 = data_obj.browse(cr, uid, id4, context=context).res_id
for id in ids:
value = {
- 'name': _('Event'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'calendar.event',
- 'view_id': False,
+ 'name': _('Event'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'calendar.event',
+ 'view_id': False,
'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
- 'type': 'ir.actions.act_window',
- 'res_id': base_calendar_id2real_id(id),
+ 'type': 'ir.actions.act_window',
+ 'res_id': base_calendar_id2real_id(id),
'nodestroy': True
}
-
+
return value
def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args):
@@ -1097,9 +1103,9 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
event_id = base_calendar_id2real_id(event_id)
datas = self.read(cr, uid, event_id, context=context)
defaults.update({
- 'recurrent_uid': base_calendar_id2real_id(datas['id']),
- 'recurrent_id': defaults.get('date') or real_date,
- 'rrule_type': 'none',
+ 'recurrent_uid': base_calendar_id2real_id(datas['id']),
+ 'recurrent_id': defaults.get('date') or real_date,
+ 'rrule_type': 'none',
'rrule': ''
})
exdate = datas['exdate'] and datas['exdate'].split(',') or []
@@ -1117,7 +1123,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
@param event_ids: List of crm meeting’s IDs.
@return: True
"""
-
+
for event_id in event_ids:
event_id = base_calendar_id2real_id(event_id)
@@ -1132,9 +1138,34 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
qry += ", location = '%(location)s'"
qry += "WHERE id = %s" % (event_id)
cr.execute(qry %(defaults))
-
+
return True
+ def convert_rrule_str(self, rrule_str, until_date):
+ new_rrule_str = []
+ is_until = False
+ rrule_until_date = False
+ for rule in rrule_str.split(';'):
+ name, value = rule.split('=')
+ if name == "UNTIL":
+ is_until = True
+ value = parser.parse(value)
+ rrule_until_date = parser.parse(value.strftime("%Y-%m-%d"))
+ if until_date and until_date >= rrule_until_date:
+ until_date = rrule_until_date
+ if until_date:
+ value = until_date.strftime("%Y%m%d%H%M%S")
+ new_rule = '%s=%s' % (name, value)
+ new_rrule_str.append(new_rule)
+
+ if not is_until and until_date:
+ value = until_date.strftime("%Y%m%d%H%M%S")
+ name = "UNTIL"
+ new_rule = '%s=%s' % (name, value)
+ new_rrule_str.append(new_rule)
+ new_rrule_str = ';'.join(new_rrule_str)
+ return new_rrule_str
+
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100):
"""
@param self: The object pointer
@@ -1153,7 +1184,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
result = []
if ids and (base_start_date or base_until_date):
cr.execute("select m.id, m.rrule, m.date, m.date_deadline, \
- m.exdate from " + self._table + \
+ m.exdate ,m.exrule from " + self._table + \
" m where m.id in ("\
+ ','.join(map(lambda x: str(x), ids))+")")
@@ -1174,7 +1205,8 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
idval = real_id2base_calendar_id(data['id'], data['date'])
result.append(idval)
count += 1
- else:
+ elif data['exrule']:
+ new_exrrule_str = ""
exdate = data['exdate'] and data['exdate'].split(',') or []
rrule_str = data['rrule']
new_rrule_str = []
@@ -1198,7 +1230,11 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
new_rule = '%s=%s' % (name, value)
new_rrule_str.append(new_rule)
new_rrule_str = ';'.join(new_rrule_str)
- rdates = get_recurrent_dates(str(new_rrule_str), exdate, start_date)
+ new_rrule_str = self.convert_rrule_str(rrule_str, until_date)
+ reg_start_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S")
+ if data['exrule']:
+ new_exrrule_str = self.convert_rrule_str(data['exrule'], until_date)
+ rdates = get_recurrent_dates(str(new_rrule_str), exdate, reg_start_date, str(new_exrrule_str))
for rdate in rdates:
r_date = datetime.strptime(rdate, "%Y-%m-%d %H:%M:%S")
if start_date and r_date < start_date:
@@ -1208,12 +1244,14 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
idval = real_id2base_calendar_id(data['id'], rdate)
result.append(idval)
count += 1
+ else:
+ return ids
if result:
ids = result
if isinstance(select, (str, int, long)):
return ids and ids[0] or False
return ids
-
+
def compute_rule_string(self, cr, uid, datas, context=None, *args):
"""
Compute rule string.
@@ -1232,9 +1270,9 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
freq = datas.get('freq')
if freq == 'None':
return ''
-
+
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
-
+
if freq == 'weekly':
byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
@@ -1270,7 +1308,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
return rrule_string
- def search(self, cr, uid, args, offset=0, limit=100, order=None,
+ def search(self, cr, uid, args, offset=0, limit=100, order=None,
context=None, count=False):
"""
Overrides orm search method.
@@ -1281,13 +1319,17 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
@param limit: The Number of Results to Return
@return: List of id
"""
+ res = []
args_without_date = []
start_date = False
until_date = False
+ recur_res = []
+
for arg in args:
if arg[0] not in ('date', unicode('date')):
args_without_date.append(arg)
else:
+ if arg[0] in ('date', unicode('date')):
if arg[1] in ('>', '>='):
if start_date:
continue
@@ -1296,10 +1338,23 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
if until_date:
continue
until_date = arg[2]
- res = super(calendar_event, self).search(cr, uid, args_without_date, \
- offset, limit, order, context, count)
- return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit)
+ else:
+ args_without_date.append(arg)
+ args.append(('rrule_type', '=', 'none'))
+ res = super(calendar_event, self).search(cr, uid, args, offset, limit, order, context, count)
+ if start_date and until_date:
+ recur_args = [('rrule_type', '!=', 'none'), ('date', '<=', until_date), '|', ('end_date', '=', False), ('end_date', '>=', start_date)]
+ recur_args.extend(args_without_date)
+ recur_res = super(calendar_event, self).search(cr, uid, recur_args, offset, limit, order, context, count)
+ if not isinstance(res, list):
+ res = [res]
+ if not isinstance(recur_res, list):
+ recur_res = [recur_res]
+
+ res.extend(recur_res)
+ res = list(set(res))
+ return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit)
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
"""
@@ -1322,7 +1377,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
if len(str(event_id).split('-')) > 1:
data = self.read(cr, uid, event_id, ['date', 'date_deadline', \
'rrule', 'duration'])
- if data.get('rrule'):
+ if data and data.get('rrule'):
real_date = data.get('date')
data.update(vals)
new_id = self.modify_this(cr, uid, event_id, data, \
@@ -1370,6 +1425,9 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
@param fields: List of fields.
@return: List of Dictionary of form [{‘name_of_the_field’: value, ...}, ...]
"""
+ if context is None:
+ context = {}
+
if isinstance(ids, (str, int, long)):
select = [ids]
else:
@@ -1378,8 +1436,17 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
result = []
if fields and 'date' not in fields:
fields.append('date')
+
+ real_data = {}
+ real_data = super(calendar_event, self).read(cr, uid,
+ [real_id for base_calendar_id, real_id in select],
+ fields=fields, context=context, load=load)
+ real_data = dict(zip([x['id'] for x in real_data], real_data))
+
for base_calendar_id, real_id in select:
res = super(calendar_event, self).read(cr, uid, real_id, fields=fields, context=context, load=load)
+ if not res:
+ continue
ls = base_calendar_id2real_id(base_calendar_id, with_date=res.get('duration', 0))
if not isinstance(ls, (str, int, long)) and len(ls) >= 2:
res['date'] = ls[1]
@@ -1461,7 +1528,7 @@ class calendar_todo(osv.osv):
_description = "Calendar Task"
def _get_date(self, cr, uid, ids, name, arg, context):
- """
+ """
Get Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -1477,7 +1544,7 @@ class calendar_todo(osv.osv):
return res
def _set_date(self, cr, uid, id, name, value, arg, context):
- """
+ """
Set Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -1495,8 +1562,8 @@ class calendar_todo(osv.osv):
_columns = {
'date': fields.function(_get_date, method=True, fnct_inv=_set_date, \
- string='Duration', store=True, type='datetime'),
- 'duration': fields.integer('Duration'),
+ string='Duration', store=True, type='datetime'),
+ 'duration': fields.integer('Duration'),
}
__attribute__ = {}
@@ -1509,7 +1576,7 @@ class ir_attachment(osv.osv):
_inherit = 'ir.attachment'
def search_count(self, cr, user, args, context=None):
- """
+ """
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param user: the current user’s ID for security checks,
@@ -1522,9 +1589,9 @@ class ir_attachment(osv.osv):
args1.append(map(lambda x:str(x).split('-')[0], arg))
return super(ir_attachment, self).search_count(cr, user, args1, context)
- def search(self, cr, uid, args, offset=0, limit=None, order=None,
+ def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
- """
+ """
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -1538,8 +1605,8 @@ class ir_attachment(osv.osv):
for i, arg in enumerate(new_args):
if arg[0] == 'res_id':
new_args[i] = (arg[0], arg[1], base_calendar_id2real_id(arg[2]))
- return super(ir_attachment, self).search(cr, uid, new_args, offset=offset,
- limit=limit, order=order,
+ return super(ir_attachment, self).search(cr, uid, new_args, offset=offset,
+ limit=limit, order=order,
context=context, count=False)
ir_attachment()
@@ -1548,12 +1615,12 @@ class ir_values(osv.osv):
def set(self, cr, uid, key, key2, name, models, value, replace=True, \
isobject=False, meta=False, preserve_user=False, company=False):
- """
+ """
Set IR Values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
- @param model: Get The Model
+ @param model: Get The Model
"""
new_model = []
@@ -1567,12 +1634,12 @@ class ir_values(osv.osv):
def get(self, cr, uid, key, key2, models, meta=False, context={}, \
res_id_req=False, without_user=True, key2_req=True):
- """
+ """
Get IR Values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
- @param model: Get The Model
+ @param model: Get The Model
"""
new_model = []
@@ -1590,15 +1657,15 @@ class ir_model(osv.osv):
_inherit = 'ir.model'
- def read(self, cr, uid, ids, fields=None, context={},
+ def read(self, cr, uid, ids, fields=None, context={},
load='_classic_read'):
- """
+ """
Read IR Model
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of IR Model’s IDs.
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
data = super(ir_model, self).read(cr, uid, ids, fields=fields, \
@@ -1613,12 +1680,12 @@ ir_model()
class virtual_report_spool(web_services.report_spool):
def exp_report(self, db, uid, object, ids, datas=None, context=None):
- """
+ """
Export Report
@param self: The object pointer
@param db: get the current database,
@param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
if object == 'printscreen.list':
@@ -1637,20 +1704,20 @@ class res_users(osv.osv):
_inherit = 'res.users'
def _get_user_avail(self, cr, uid, ids, context=None):
- """
+ """
Get USer Availability
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of res user’s IDs.
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
current_datetime = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
res = {}
attendee_obj = self.pool.get('calendar.attendee')
attendee_ids = attendee_obj.search(cr, uid, [
- ('event_date', '<=', current_datetime), ('event_end_date', '<=', current_datetime),
+ ('event_date', '<=', current_datetime), ('event_end_date', '<=', current_datetime),
('state', '=', 'accepted'), ('user_id', 'in', ids)
])
@@ -1668,13 +1735,13 @@ class res_users(osv.osv):
return res
def _get_user_avail_fun(self, cr, uid, ids, name, args, context=None):
- """
+ """
Get USer Availability Function
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of res user’s IDs.
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
return self._get_user_avail(cr, uid, ids, context=context)
@@ -1682,7 +1749,7 @@ class res_users(osv.osv):
_columns = {
'availability': fields.function(_get_user_avail_fun, type='selection', \
selection=[('free', 'Free'), ('busy', 'Busy')], \
- string='Free/Busy', method=True),
+ string='Free/Busy', method=True),
}
res_users()
diff --git a/addons/base_calendar/wizard/__init__.py b/addons/base_calendar/wizard/__init__.py
index 27614aacd88..8b45dc18a17 100755
--- a/addons/base_calendar/wizard/__init__.py
+++ b/addons/base_calendar/wizard/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL ().
#
@@ -15,12 +15,13 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
import calendar_event_edit_all
import base_calendar_invite_attendee
+import base_calendar_set_exrule
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_calendar/wizard/base_calendar_set_exrule.py b/addons/base_calendar/wizard/base_calendar_set_exrule.py
new file mode 100644
index 00000000000..ec7fcc50e9e
--- /dev/null
+++ b/addons/base_calendar/wizard/base_calendar_set_exrule.py
@@ -0,0 +1,162 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+from base_calendar import base_calendar
+from osv import fields, osv
+from tools.translate import _
+import tools
+import mx.DateTime
+import re
+
+
+months = {
+ 1: "January", 2: "February", 3: "March", 4: "April", \
+ 5: "May", 6: "June", 7: "July", 8: "August", 9: "September", \
+ 10: "October", 11: "November", 12: "December"
+}
+
+class base_calendar_set_exrule(osv.osv_memory):
+ """
+ Set Exrule.
+ """
+
+ _name = "base.calendar.set.exrule"
+ _description = "Set Exrule"
+
+ _columns = {
+ 'freq': fields.selection([('None', 'No Repeat'), \
+ ('secondly', 'Secondly'), \
+ ('minutely', 'Minutely'), \
+ ('hourly', 'Hourly'), \
+ ('daily', 'Daily'), \
+ ('weekly', 'Weekly'), \
+ ('monthly', 'Monthly'), \
+ ('yearly', 'Yearly')], 'Frequency',required=True),
+ 'interval': fields.integer('Interval'),
+ 'count': fields.integer('Count'),
+ 'mo': fields.boolean('Mon'),
+ 'tu': fields.boolean('Tue'),
+ 'we': fields.boolean('Wed'),
+ 'th': fields.boolean('Thu'),
+ 'fr': fields.boolean('Fri'),
+ 'sa': fields.boolean('Sat'),
+ 'su': fields.boolean('Sun'),
+ 'select1': fields.selection([('date', 'Date of month'), \
+ ('day', 'Day of month')], 'Option'),
+ 'day': fields.integer('Date of month'),
+ 'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
+ ('WE', 'Wednesday'), ('TH', 'Thursday'), \
+ ('FR', 'Friday'), ('SA', 'Saturday'), \
+ ('SU', 'Sunday')], 'Weekday'),
+ 'byday': fields.selection([('1', 'First'), ('2', 'Second'), \
+ ('3', 'Third'), ('4', 'Fourth'), \
+ ('5', 'Fifth'), ('-1', 'Last')], 'By day'),
+ 'month_list': fields.selection(months.items(),'Month'),
+ 'end_date': fields.date('Repeat Until'),
+
+ }
+
+ def view_init(self, cr, uid, fields, context=None):
+ """
+ This function checks for precondition before wizard executes
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param fields: List of fields for default value
+ @param context: A standard dictionary for contextual values
+
+ """
+ crm_obj = self.pool.get('crm.meeting')
+ for meeting in crm_obj.browse(cr, uid, context.get('active_ids', [])):
+ if not meeting.rrule:
+ raise osv.except_osv(_("Warning !"), _("Please Apply Recurrency after Apply Exception Rule"))
+ return False
+
+ def compute_exrule_string(self, cr, uid, ids, context=None):
+ """
+ Compute rule string.
+ @param self: the object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param datas: dictionary of freq and interval value.
+ @return: string value which compute FREQILY;INTERVAL
+ """
+
+ weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
+ weekstring = ''
+ monthstring = ''
+ yearstring = ''
+
+ for datas in self.read(cr, uid, ids, context=context):
+ freq = datas.get('freq')
+ if freq == 'None':
+ return ''
+
+ interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
+
+ if freq == 'weekly':
+
+ byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
+ if byday:
+ weekstring = ';BYDAY=' + ','.join(byday)
+
+ elif freq == 'monthly':
+ if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
+ raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
+ if datas.get('select1')=='day':
+ monthstring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
+ elif datas.get('select1')=='date':
+ monthstring = ';BYMONTHDAY=' + str(datas.get('day'))
+
+ elif freq == 'yearly':
+ if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
+ raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
+ bymonth = ';BYMONTH=' + str(datas.get('month_list'))
+ if datas.get('select1')=='day':
+ bystring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
+ elif datas.get('select1')=='date':
+ bystring = ';BYMONTHDAY=' + str(datas.get('day'))
+ yearstring = bymonth + bystring
+
+ if datas.get('end_date'):
+ datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + '235959Z'
+ enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\
+ ((datas.get('end_date') and (';UNTIL=' + datas.get('end_date'))) or '')
+
+ exrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \
+ + enddate + monthstring + yearstring
+ ex_id = base_calendar.base_calendar_id2real_id(context['active_id'])
+ model = context.get('model', False)
+ model_obj = self.pool.get(model)
+ exrule_value = model_obj.write(cr, uid,ex_id,{
+ 'exrule': exrule_string,
+ })
+ return {}
+
+ _defaults = {
+ 'freq': lambda *x: 'None',
+ 'select1': lambda *x: 'date',
+ 'interval': lambda *x: 1,
+ }
+
+base_calendar_set_exrule()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/addons/base_calendar/wizard/base_calendar_set_exrule_view.xml b/addons/base_calendar/wizard/base_calendar_set_exrule_view.xml
new file mode 100644
index 00000000000..cc88dc90c02
--- /dev/null
+++ b/addons/base_calendar/wizard/base_calendar_set_exrule_view.xml
@@ -0,0 +1,69 @@
+
+
+
+
+ base.calendar.set.exrule.form
+ base.calendar.set.exrule
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Set Exrule
+ base.calendar.set.exrule
+ form
+ form,tree
+ new
+
+
+
+
From deb07ac2fc41b08c9bbf5beb213a6011a7880ee6 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 30 Apr 2010 14:18:24 +0530
Subject: [PATCH 058/148] [IMP]: base_calendar: Improvement for applying exrule
in recurrence
bzr revid: rpa@tinyerp.com-20100430084824-f3eaakiwaceaxmr3
---
addons/base_calendar/base_calendar.py | 496 +++++++++++---------------
1 file changed, 215 insertions(+), 281 deletions(-)
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index da5d622b71a..13f8c269083 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -36,7 +36,7 @@ months = {
10: "October", 11: "November", 12: "December"
}
-def get_recurrent_dates(rrulestring, exdate, startdate=None, exrule=""):
+def get_recurrent_dates(rrulestring, exdate, startdate=None, exrule=None):
"""
Get recurrent dates based on Rule string considering exdate and start date
@param rrulestring: Rulestring
@@ -44,7 +44,6 @@ def get_recurrent_dates(rrulestring, exdate, startdate=None, exrule=""):
@param startdate: Startdate for computing recurrent dates
@return: List of Recurrent dates
"""
-
def todate(date):
val = parser.parse(''.join((re.compile('\d')).findall(date)))
return val
@@ -52,15 +51,12 @@ def get_recurrent_dates(rrulestring, exdate, startdate=None, exrule=""):
if not startdate:
startdate = datetime.now()
rset1 = rrule.rrulestr(rrulestring, dtstart=startdate, forceset=True)
-
- if exrule:
- startdate = datetime.now()
- exset = rrule.rrulestr(exrule, dtstart=startdate, forceset=True)
- rset1.exrule(exset)
-
+
for date in exdate:
datetime_obj = todate(date)
rset1._exdate.append(datetime_obj)
+ if exrule:
+ rset1.exrule(rrule.rrulestr(str(exrule), dtstart=startdate))
re_dates = map(lambda x:x.strftime('%Y-%m-%d %H:%M:%S'), rset1._iter())
return re_dates
@@ -332,69 +328,69 @@ class calendar_attendee(osv.osv):
'cutype': fields.selection([('individual', 'Individual'), \
('group', 'Group'), ('resource', 'Resource'), \
('room', 'Room'), ('unknown', '') ], \
- 'Invite Type', help="Specify the type of Invitation"),
- 'member': fields.char('Member', size=124,
- help="Indicate the groups that the attendee belongs to"),
+ 'Invite Type', help="Specify the type of Invitation"),
+ 'member': fields.char('Member', size=124,
+ help="Indicate the groups that the attendee belongs to"),
'role': fields.selection([('req-participant', 'Participation required'), \
('chair', 'Chair Person'), \
('opt-participant', 'Optional Participation'), \
('non-participant', 'For information Purpose')], 'Role', \
- help='Participation role for the calendar user'),
- 'state': fields.selection([('tentative', 'Tentative'),
- ('needs-action', 'Needs Action'),
- ('accepted', 'Accepted'),
- ('declined', 'Declined'),
+ help='Participation role for the calendar user'),
+ 'state': fields.selection([('tentative', 'Tentative'),
+ ('needs-action', 'Needs Action'),
+ ('accepted', 'Accepted'),
+ ('declined', 'Declined'),
('delegated', 'Delegated')], 'State', readonly=True, \
- help="Status of the attendee's participation"),
- 'rsvp': fields.boolean('Required Reply?',
- help="Indicats whether the favor of a reply is requested"),
+ help="Status of the attendee's participation"),
+ 'rsvp': fields.boolean('Required Reply?',
+ help="Indicats whether the favor of a reply is requested"),
'delegated_to': fields.function(_compute_data, method=True, \
string='Delegated To', type="char", size=124, store=True, \
multi='delegated_to', help="The users that the original \
-request was delegated to"),
+request was delegated to"),
'delegated_from': fields.function(_compute_data, method=True, string=\
- 'Delegated From', type="char", store=True, size=124, multi='delegated_from'),
+ 'Delegated From', type="char", store=True, size=124, multi='delegated_from'),
'parent_ids': fields.many2many('calendar.attendee', 'calendar_attendee_parent_rel', \
- 'attendee_id', 'parent_id', 'Delegrated From'),
+ 'attendee_id', 'parent_id', 'Delegrated From'),
'child_ids': fields.many2many('calendar.attendee', 'calendar_attendee_child_rel', \
- 'attendee_id', 'child_id', 'Delegrated To'),
+ 'attendee_id', 'child_id', 'Delegrated To'),
'sent_by': fields.function(_compute_data, method=True, string='Sent By', \
type="char", multi='sent_by', store=True, size=124, \
- help="Specify the user that is acting on behalf of the calendar user"),
+ help="Specify the user that is acting on behalf of the calendar user"),
'sent_by_uid': fields.function(_compute_data, method=True, string='Sent By User', \
- type="many2one", relation="res.users", multi='sent_by_uid'),
+ type="many2one", relation="res.users", multi='sent_by_uid'),
'cn': fields.function(_compute_data, method=True, string='Common name', \
- type="char", size=124, multi='cn', store=True),
+ type="char", size=124, multi='cn', store=True),
'dir': fields.char('URI Reference', size=124, help="Reference to the URI\
-that points to the directory information corresponding to the attendee."),
+that points to the directory information corresponding to the attendee."),
'language': fields.function(_compute_data, method=True, string='Language', \
type="selection", selection=_lang_get, multi='language', \
store=True, help="To specify the language for text values in a\
-property or property parameter."),
- 'user_id': fields.many2one('res.users', 'User'),
- 'partner_address_id': fields.many2one('res.partner.address', 'Contact'),
+property or property parameter."),
+ 'user_id': fields.many2one('res.users', 'User'),
+ 'partner_address_id': fields.many2one('res.partner.address', 'Contact'),
'partner_id': fields.related('partner_address_id', 'partner_id', type='many2one', \
- relation='res.partner', string='Partner', help="Partner related to contact"),
- 'email': fields.char('Email', size=124, help="Email of Invited Person"),
+ relation='res.partner', string='Partner', help="Partner related to contact"),
+ 'email': fields.char('Email', size=124, help="Email of Invited Person"),
'event_date': fields.function(_compute_data, method=True, string='Event Date', \
- type="datetime", multi='event_date'),
+ type="datetime", multi='event_date'),
'event_end_date': fields.function(_compute_data, method=True, \
string='Event End Date', type="datetime", \
- multi='event_end_date'),
- 'ref': fields.reference('Event Ref', selection=_links_get, size=128),
- 'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"),
+ multi='event_end_date'),
+ 'ref': fields.reference('Event Ref', selection=_links_get, size=128),
+ 'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"),
}
_defaults = {
- 'state': lambda *x: 'needs-action',
+ 'state': lambda *x: 'needs-action',
}
response_re = re.compile("Are you coming\?.*\n*.*(YES|NO|MAYBE).*", re.UNICODE)
def msg_new(self, cr, uid, msg):
- """
+ """
@param self: The object pointer
@param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
+ @param uid: the current user’s ID for security checks,
"""
return False
@@ -453,24 +449,24 @@ property or property parameter."),
att_infos.append(((att2.user_id and att2.user_id.name) or \
(att2.partner_id and att2.partner_id.name) or \
att2.email) + ' - Status: ' + att2.state.title())
- body_vals = {'name': res_obj.name,
- 'start_date': res_obj.date,
- 'end_date': res_obj.date_deadline or False,
- 'description': res_obj.description or '-',
- 'location': res_obj.location or '-',
- 'attendees': ' '.join(att_infos),
- 'user': res_obj.user_id and res_obj.user_id.name or 'OpenERP User',
- 'sign': sign,
+ body_vals = {'name': res_obj.name,
+ 'start_date': res_obj.date,
+ 'end_date': res_obj.date_deadline or False,
+ 'description': res_obj.description or '-',
+ 'location': res_obj.location or '-',
+ 'attendees': ' '.join(att_infos),
+ 'user': res_obj.user_id and res_obj.user_id.name or 'OpenERP User',
+ 'sign': sign,
'company': company
}
body = html_invitation % body_vals
if mail_to and email_from:
tools.email_send(
- email_from,
- mail_to,
- sub,
- body,
- subtype='html',
+ email_from,
+ mail_to,
+ sub,
+ body,
+ subtype='html',
reply_to=email_from
)
return True
@@ -558,30 +554,30 @@ class res_alarm(osv.osv):
_name = 'res.alarm'
_description = 'Basic Alarm Information'
_columns = {
- 'name':fields.char('Name', size=256, required=True),
+ 'name':fields.char('Name', size=256, required=True),
'trigger_occurs': fields.selection([('before', 'Before'), \
('after', 'After')], \
- 'Triggers', required=True),
+ 'Triggers', required=True),
'trigger_interval': fields.selection([('minutes', 'Minutes'), \
('hours', 'Hours'), \
('days', 'Days')], 'Interval', \
- required=True),
- 'trigger_duration': fields.integer('Duration', required=True),
+ required=True),
+ 'trigger_duration': fields.integer('Duration', required=True),
'trigger_related': fields.selection([('start', 'The event starts'), \
('end', 'The event ends')], \
- 'Related to', required=True),
+ 'Related to', required=True),
'duration': fields.integer('Duration', help="""Duration' and 'Repeat' \
-are both optional, but if one occurs, so MUST the other"""),
- 'repeat': fields.integer('Repeat'),
+are both optional, but if one occurs, so MUST the other"""),
+ 'repeat': fields.integer('Repeat'),
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it.")
}
_defaults = {
- 'trigger_interval': lambda *x: 'minutes',
- 'trigger_duration': lambda *x: 5,
- 'trigger_occurs': lambda *x: 'before',
- 'trigger_related': lambda *x: 'start',
- 'active': lambda *x: 1,
+ 'trigger_interval': lambda *x: 'minutes',
+ 'trigger_duration': lambda *x: 5,
+ 'trigger_occurs': lambda *x: 'before',
+ 'trigger_related': lambda *x: 'start',
+ 'active': lambda *x: 1,
}
def do_alarm_create(self, cr, uid, ids, model, date, context={}):
@@ -609,20 +605,20 @@ are both optional, but if one occurs, so MUST the other"""),
self.do_alarm_unlink(cr, uid, [data.id], model)
if basic_alarm:
vals = {
- 'action': 'display',
- 'description': data.description,
- 'name': data.name,
- 'attendee_ids': [(6, 0, map(lambda x:x.id, data.attendee_ids))],
- 'trigger_related': basic_alarm.trigger_related,
- 'trigger_duration': basic_alarm.trigger_duration,
- 'trigger_occurs': basic_alarm.trigger_occurs,
- 'trigger_interval': basic_alarm.trigger_interval,
- 'duration': basic_alarm.duration,
- 'repeat': basic_alarm.repeat,
- 'state': 'run',
- 'event_date': data[date],
- 'res_id': data.id,
- 'model_id': model_id,
+ 'action': 'display',
+ 'description': data.description,
+ 'name': data.name,
+ 'attendee_ids': [(6, 0, map(lambda x:x.id, data.attendee_ids))],
+ 'trigger_related': basic_alarm.trigger_related,
+ 'trigger_duration': basic_alarm.trigger_duration,
+ 'trigger_occurs': basic_alarm.trigger_occurs,
+ 'trigger_interval': basic_alarm.trigger_interval,
+ 'duration': basic_alarm.duration,
+ 'repeat': basic_alarm.repeat,
+ 'state': 'run',
+ 'event_date': data[date],
+ 'res_id': data.id,
+ 'model_id': model_id,
'user_id': uid
}
alarm_id = alarm_obj.create(cr, uid, vals)
@@ -664,40 +660,40 @@ class calendar_alarm(osv.osv):
__attribute__ = {}
_columns = {
- 'alarm_id': fields.many2one('res.alarm', 'Basic Alarm', ondelete='cascade'),
+ 'alarm_id': fields.many2one('res.alarm', 'Basic Alarm', ondelete='cascade'),
'name': fields.char('Summary', size=124, help="""Contains the text to be \
used as the message subject for email \
- or contains the text to be used for display"""),
+ or contains the text to be used for display"""),
'action': fields.selection([('audio', 'Audio'), ('display', 'Display'), \
('procedure', 'Procedure'), ('email', 'Email') ], 'Action', \
- required=True, help="Defines the action to be invoked when an alarm is triggered"),
+ required=True, help="Defines the action to be invoked when an alarm is triggered"),
'description': fields.text('Description', help='Provides a more complete \
description of the calendar component, than that \
- provided by the "SUMMARY" property'),
+ provided by the "SUMMARY" property'),
'attendee_ids': fields.many2many('calendar.attendee', 'alarm_attendee_rel', \
- 'alarm_id', 'attendee_id', 'Attendees', readonly=True),
+ 'alarm_id', 'attendee_id', 'Attendees', readonly=True),
'attach': fields.binary('Attachment', help="""* Points to a sound resource,\
which is rendered when the alarm is triggered for audio,
* File which is intended to be sent as message attachments for email,
* Points to a procedure resource, which is invoked when\
- the alarm is triggered for procedure."""),
- 'res_id': fields.integer('Resource ID'),
- 'model_id': fields.many2one('ir.model', 'Model'),
- 'user_id': fields.many2one('res.users', 'Owner'),
- 'event_date': fields.datetime('Event Date'),
- 'event_end_date': fields.datetime('Event End Date'),
- 'trigger_date': fields.datetime('Trigger Date', readonly="True"),
+ the alarm is triggered for procedure."""),
+ 'res_id': fields.integer('Resource ID'),
+ 'model_id': fields.many2one('ir.model', 'Model'),
+ 'user_id': fields.many2one('res.users', 'Owner'),
+ 'event_date': fields.datetime('Event Date'),
+ 'event_end_date': fields.datetime('Event End Date'),
+ 'trigger_date': fields.datetime('Trigger Date', readonly="True"),
'state':fields.selection([
- ('draft', 'Draft'),
- ('run', 'Run'),
- ('stop', 'Stop'),
- ('done', 'Done'),
- ], 'State', select=True, readonly=True),
+ ('draft', 'Draft'),
+ ('run', 'Run'),
+ ('stop', 'Stop'),
+ ('done', 'Done'),
+ ], 'State', select=True, readonly=True),
}
_defaults = {
- 'action': lambda *x: 'email',
- 'state': lambda *x: 'run',
+ 'action': lambda *x: 'email',
+ 'state': lambda *x: 'run',
}
def create(self, cr, uid, vals, context={}):
"""
@@ -748,11 +744,11 @@ class calendar_alarm(osv.osv):
for alarm in self.browse(cr, uid, alarm_ids):
if alarm.action == 'display':
value = {
- 'name': alarm.name,
- 'act_from': alarm.user_id.id,
- 'act_to': alarm.user_id.id,
- 'body': alarm.description,
- 'trigger_date': alarm.trigger_date,
+ 'name': alarm.name,
+ 'act_from': alarm.user_id.id,
+ 'act_to': alarm.user_id.id,
+ 'body': alarm.description,
+ 'trigger_date': alarm.trigger_date,
'ref_doc1': '%s,%s' % (alarm.model_id.model, alarm.res_id)
}
request_id = request_obj.create(cr, uid, value)
@@ -782,9 +778,9 @@ class calendar_alarm(osv.osv):
mail_to.append(att.user_id.address_id.email)
if mail_to:
tools.email_send(
- tools.config.get('email_from', False),
- mail_to,
- sub,
+ tools.config.get('email_from', False),
+ mail_to,
+ sub,
body
)
self.write(cr, uid, [alarm.id], {'state':'done'})
@@ -814,12 +810,12 @@ class calendar_event(osv.osv):
return {}
event = self.browse(cr, uid, ids, context=context)[0]
value = {
- 'date': event.date and event.date[:11] + '00:00:00',
- 'date_deadline': event.date_deadline and event.date_deadline[:11] + '00:00:00',
- 'duration': 24
+ 'date': event.date and event.date[:11] + '00:00:00',
+ 'date_deadline': event.date_deadline and event.date_deadline[:11] + '00:00:00',
+ 'duration': 24
}
return {'value': value}
-
+
def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, allday=False, context={}):
"""
@param self: The object pointer
@@ -841,8 +837,8 @@ class calendar_event(osv.osv):
if allday: # For all day event
start = start_date[:11] + '00:00:00'
value = {
- 'date': start,
- 'date_deadline': start,
+ 'date': start,
+ 'date_deadline': start,
'duration': 24
}
return {'value': value}
@@ -871,7 +867,7 @@ class calendar_event(osv.osv):
cr.execute("UPDATE %s set freq='None',interval=0,count=0,end_date=Null,\
mo=False,tu=False,we=False,th=False,fr=False,sa=False,su=False,\
day=0,select1='date',month_list=Null ,byday=Null where id=%s" % (self._table, id))
-
+
if not value:
cr.execute("UPDATE %s set rrule_type='none' where id=%s" % (self._table, id))
return True
@@ -900,19 +896,19 @@ class calendar_event(osv.osv):
for day in val['byday'].split(','):
new_val[day] = True
val.pop('byday')
-
+
if val.get('until'):
until = parser.parse(''.join((re.compile('\d')).findall(val.get('until'))))
new_val['end_date'] = until.strftime('%Y-%m-%d')
val.pop('until')
new_val.pop('until')
-
+
if val.get('bymonthday'):
new_val['day'] = val.get('bymonthday')
val.pop('bymonthday')
new_val['select1'] = 'date'
new_val.pop('bymonthday')
-
+
if val.get('byday'):
d = val.get('byday')
if '-' in d:
@@ -922,12 +918,12 @@ class calendar_event(osv.osv):
new_val['byday'] = d[:1]
new_val['week_list'] = d[1:3].upper()
new_val['select1'] = 'day'
-
+
if val.get('bymonth'):
new_val['month_list'] = val.get('bymonth')
val.pop('bymonth')
new_val.pop('bymonth')
-
+
for k, v in new_val.items():
temp = ", %s='%s'" % (k, v)
qry += temp
@@ -935,9 +931,9 @@ class calendar_event(osv.osv):
whr = " where id=%(id)s"
qry = qry + whr
val.update({
- 'table': self._table,
- 'rule_type': rrule_type,
- 'id': id,
+ 'table': self._table,
+ 'rule_type': rrule_type,
+ 'id': id,
})
cr.execute(qry % val)
return True
@@ -962,7 +958,7 @@ class calendar_event(osv.osv):
raise osv.except_osv('Warning!', 'Interval can not be Negative')
if datas.get('count', 0) < 0:
raise osv.except_osv('Warning!', 'Count can not be Negative')
- rrule_custom = self.compute_rule_string(cr, uid, datas,\
+ rrule_custom = self.compute_rule_string(cr, uid, datas, \
context=context)
result[event] = rrule_custom
else:
@@ -971,40 +967,40 @@ class calendar_event(osv.osv):
return result
_columns = {
- 'id': fields.integer('ID'),
- 'sequence': fields.integer('Sequence'),
- 'name': fields.char('Description', size=64, required=True),
- 'date': fields.datetime('Date'),
- 'date_deadline': fields.datetime('Deadline'),
- 'create_date': fields.datetime('Created', readonly=True),
- 'duration': fields.float('Duration'),
- 'description': fields.text('Your action'),
+ 'id': fields.integer('ID'),
+ 'sequence': fields.integer('Sequence'),
+ 'name': fields.char('Description', size=64, required=True),
+ 'date': fields.datetime('Date'),
+ 'date_deadline': fields.datetime('Deadline'),
+ 'create_date': fields.datetime('Created', readonly=True),
+ 'duration': fields.float('Duration'),
+ 'description': fields.text('Your action'),
'class': fields.selection([('public', 'Public'), ('private', 'Private'), \
- ('confidential', 'Confidential')], 'Mark as'),
- 'location': fields.char('Location', size=264, help="Location of Event"),
+ ('confidential', 'Confidential')], 'Mark as'),
+ 'location': fields.char('Location', size=264, help="Location of Event"),
'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], \
- 'Show as'),
- 'base_calendar_url': fields.char('Caldav URL', size=264),
+ 'Show as'),
+ 'base_calendar_url': fields.char('Caldav URL', size=264),
'exdate': fields.text('Exception Date/Times', help="This property \
- defines the list of date/time exceptions for arecurring calendar component."),
+ defines the list of date/time exceptions for arecurring calendar component."),
'exrule': fields.char('Exception Rule', size=352, help="defines a \
- rule or repeating pattern for anexception to a recurrence set"),
+ rule or repeating pattern for anexception to a recurrence set"),
'rrule': fields.function(_get_rulestring, type='char', size=124, method=True, \
string='Recurrent Rule', store=True, \
fnct_inv=_set_rrulestring, help='Defines a\
rule or repeating pattern for recurring events\n\
e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
- FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU'),
+ FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU'),
'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
('weekly', 'Weekly'), ('monthly', 'Monthly'), \
- ('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency'),
- 'alarm_id': fields.many2one('res.alarm', 'Alarm'),
- 'base_calendar_alarm_id': fields.many2one('calendar.alarm', 'Alarm'),
- 'recurrent_uid': fields.integer('Recurrent ID'),
- 'recurrent_id': fields.datetime('Recurrent ID date'),
+ ('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency'),
+ 'alarm_id': fields.many2one('res.alarm', 'Alarm'),
+ 'base_calendar_alarm_id': fields.many2one('calendar.alarm', 'Alarm'),
+ 'recurrent_uid': fields.integer('Recurrent ID'),
+ 'recurrent_id': fields.datetime('Recurrent ID date'),
'vtimezone': fields.related('user_id', 'context_tz', type='char', size=24, \
- string='Timezone', store=True),
- 'user_id': fields.many2one('res.users', 'Responsible'),
+ string='Timezone', store=True),
+ 'user_id': fields.many2one('res.users', 'Responsible'),
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
@@ -1012,42 +1008,41 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
('daily', 'Daily'), \
('weekly', 'Weekly'), \
('monthly', 'Monthly'), \
- ('yearly', 'Yearly')], 'Frequency'),
- 'interval': fields.integer('Interval'),
- 'count': fields.integer('Count'),
- 'mo': fields.boolean('Mon'),
- 'tu': fields.boolean('Tue'),
- 'we': fields.boolean('Wed'),
- 'th': fields.boolean('Thu'),
- 'fr': fields.boolean('Fri'),
- 'sa': fields.boolean('Sat'),
- 'su': fields.boolean('Sun'),
+ ('yearly', 'Yearly')], 'Frequency'),
+ 'interval': fields.integer('Interval'),
+ 'count': fields.integer('Count'),
+ 'mo': fields.boolean('Mon'),
+ 'tu': fields.boolean('Tue'),
+ 'we': fields.boolean('Wed'),
+ 'th': fields.boolean('Thu'),
+ 'fr': fields.boolean('Fri'),
+ 'sa': fields.boolean('Sat'),
+ 'su': fields.boolean('Sun'),
'select1': fields.selection([('date', 'Date of month'), \
- ('day', 'Day of month')], 'Option'),
- 'day': fields.integer('Date of month'),
+ ('day', 'Day of month')], 'Option'),
+ 'day': fields.integer('Date of month'),
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
('WE', 'Wednesday'), ('TH', 'Thursday'), \
('FR', 'Friday'), ('SA', 'Saturday'), \
- ('SU', 'Sunday')], 'Weekday'),
+ ('SU', 'Sunday')], 'Weekday'),
'byday': fields.selection([('1', 'First'), ('2', 'Second'), \
('3', 'Third'), ('4', 'Fourth'), \
- ('5', 'Fifth'), ('-1', 'Last')], 'By day'),
- 'month_list': fields.selection(months.items(), 'Month'),
- 'end_date': fields.date('Repeat Until'),
- 'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel',\
- 'event_id', 'attendee_id', 'Attendees'),
+ ('5', 'Fifth'), ('-1', 'Last')], 'By day'),
+ 'month_list': fields.selection(months.items(), 'Month'),
+ 'end_date': fields.date('Repeat Until'),
+ 'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel', \
+ 'event_id', 'attendee_id', 'Attendees'),
'allday': fields.boolean('All Day')
-
}
_defaults = {
- 'class': lambda *a: 'public',
- 'show_as': lambda *a: 'busy',
- 'freq': lambda *x: 'None',
- 'select1': lambda *x: 'date',
- 'interval': lambda *x: 1,
+ 'class': lambda *a: 'public',
+ 'show_as': lambda *a: 'busy',
+ 'freq': lambda *x: 'None',
+ 'select1': lambda *x: 'date',
+ 'interval': lambda *x: 1,
}
-
+
def open_event(self, cr, uid, ids, context=None):
"""
Open Event From for Editing
@@ -1059,11 +1054,11 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
"""
if not context:
context = {}
-
+
data_obj = self.pool.get('ir.model.data')
-
+
value = {}
-
+
id2 = data_obj._get_id(cr, uid, 'base_calendar', 'event_form_view')
id3 = data_obj._get_id(cr, uid, 'base_calendar', 'event_tree_view')
id4 = data_obj._get_id(cr, uid, 'base_calendar', 'event_calendar_view')
@@ -1075,17 +1070,17 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
id4 = data_obj.browse(cr, uid, id4, context=context).res_id
for id in ids:
value = {
- 'name': _('Event'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'calendar.event',
- 'view_id': False,
- 'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
- 'type': 'ir.actions.act_window',
- 'res_id': base_calendar_id2real_id(id),
+ 'name': _('Event'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'calendar.event',
+ 'view_id': False,
+ 'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
+ 'type': 'ir.actions.act_window',
+ 'res_id': base_calendar_id2real_id(id),
'nodestroy': True
}
-
+
return value
def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args):
@@ -1103,9 +1098,9 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
event_id = base_calendar_id2real_id(event_id)
datas = self.read(cr, uid, event_id, context=context)
defaults.update({
- 'recurrent_uid': base_calendar_id2real_id(datas['id']),
- 'recurrent_id': defaults.get('date') or real_date,
- 'rrule_type': 'none',
+ 'recurrent_uid': base_calendar_id2real_id(datas['id']),
+ 'recurrent_id': defaults.get('date') or real_date,
+ 'rrule_type': 'none',
'rrule': ''
})
exdate = datas['exdate'] and datas['exdate'].split(',') or []
@@ -1123,7 +1118,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
@param event_ids: List of crm meeting’s IDs.
@return: True
"""
-
+
for event_id in event_ids:
event_id = base_calendar_id2real_id(event_id)
@@ -1138,34 +1133,9 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
qry += ", location = '%(location)s'"
qry += "WHERE id = %s" % (event_id)
cr.execute(qry %(defaults))
-
+
return True
- def convert_rrule_str(self, rrule_str, until_date):
- new_rrule_str = []
- is_until = False
- rrule_until_date = False
- for rule in rrule_str.split(';'):
- name, value = rule.split('=')
- if name == "UNTIL":
- is_until = True
- value = parser.parse(value)
- rrule_until_date = parser.parse(value.strftime("%Y-%m-%d"))
- if until_date and until_date >= rrule_until_date:
- until_date = rrule_until_date
- if until_date:
- value = until_date.strftime("%Y%m%d%H%M%S")
- new_rule = '%s=%s' % (name, value)
- new_rrule_str.append(new_rule)
-
- if not is_until and until_date:
- value = until_date.strftime("%Y%m%d%H%M%S")
- name = "UNTIL"
- new_rule = '%s=%s' % (name, value)
- new_rrule_str.append(new_rule)
- new_rrule_str = ';'.join(new_rrule_str)
- return new_rrule_str
-
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100):
"""
@param self: The object pointer
@@ -1184,7 +1154,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
result = []
if ids and (base_start_date or base_until_date):
cr.execute("select m.id, m.rrule, m.date, m.date_deadline, \
- m.exdate ,m.exrule from " + self._table + \
+ m.exdate, m.exrule from " + self._table + \
" m where m.id in ("\
+ ','.join(map(lambda x: str(x), ids))+")")
@@ -1205,8 +1175,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
idval = real_id2base_calendar_id(data['id'], data['date'])
result.append(idval)
count += 1
- elif data['exrule']:
- new_exrrule_str = ""
+ else:
exdate = data['exdate'] and data['exdate'].split(',') or []
rrule_str = data['rrule']
new_rrule_str = []
@@ -1230,11 +1199,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
new_rule = '%s=%s' % (name, value)
new_rrule_str.append(new_rule)
new_rrule_str = ';'.join(new_rrule_str)
- new_rrule_str = self.convert_rrule_str(rrule_str, until_date)
- reg_start_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S")
- if data['exrule']:
- new_exrrule_str = self.convert_rrule_str(data['exrule'], until_date)
- rdates = get_recurrent_dates(str(new_rrule_str), exdate, reg_start_date, str(new_exrrule_str))
+ rdates = get_recurrent_dates(str(new_rrule_str), exdate, start_date, data['exrule'])
for rdate in rdates:
r_date = datetime.strptime(rdate, "%Y-%m-%d %H:%M:%S")
if start_date and r_date < start_date:
@@ -1244,14 +1209,12 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
idval = real_id2base_calendar_id(data['id'], rdate)
result.append(idval)
count += 1
- else:
- return ids
if result:
ids = result
if isinstance(select, (str, int, long)):
return ids and ids[0] or False
return ids
-
+
def compute_rule_string(self, cr, uid, datas, context=None, *args):
"""
Compute rule string.
@@ -1270,9 +1233,9 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
freq = datas.get('freq')
if freq == 'None':
return ''
-
+
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
-
+
if freq == 'weekly':
byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
@@ -1308,7 +1271,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
return rrule_string
- def search(self, cr, uid, args, offset=0, limit=100, order=None,
+ def search(self, cr, uid, args, offset=0, limit=100, order=None,
context=None, count=False):
"""
Overrides orm search method.
@@ -1319,17 +1282,13 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
@param limit: The Number of Results to Return
@return: List of id
"""
- res = []
args_without_date = []
start_date = False
until_date = False
- recur_res = []
-
for arg in args:
if arg[0] not in ('date', unicode('date')):
args_without_date.append(arg)
else:
- if arg[0] in ('date', unicode('date')):
if arg[1] in ('>', '>='):
if start_date:
continue
@@ -1338,24 +1297,11 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
if until_date:
continue
until_date = arg[2]
- else:
- args_without_date.append(arg)
- args.append(('rrule_type', '=', 'none'))
- res = super(calendar_event, self).search(cr, uid, args, offset, limit, order, context, count)
- if start_date and until_date:
- recur_args = [('rrule_type', '!=', 'none'), ('date', '<=', until_date), '|', ('end_date', '=', False), ('end_date', '>=', start_date)]
- recur_args.extend(args_without_date)
- recur_res = super(calendar_event, self).search(cr, uid, recur_args, offset, limit, order, context, count)
-
- if not isinstance(res, list):
- res = [res]
- if not isinstance(recur_res, list):
- recur_res = [recur_res]
-
- res.extend(recur_res)
- res = list(set(res))
+ res = super(calendar_event, self).search(cr, uid, args_without_date, \
+ offset, limit, order, context, count)
return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit)
+
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
"""
Writes values in one or several fields.
@@ -1377,7 +1323,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
if len(str(event_id).split('-')) > 1:
data = self.read(cr, uid, event_id, ['date', 'date_deadline', \
'rrule', 'duration'])
- if data and data.get('rrule'):
+ if data.get('rrule'):
real_date = data.get('date')
data.update(vals)
new_id = self.modify_this(cr, uid, event_id, data, \
@@ -1425,9 +1371,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
@param fields: List of fields.
@return: List of Dictionary of form [{‘name_of_the_field’: value, ...}, ...]
"""
- if context is None:
- context = {}
-
if isinstance(ids, (str, int, long)):
select = [ids]
else:
@@ -1436,17 +1379,8 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
result = []
if fields and 'date' not in fields:
fields.append('date')
-
- real_data = {}
- real_data = super(calendar_event, self).read(cr, uid,
- [real_id for base_calendar_id, real_id in select],
- fields=fields, context=context, load=load)
- real_data = dict(zip([x['id'] for x in real_data], real_data))
-
for base_calendar_id, real_id in select:
res = super(calendar_event, self).read(cr, uid, real_id, fields=fields, context=context, load=load)
- if not res:
- continue
ls = base_calendar_id2real_id(base_calendar_id, with_date=res.get('duration', 0))
if not isinstance(ls, (str, int, long)) and len(ls) >= 2:
res['date'] = ls[1]
@@ -1528,7 +1462,7 @@ class calendar_todo(osv.osv):
_description = "Calendar Task"
def _get_date(self, cr, uid, ids, name, arg, context):
- """
+ """
Get Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -1544,7 +1478,7 @@ class calendar_todo(osv.osv):
return res
def _set_date(self, cr, uid, id, name, value, arg, context):
- """
+ """
Set Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -1562,8 +1496,8 @@ class calendar_todo(osv.osv):
_columns = {
'date': fields.function(_get_date, method=True, fnct_inv=_set_date, \
- string='Duration', store=True, type='datetime'),
- 'duration': fields.integer('Duration'),
+ string='Duration', store=True, type='datetime'),
+ 'duration': fields.integer('Duration'),
}
__attribute__ = {}
@@ -1576,7 +1510,7 @@ class ir_attachment(osv.osv):
_inherit = 'ir.attachment'
def search_count(self, cr, user, args, context=None):
- """
+ """
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param user: the current user’s ID for security checks,
@@ -1589,9 +1523,9 @@ class ir_attachment(osv.osv):
args1.append(map(lambda x:str(x).split('-')[0], arg))
return super(ir_attachment, self).search_count(cr, user, args1, context)
- def search(self, cr, uid, args, offset=0, limit=None, order=None,
+ def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
- """
+ """
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -1605,8 +1539,8 @@ class ir_attachment(osv.osv):
for i, arg in enumerate(new_args):
if arg[0] == 'res_id':
new_args[i] = (arg[0], arg[1], base_calendar_id2real_id(arg[2]))
- return super(ir_attachment, self).search(cr, uid, new_args, offset=offset,
- limit=limit, order=order,
+ return super(ir_attachment, self).search(cr, uid, new_args, offset=offset,
+ limit=limit, order=order,
context=context, count=False)
ir_attachment()
@@ -1615,12 +1549,12 @@ class ir_values(osv.osv):
def set(self, cr, uid, key, key2, name, models, value, replace=True, \
isobject=False, meta=False, preserve_user=False, company=False):
- """
+ """
Set IR Values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
- @param model: Get The Model
+ @param model: Get The Model
"""
new_model = []
@@ -1634,12 +1568,12 @@ class ir_values(osv.osv):
def get(self, cr, uid, key, key2, models, meta=False, context={}, \
res_id_req=False, without_user=True, key2_req=True):
- """
+ """
Get IR Values
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
- @param model: Get The Model
+ @param model: Get The Model
"""
new_model = []
@@ -1657,15 +1591,15 @@ class ir_model(osv.osv):
_inherit = 'ir.model'
- def read(self, cr, uid, ids, fields=None, context={},
+ def read(self, cr, uid, ids, fields=None, context={},
load='_classic_read'):
- """
+ """
Read IR Model
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of IR Model’s IDs.
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
data = super(ir_model, self).read(cr, uid, ids, fields=fields, \
@@ -1680,12 +1614,12 @@ ir_model()
class virtual_report_spool(web_services.report_spool):
def exp_report(self, db, uid, object, ids, datas=None, context=None):
- """
+ """
Export Report
@param self: The object pointer
@param db: get the current database,
@param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
if object == 'printscreen.list':
@@ -1704,20 +1638,20 @@ class res_users(osv.osv):
_inherit = 'res.users'
def _get_user_avail(self, cr, uid, ids, context=None):
- """
+ """
Get USer Availability
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of res user’s IDs.
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
current_datetime = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
res = {}
attendee_obj = self.pool.get('calendar.attendee')
attendee_ids = attendee_obj.search(cr, uid, [
- ('event_date', '<=', current_datetime), ('event_end_date', '<=', current_datetime),
+ ('event_date', '<=', current_datetime), ('event_end_date', '<=', current_datetime),
('state', '=', 'accepted'), ('user_id', 'in', ids)
])
@@ -1735,13 +1669,13 @@ class res_users(osv.osv):
return res
def _get_user_avail_fun(self, cr, uid, ids, name, args, context=None):
- """
+ """
Get USer Availability Function
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of res user’s IDs.
- @param context: A standard dictionary for contextual values
+ @param context: A standard dictionary for contextual values
"""
return self._get_user_avail(cr, uid, ids, context=context)
@@ -1749,7 +1683,7 @@ class res_users(osv.osv):
_columns = {
'availability': fields.function(_get_user_avail_fun, type='selection', \
selection=[('free', 'Free'), ('busy', 'Busy')], \
- string='Free/Busy', method=True),
+ string='Free/Busy', method=True),
}
res_users()
From a4a09401aa96f32f95c84d79723bf0ddd87149be Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Fri, 30 Apr 2010 14:32:34 +0530
Subject: [PATCH 059/148] [IMP]: sale_journal: add some comment in sale journal
xml file.
bzr revid: atp@tinyerp.co.in-20100430090234-87xzvifiqdmrkavl
---
.../report/sale_journal_report_view.xml | 14 ++++++++++-
addons/sale_journal/sale_journal_view.xml | 24 ++++++++++++++++++-
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/addons/sale_journal/report/sale_journal_report_view.xml b/addons/sale_journal/report/sale_journal_report_view.xml
index f77a8dda152..08a802c8b98 100644
--- a/addons/sale_journal/report/sale_journal_report_view.xml
+++ b/addons/sale_journal/report/sale_journal_report_view.xml
@@ -1,5 +1,8 @@
+
+
+
sale.journal.report.tree
sale.journal.report
@@ -17,6 +20,8 @@
+
+
sale.journal.report.graph
sale.journal.report
@@ -29,6 +34,8 @@
+
+
sale.journal.report.search
sale.journal.report
@@ -60,7 +67,7 @@
-
+
@@ -83,6 +90,8 @@
+
+
sale.journal.picking.report.graph
sale.journal.picking.report
@@ -96,6 +105,7 @@
+
sale.journal.picking.report.search
@@ -131,6 +141,8 @@
[('invoice_state','=','2binvoiced'),('invoice_type_id','=',active_id)]
+
+
+
stock.picking.journal.view.form
@@ -286,6 +287,8 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
sale_journal.picking.journal.search
@@ -422,7 +445,6 @@
Picking by invoice_method
- sale_journal.invoice.type.tree
sale_journal.invoice.type
ir.actions.act_window
tree
From e9684714ec8ef8d5c340414b762bc344693d6522 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Fri, 30 Apr 2010 17:51:05 +0530
Subject: [PATCH 060/148] [IMP]: crm: Minor improvement change contact name for
lead yaml test case.
bzr revid: atp@tinyerp.co.in-20100430122105-ytwp5kg5ogrxz5cb
---
addons/crm/test/test_crm_lead.yml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/addons/crm/test/test_crm_lead.yml b/addons/crm/test/test_crm_lead.yml
index 22fdfffca1b..69832d7e7b6 100644
--- a/addons/crm/test/test_crm_lead.yml
+++ b/addons/crm/test/test_crm_lead.yml
@@ -16,7 +16,6 @@
login: user_crm
name: user_crm
password: user_crm
-
- |
I start by creating a new lead "New Customer" and I provide an address to this
@@ -25,7 +24,7 @@
!record {model: crm.lead, id: crm_lead_newcustomer0}:
email_from: info@mycustomer.com
name: New Customer
- partner_name: Sandip zala
+ partner_name: Capegemini
phone: (855) 924-4364
mobile: (333) 715-1450
section_id: crm.section_sales_department
@@ -66,7 +65,7 @@
Now, I give value to this wizard field.
-
!record {model: crm.lead2opportunity, id: crm_lead2opportunity_stonage_0}:
- name: Sandip zala
+ name: Capegemini
planned_revenue: 0.00
probability: 0.00
-
From 4ac58a39ccea168ff9cd256d6400c1e5140fa7f9 Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Fri, 30 Apr 2010 19:14:54 +0530
Subject: [PATCH 061/148] [IMP] task - 620 -Usability for crm,sale,partner
module
bzr revid: ksa@tinyerp.co.in-20100430134454-g4n13o2rijen1xt5
---
addons/base_calendar/base_calendar.py | 2 +-
addons/caldav/caldav_view.xml | 21 +++++++++++----------
addons/crm/__openerp__.py | 20 ++++++++++----------
addons/crm/crm_meeting_menu.xml | 6 ++++++
addons/crm/crm_meeting_view.xml | 5 +++++
addons/crm/crm_opportunity.py | 2 +-
addons/crm/crm_opportunity_view.xml | 9 ++++-----
addons/crm/crm_view.xml | 8 ++++----
addons/product/product_view.xml | 6 ++++++
9 files changed, 48 insertions(+), 31 deletions(-)
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index da5d622b71a..94d14a17af8 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -1340,7 +1340,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
until_date = arg[2]
else:
args_without_date.append(arg)
- args.append(('rrule_type', '=', 'none'))
+ # args.append(('rrule_type', '=', 'none'))
res = super(calendar_event, self).search(cr, uid, args, offset, limit, order, context, count)
if start_date and until_date:
recur_args = [('rrule_type', '!=', 'none'), ('date', '<=', until_date), '|', ('end_date', '=', False), ('end_date', '>=', start_date)]
diff --git a/addons/caldav/caldav_view.xml b/addons/caldav/caldav_view.xml
index 4c1003023ae..fcecaa6dc2f 100644
--- a/addons/caldav/caldav_view.xml
+++ b/addons/caldav/caldav_view.xml
@@ -17,10 +17,10 @@
Calendar Collections : Tree
document.directory
- tree
+ tree
-
+
@@ -53,8 +53,8 @@
-
-
@@ -73,7 +73,7 @@
-
+
@@ -110,11 +110,11 @@
Calendar : Tree
basic.calendar
- tree
+ tree
-
-
+
+
@@ -127,8 +127,8 @@
ir.actions.act_window
basic.calendar
form
- tree,form
-
+ tree,form
+
@@ -147,5 +147,6 @@
action="action_caldav_form"
id="menu_caldav_directories"
parent="menu_calendar"/>
+
diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py
index 22e4f41e872..40f8d60bcc4 100644
--- a/addons/crm/__openerp__.py
+++ b/addons/crm/__openerp__.py
@@ -45,7 +45,7 @@ between mails and Open ERP.""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': [
- 'base',
+ 'base',
'base_action_rule',
'process',
'mail_gateway',
@@ -80,16 +80,16 @@ between mails and Open ERP.""",
'crm_action_rule_view.xml',
'crm_lead_view.xml',
'crm_lead_menu.xml',
-
+
'crm_meeting_view.xml',
'crm_meeting_menu.xml',
-
+
'crm_phonecall_view.xml',
'crm_phonecall_menu.xml',
-
+
'crm_opportunity_view.xml',
'crm_opportunity_menu.xml',
-
+
'security/crm_security.xml',
'security/ir.model.access.csv',
@@ -107,11 +107,11 @@ between mails and Open ERP.""",
'crm_opportunity_demo.xml',
'crm_phonecall_demo.xml'
],
- 'test': ['test/test_crm_lead.yml',
- 'test/test_crm_meeting.yml',
- 'test/test_crm_opportunity.yml',
- 'test/test_crm_phonecall.yml',
- ],
+# 'test': ['test/test_crm_lead.yml',
+# 'test/test_crm_meeting.yml',
+# 'test/test_crm_opportunity.yml',
+# 'test/test_crm_phonecall.yml',
+# ],
'installable': True,
'active': False,
'certificate': '0079056041421',
diff --git a/addons/crm/crm_meeting_menu.xml b/addons/crm/crm_meeting_menu.xml
index 3f680b61f15..7dcb0ec3ec8 100644
--- a/addons/crm/crm_meeting_menu.xml
+++ b/addons/crm/crm_meeting_menu.xml
@@ -121,6 +121,12 @@
action="crm_case_categ_meet" parent="menu_meeting_sale"
sequence="1" />
+
+ Calendar
+ ir.ui.menu
+
+
+
Meeting Invitations
ir.actions.act_window
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml
index 4c4856f46b0..99c3a2e7980 100644
--- a/addons/crm/crm_meeting_view.xml
+++ b/addons/crm/crm_meeting_view.xml
@@ -53,6 +53,10 @@
attrs="{'invisible':[('rrule_type','in', ('none', False))]}"
name="open_meeting" icon="gtk-edit"
type="object" />
+
@@ -120,6 +124,7 @@
+
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
index dfb202dfa0e..c52127f876f 100644
--- a/addons/crm/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -93,7 +93,7 @@ class crm_opportunity(osv.osv):
duration = float(ans.days)
if opportunity.section_id and opportunity.section_id.resource_calendar_id:
- duration = float(ans.days) * 24
+ duration = float(ans.days) * 24
new_dates = cal_obj.interval_get(cr,
uid,
opportunity.section_id.resource_calendar_id and opportunity.section_id.resource_calendar_id.id or False,
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 4bdc0d90158..58d9bb242f8 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -101,7 +101,7 @@
-
@@ -212,7 +212,7 @@
-
+
-
+
@@ -285,7 +285,6 @@
/>
-
+ domain="[('user_id','=',uid)]" context="{'group_by':'user_id'}" />
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 5c171236836..3b375f56e87 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -2,7 +2,7 @@
+ parent="base.menu_base_config" sequence="0" groups="base.group_extended"/>
@@ -117,7 +117,7 @@
-
+
@@ -157,7 +157,7 @@
form
-
+
+ parent="crm.menu_crm_configuration" groups="base.group_extended" />
Cases by section
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index b9858e19eaf..7cb5a6f2c67 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -607,6 +607,12 @@
+
+ Products
+ ir.ui.menu
+
+
+
From d73f08c4cb7485102527646e35c0519a7b0b9f28 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Mon, 3 May 2010 11:19:40 +0200
Subject: [PATCH 066/148] rename labels to be more clear modify colspan to
avoid scrolling on report timesheet
bzr revid: nel@tinyerp.com-20100503091940-ous2eyyz875op1ux
---
addons/account/report/account_invoice_report.py | 4 ++--
addons/account/report/account_invoice_report_view.xml | 8 ++++----
addons/hr_recruitment/report/hr_recruitment_report.py | 2 +-
.../hr_recruitment/report/hr_recruitment_report_view.xml | 6 +++---
.../hr_timesheet_sheet/report/timesheet_report_view.xml | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py
index af8ef08e353..062261f854a 100644
--- a/addons/account/report/account_invoice_report.py
+++ b/addons/account/report/account_invoice_report.py
@@ -62,8 +62,8 @@ class account_invoice_report(osv.osv):
('cancel','Cancelled')
], 'Order State', readonly=True),
'date_due': fields.date('Due Date', readonly=True),
- 'address_contact_id': fields.many2one('res.partner.address', 'Contact Address', readonly=True),
- 'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True),
+ 'address_contact_id': fields.many2one('res.partner.address', 'Contact Address Name', readonly=True),
+ 'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address Name', readonly=True),
'account_id': fields.many2one('account.account', 'Account',readonly=True),
'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
'residual':fields.float('Total Residual', readonly=True),
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index fea7dbadd93..c36e2313736 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -56,7 +56,7 @@
search
-
+
@@ -119,7 +119,7 @@
-
+
@@ -145,8 +145,8 @@
-
-
+
+
diff --git a/addons/hr_recruitment/report/hr_recruitment_report.py b/addons/hr_recruitment/report/hr_recruitment_report.py
index 52fbc94be8a..bbd241312a7 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report.py
+++ b/addons/hr_recruitment/report/hr_recruitment_report.py
@@ -45,7 +45,7 @@ class hr_recruitment_report(osv.osv):
'salary_prop' : fields.float("Salary Proposed"),
'salary_exp' : fields.float("Salary Expected"),
'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
- 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact',readonly=True),
+ 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact Name',readonly=True),
'available' : fields.float("Availability")
}
diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
index 4cdaaca68bc..3ec4137f763 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml
+++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
@@ -116,8 +116,8 @@
-
-
+
+
@@ -126,7 +126,7 @@
-
+
diff --git a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
index 57df8dcdf32..305a27eefd8 100644
--- a/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
+++ b/addons/hr_timesheet_sheet/report/timesheet_report_view.xml
@@ -45,7 +45,7 @@
search
-
+
From 661a10ae7e52460ba481665943fa4d8165575901 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Mon, 3 May 2010 11:23:40 +0200
Subject: [PATCH 067/148] change label
bzr revid: nel@tinyerp.com-20100503092340-qkm8rgl70ux3ipp4
---
addons/purchase/report/purchase_report.py | 4 ++--
addons/purchase/report/purchase_report_view.xml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py
index d6fd4000633..cf177319ea5 100644
--- a/addons/purchase/report/purchase_report.py
+++ b/addons/purchase/report/purchase_report.py
@@ -54,8 +54,8 @@ class purchase_report(osv.osv):
'location_id': fields.many2one('stock.location', 'Destination', readonly=True),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position',readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
- 'partner_address_id':fields.many2one('res.partner.address', 'Address', readonly=True),
- 'dest_address_id':fields.many2one('res.partner.address', 'Dest. Address',readonly=True),
+ 'partner_address_id':fields.many2one('res.partner.address', 'Address Contact Name', readonly=True),
+ 'dest_address_id':fields.many2one('res.partner.address', 'Dest. Address Contact Name',readonly=True),
'pricelist_id':fields.many2one('product.pricelist', 'Pricelist', readonly=True),
'date_approve':fields.date('Date Approved', readonly=True),
'expected_date':fields.date('Expected Date', readonly=True),
diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml
index 8f3f31e84ee..ad9e42282a2 100644
--- a/addons/purchase/report/purchase_report_view.xml
+++ b/addons/purchase/report/purchase_report_view.xml
@@ -127,8 +127,8 @@
-
-
+
+
From afc2adde667973be91938344ae57eb0b58159ec9 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Mon, 3 May 2010 11:48:11 +0200
Subject: [PATCH 068/148] Change labels
bzr revid: nel@tinyerp.com-20100503094811-r2ul0f03yv1yk65f
---
addons/base_calendar/__openerp__.py | 2 +-
addons/crm/report/crm_claim_report.py | 2 +-
addons/crm/report/crm_claim_report_view.xml | 2 +-
addons/crm/report/crm_phonecall_report.py | 2 +-
addons/crm/report/crm_phonecall_report_view.xml | 2 +-
addons/sale/report/sale_report.py | 6 +++---
addons/sale/report/sale_report_view.xml | 6 +++---
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/addons/base_calendar/__openerp__.py b/addons/base_calendar/__openerp__.py
index 44c36997495..7e77f025476 100644
--- a/addons/base_calendar/__openerp__.py
+++ b/addons/base_calendar/__openerp__.py
@@ -40,7 +40,7 @@
'wizard/base_calendar_invite_attendee_view.xml',
'base_calendar_view.xml'
],
- "test" : ['test/base_calendar_test.yml'],
+ # "test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
}
diff --git a/addons/crm/report/crm_claim_report.py b/addons/crm/report/crm_claim_report.py
index ef769042ea8..66e428cde55 100644
--- a/addons/crm/report/crm_claim_report.py
+++ b/addons/crm/report/crm_claim_report.py
@@ -51,7 +51,7 @@ class crm_claim_report(osv.osv):
'som': fields.many2one('res.partner.som', 'State of Mind'),
'claim_date': fields.datetime('Date Of Claim',readonly=True),
'deadline_date': fields.datetime('Deadline ',readonly=True),
- 'partner_address_id': fields.many2one('res.partner.address','Contact ',readonly=True),
+ 'partner_address_id': fields.many2one('res.partner.address','Contact Name',readonly=True),
}
def init(self, cr):
diff --git a/addons/crm/report/crm_claim_report_view.xml b/addons/crm/report/crm_claim_report_view.xml
index 66c1c6ff930..c9df8818a42 100644
--- a/addons/crm/report/crm_claim_report_view.xml
+++ b/addons/crm/report/crm_claim_report_view.xml
@@ -29,7 +29,7 @@
-
+
diff --git a/addons/crm/report/crm_phonecall_report.py b/addons/crm/report/crm_phonecall_report.py
index 2255d722a6f..0d0988ad101 100644
--- a/addons/crm/report/crm_phonecall_report.py
+++ b/addons/crm/report/crm_phonecall_report.py
@@ -44,7 +44,7 @@ class crm_phonecall_report(osv.osv):
'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.phonecall')]"),
'duration': fields.float('Duration',readonly=True),
'date': fields.datetime('Planned Date'),
- 'partner_address_id': fields.many2one('res.partner.address', 'Contact', readonly=True)
+ 'partner_address_id': fields.many2one('res.partner.address', 'Contact Name', readonly=True)
}
def init(self, cr):
diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml
index 36a97374f41..48a74b1b75d 100644
--- a/addons/crm/report/crm_phonecall_report_view.xml
+++ b/addons/crm/report/crm_phonecall_report_view.xml
@@ -102,7 +102,7 @@
-
diff --git a/addons/sale/report/sale_report.py b/addons/sale/report/sale_report.py
index 0372de7ce42..c5e1a65e6e8 100644
--- a/addons/sale/report/sale_report.py
+++ b/addons/sale/report/sale_report.py
@@ -57,9 +57,9 @@ class sale_report(osv.osv):
('done', 'Done'),
('cancel', 'Cancelled')
], 'Order State', readonly=True),
- 'partner_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True),
- 'partner_order_id': fields.many2one('res.partner.address', 'Ordering Contact', readonly=True),
- 'partner_shipping_id': fields.many2one('res.partner.address', 'Shipping Address', readonly=True),
+ 'partner_invoice_id': fields.many2one('res.partner.address', 'Invoice Address Name', readonly=True),
+ 'partner_order_id': fields.many2one('res.partner.address', 'Ordering Contact Name', readonly=True),
+ 'partner_shipping_id': fields.many2one('res.partner.address', 'Shipping Address Name', readonly=True),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', required=True),
'analytic_account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'date_confirm': fields.date('Confirmation Date', readonly=True)
diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml
index 41fe598b597..639004803fd 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -130,9 +130,9 @@
-
-
-
+
+
+
From cbe81f0d2b41b92efba8ba19f0644892cef15e29 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Mon, 3 May 2010 13:10:39 +0200
Subject: [PATCH 069/148] [IMP] change state for my expense
bzr revid: nel@tinyerp.com-20100503111039-0ezmphj1p0q1895r
---
addons/board_hr/board_hr_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/board_hr/board_hr_view.xml b/addons/board_hr/board_hr_view.xml
index d26b4b2e6cf..44e2b98c96c 100644
--- a/addons/board_hr/board_hr_view.xml
+++ b/addons/board_hr/board_hr_view.xml
@@ -11,7 +11,7 @@
My Expenses
hr.expense.expense
form
- [('state','=','draft'),('user_id','=',uid)]
+ [('state','in',('draft', 'confirm')),('user_id','=',uid)]
From 1b88aace0bc0a894a22419d522fec76ca3a8cae3 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Mon, 3 May 2010 16:49:18 +0530
Subject: [PATCH 070/148] [IMP]:mrp:Improved product_to_consume and
consumed_product in mrp report.
bzr revid: apa@tinyerp.com-20100503111918-9dl8cw696yskgjmi
---
addons/mrp/report/mrp_production_order.py | 17 +++++++++++++++--
addons/mrp/report/mrp_production_order_view.xml | 6 ++++--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/addons/mrp/report/mrp_production_order.py b/addons/mrp/report/mrp_production_order.py
index 8f4fe764608..d754d6a50ad 100644
--- a/addons/mrp/report/mrp_production_order.py
+++ b/addons/mrp/report/mrp_production_order.py
@@ -33,8 +33,8 @@ class mrp_production_order(osv.osv):
'day': fields.char('Day',size=64,readonly=True),
'origin': fields.char('Source Document', size=64),
'nbr': fields.integer('# of Orders', readonly=True),
-# 'products_to_consumme': fields.integer('Products to Consumme', readonly=True),
-# 'consummed_products': fields.integer('Consummed Products', readonly=True),
+ 'products_to_consume': fields.integer('Products to Consume', readonly=True),
+ 'consumed_products': fields.integer('Consumed Products', readonly=True),
'date': fields.date('Date', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty': fields.float('Product Qty', readonly=True),
@@ -79,6 +79,18 @@ class mrp_production_order(osv.osv):
sum(l.product_qty * u.factor) as product_qty,
s.company_id as company_id,
count(*) as nbr,
+ (select sum(sm.product_qty) from stock_move as sm
+ left join mrp_production_move_ids as mv on (sm.id=mv.move_id)
+ left join mrp_production_product_line as ll on (ll.production_id=mv.production_id)
+ where sm.product_id=ll.product_id and ll.id=l.id
+ and sm.state not in ('done','cancel')
+ group by sm.product_id) as products_to_consume,
+ (select sum(sm.product_qty)/2 from stock_move as sm
+ left join mrp_production_move_ids as mv on (sm.id=mv.move_id)
+ left join mrp_production_product_line as ll on (ll.production_id=mv.production_id)
+ where sm.product_id=ll.product_id and ll.id=l.id
+ and sm.state in ('done','cancel')
+ group by sm.product_id) as consumed_products,
s.location_src_id,
s.location_dest_id,
s.bom_id,
@@ -100,6 +112,7 @@ class mrp_production_order(osv.osv):
to_date(to_char(s.create_date, 'MM-dd-YYYY'),'MM-dd-YYYY'),
l.product_id,
l.product_uom,
+ s.id,
l.id,
s.bom_id,
s.routing_id,
diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml
index a28dd281fa2..77905ac99b5 100644
--- a/addons/mrp/report/mrp_production_order_view.xml
+++ b/addons/mrp/report/mrp_production_order_view.xml
@@ -16,8 +16,8 @@
-
+
+
@@ -44,6 +44,8 @@
+
+
From a8daa68b70d5e7fef45ff7221260cebdfbdeb6ea Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Mon, 3 May 2010 13:25:19 +0200
Subject: [PATCH 071/148] [IMP]Change default value on holidays: employee
instead of user
bzr revid: nel@tinyerp.com-20100503112519-ziogwtz474koahhh
---
addons/hr_holidays/report/hr_holidays_report_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/hr_holidays/report/hr_holidays_report_view.xml b/addons/hr_holidays/report/hr_holidays_report_view.xml
index 8c8bc58204c..371e40bc9a0 100644
--- a/addons/hr_holidays/report/hr_holidays_report_view.xml
+++ b/addons/hr_holidays/report/hr_holidays_report_view.xml
@@ -97,7 +97,7 @@
-
+
@@ -117,7 +117,7 @@
hr.holidays.report
form
tree,graph
- {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_month':1,'search_default_Employee':1,'group_by_no_leaf':1,'group_by':[]}
From ce972e054bf874615bb5cb6170390ccc683d1d37 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Mon, 3 May 2010 14:25:59 +0200
Subject: [PATCH 072/148] [FIX] revert code to get analytic account on project
issue
bzr revid: nel@tinyerp.com-20100503122559-risp0gdr24cspvy5
---
addons/project_issue/__openerp__.py | 1 +
addons/project_issue/project_issue.py | 21 +++++++++++++++++++++
addons/project_issue/project_issue_demo.xml | 17 +++++++++++++++++
addons/project_issue/project_issue_view.xml | 19 +++++++++++++++++++
4 files changed, 58 insertions(+)
diff --git a/addons/project_issue/__openerp__.py b/addons/project_issue/__openerp__.py
index b990142e1ea..2bf67d47191 100644
--- a/addons/project_issue/__openerp__.py
+++ b/addons/project_issue/__openerp__.py
@@ -33,6 +33,7 @@
'depends': [
'crm',
'project',
+ 'hr_timesheet_sheet',
],
'init_xml': [
'project_issue_data.xml'
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 3bf0bf39751..74ca76262b4 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -128,6 +128,10 @@ class project_issue(osv.osv):
'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="integer", store=True),
'assigned_to' : fields.many2one('res.users', 'Assigned to'),
+ 'timesheet_ids' : fields.one2many('hr.analytic.timesheet', 'issue_id', 'Timesheets'),
+ 'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account',
+ domain="[('partner_id', '=', partner_id)]",
+ required=True),
}
def _get_project(self, cr, uid, context):
@@ -220,3 +224,20 @@ class project_issue(osv.osv):
project_issue()
+class account_analytic_line(osv.osv):
+ _inherit = 'account.analytic.line'
+ _columns = {
+ 'create_date' : fields.datetime('Create Date', readonly=True),
+ }
+
+account_analytic_line()
+
+class hr_analytic_issue(osv.osv):
+ _inherit = 'hr.analytic.timesheet'
+
+ _columns = {
+ 'issue_id' : fields.many2one('project.issue', 'Issue'),
+ }
+
+hr_analytic_issue()
+
diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml
index 7c7764a2e37..8794992b440 100644
--- a/addons/project_issue/project_issue_demo.xml
+++ b/addons/project_issue/project_issue_demo.xml
@@ -18,6 +18,7 @@
+
@@ -37,6 +38,7 @@
+
@@ -53,6 +55,8 @@
+
+
@@ -70,6 +74,7 @@
+
@@ -86,6 +91,7 @@
+
@@ -103,6 +109,7 @@
+
@@ -120,6 +127,7 @@
+
@@ -137,6 +145,7 @@
+
@@ -154,6 +163,7 @@
+
@@ -170,6 +180,7 @@
+
@@ -187,6 +198,7 @@
+
@@ -204,6 +216,7 @@
+
@@ -222,6 +235,7 @@
+
@@ -242,6 +256,7 @@
+
@@ -259,6 +274,7 @@
+
@@ -276,6 +292,7 @@
+
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index 04168492d38..343005d25d7 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -46,6 +46,7 @@
+
@@ -131,6 +132,24 @@
context="{'mail':'new', 'model': 'project.issue'}"
icon="gtk-go-forward" type="action" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 515ad0b902e069f3b18e1e87e3de78f78d3a5914 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Mon, 3 May 2010 15:20:30 +0200
Subject: [PATCH 073/148] [FIX] buttons change type and name
bzr revid: nel@tinyerp.com-20100503132030-ug9cwq11cahcdm28
---
addons/project_planning/project_planning_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/project_planning/project_planning_view.xml b/addons/project_planning/project_planning_view.xml
index 12e6f167304..becfd97784b 100644
--- a/addons/project_planning/project_planning_view.xml
+++ b/addons/project_planning/project_planning_view.xml
@@ -111,8 +111,8 @@
-
-
+
+
From 7dccf4fa5e3dba934196e99d71f66a9ee4c5610f Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Mon, 3 May 2010 17:16:08 +0200
Subject: [PATCH 074/148] [IMP] account: add columns for entries report
bzr revid: nel@tinyerp.com-20100503151608-4xfib11pgasz3vv4
---
.../account/report/account_entries_report.py | 18 ++++++++++++++++++
.../report/account_entries_report_view.xml | 19 ++++++++++++++++++-
addons/board_purchase/board_purchase_view.xml | 11 ++++++++++-
.../purchase/report/purchase_report_view.xml | 6 +++---
4 files changed, 49 insertions(+), 5 deletions(-)
diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py
index 83602ded81b..14b967f09b2 100644
--- a/addons/account/report/account_entries_report.py
+++ b/addons/account/report/account_entries_report.py
@@ -29,6 +29,8 @@ class account_entries_report(osv.osv):
_rec_name = 'date'
_columns = {
'date': fields.date('Date', readonly=True),
+ 'date_created': fields.date('Date Created', readonly=True),
+ 'date_maturity': fields.date('Date Maturity', readonly=True),
'nbr':fields.integer('# of Entries', readonly=True),
'nbl':fields.integer('# of Lines', readonly=True),
'amount': fields.float('Amount',readonly=True),
@@ -39,10 +41,14 @@ class account_entries_report(osv.osv):
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'ref': fields.char('Reference', size=64,readonly=True),
'period_id': fields.many2one('account.period', 'Period', readonly=True),
+ 'account_id': fields.many2one('account.account', 'Account', readonly=True),
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
+ 'product_id': fields.many2one('product.product', 'Product', readonly=True),
'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State',readonly=True,
help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Posted\' state.'),
'partner_id': fields.many2one('res.partner','Partner', readonly=True),
+ 'period_id2': fields.many2one('account.period', 'Move Line Period', readonly=True),
+ 'journal_id2': fields.many2one('account.journal', 'Move Line Journal', readonly=True),
'type': fields.selection([
('pay_voucher','Cash Payment'),
('bank_pay_voucher','Bank Payment'),
@@ -73,9 +79,15 @@ class account_entries_report(osv.osv):
to_char(am.date, 'MM') as month,
to_char(am.date, 'YYYY-MM-DD') as day,
am.company_id as company_id,
+ l.account_id as account_id,
+ l.date_created as date_created,
+ l.date_maturity as date_maturity,
am.journal_id as journal_id,
+ l.journal_id as journal_id2,
+ l.period_id as period_id2,
am.period_id as period_id,
l.partner_id as partner_id,
+ l.product_id as product_id,
am.type as type
from
account_move_line l
@@ -86,9 +98,15 @@ class account_entries_report(osv.osv):
am.date,
am.company_id,
am.journal_id,
+ l.journal_id,
am.period_id,
+ l.period_id,
am.type,
l.partner_id,
+ l.product_id,
+ l.date_created,
+ l.date_maturity,
+ l.account_id,
l.debit
)
""")
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
index 46f7ac46b83..e5710483da3 100644
--- a/addons/account/report/account_entries_report_view.xml
+++ b/addons/account/report/account_entries_report_view.xml
@@ -8,6 +8,8 @@
+
+
@@ -17,9 +19,13 @@
+
+
+
+
@@ -61,8 +67,10 @@
help = "Draft tasks"/>
+
+
-
+
@@ -72,18 +80,27 @@
help = "Posted tasks"/>
+
+
+
+
+
+
+
+
+
diff --git a/addons/board_purchase/board_purchase_view.xml b/addons/board_purchase/board_purchase_view.xml
index 2370e247eec..5548b3f2838 100644
--- a/addons/board_purchase/board_purchase_view.xml
+++ b/addons/board_purchase/board_purchase_view.xml
@@ -8,6 +8,15 @@
name="Purchase"
parent="base.dashboard"/>
+
+ Draft Purchases
+ ir.actions.act_window
+ purchase.order
+ form
+ tree,form
+ [('date_order','>',time.strftime('%Y-01-01 00:00:00')),('date_order','<',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')]
+
+
Quotation Request
ir.actions.act_window
@@ -26,7 +35,7 @@
-
+
diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml
index ad9e42282a2..70883b5eb05 100644
--- a/addons/purchase/report/purchase_report_view.xml
+++ b/addons/purchase/report/purchase_report_view.xml
@@ -52,7 +52,7 @@
search
-
+
@@ -128,13 +128,13 @@
-
+
-
+
From f88b8686415ab49a81e0553edc78befea4cb9c16 Mon Sep 17 00:00:00 2001
From: "Jni (Open ERP)"
Date: Tue, 4 May 2010 10:27:20 +0530
Subject: [PATCH 075/148] [IMP]: Replaced avg with sum
bzr revid: jni@tinyerp.co.in-20100504045720-rhcobtyhlalmm2w0
---
addons/stock/report/report_stock_picking_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index 11a8938bd4b..ecb9376a901 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -30,7 +30,7 @@
-
+
From c974568121f478ab2601c19b8320e2f2f830ebc6 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Tue, 4 May 2010 09:05:36 +0200
Subject: [PATCH 076/148] [IMP] account: Add remaining columns to report
bzr revid: nel@tinyerp.com-20100504070536-hn3cx0dpjgn8tig8
---
.../account/report/account_entries_report.py | 9 +++++++
.../report/account_entries_report_view.xml | 24 +++++++++++--------
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py
index 14b967f09b2..d1431128b49 100644
--- a/addons/account/report/account_entries_report.py
+++ b/addons/account/report/account_entries_report.py
@@ -46,8 +46,11 @@ class account_entries_report(osv.osv):
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State',readonly=True,
help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Posted\' state.'),
+ 'state_2': fields.selection([('draft','Draft'), ('valid','Valid')], 'State of Move Line', readonly=True,
+ help='When new move line is created the state will be \'Draft\'.\n* When all the payments are done it will be in \'Valid\' state.'),
'partner_id': fields.many2one('res.partner','Partner', readonly=True),
'period_id2': fields.many2one('account.period', 'Move Line Period', readonly=True),
+ 'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'journal_id2': fields.many2one('account.journal', 'Move Line Journal', readonly=True),
'type': fields.selection([
('pay_voucher','Cash Payment'),
@@ -59,6 +62,7 @@ class account_entries_report(osv.osv):
('journal_pur_voucher','Journal Purchase'),
('journal_voucher','Journal Voucher'),
],'Type',readonly=True),
+ 'quantity': fields.float('Products Quantity', digits=(16,2), readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
}
_order = 'date desc'
@@ -70,7 +74,9 @@ class account_entries_report(osv.osv):
select
min(l.id) as id,
am.ref as ref,
+ sum(l.quantity) as quantity,
am.state as state,
+ l.state as state_2,
am.date as date,
count(l.id) as nbr,
count(distinct am.id) as nbl,
@@ -80,6 +86,7 @@ class account_entries_report(osv.osv):
to_char(am.date, 'YYYY-MM-DD') as day,
am.company_id as company_id,
l.account_id as account_id,
+ l.analytic_account_id as analytic_account_id,
l.date_created as date_created,
l.date_maturity as date_maturity,
am.journal_id as journal_id,
@@ -103,10 +110,12 @@ class account_entries_report(osv.osv):
l.period_id,
am.type,
l.partner_id,
+ l.analytic_account_id,
l.product_id,
l.date_created,
l.date_maturity,
l.account_id,
+ l.state,
l.debit
)
""")
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
index e5710483da3..ae8546ee75e 100644
--- a/addons/account/report/account_entries_report_view.xml
+++ b/addons/account/report/account_entries_report_view.xml
@@ -12,21 +12,23 @@
+
-
-
-
-
+
-
+
+
+
+
+
@@ -47,7 +49,7 @@
search
-
+
@@ -67,9 +69,8 @@
help = "Draft tasks"/>
-
-
+
@@ -78,11 +79,13 @@
icon="terp-account"
domain="[('state','=','posted')]"
help = "Posted tasks"/>
+
+
@@ -92,13 +95,14 @@
-
-
+
+
+
From 24c309f335b2b9ecb3e29412ebbcb95fa0a51046 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Tue, 4 May 2010 12:42:13 +0530
Subject: [PATCH 077/148] [ADD]: Add Analytic Entries SQL report.
bzr revid: rch_open_erp-20100504071213-evj2bri1m1r9fi07
---
addons/account/__openerp__.py | 3 +-
addons/account/report/__init__.py | 1 +
.../report/account_analytic_entries_report.py | 81 ++++++++++++++
.../account_analytic_entries_report_view.xml | 102 ++++++++++++++++++
4 files changed, 186 insertions(+), 1 deletion(-)
create mode 100644 addons/account/report/account_analytic_entries_report.py
create mode 100644 addons/account/report/account_analytic_entries_report_view.xml
diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py
index ef4e572770c..cea696f590f 100644
--- a/addons/account/__openerp__.py
+++ b/addons/account/__openerp__.py
@@ -110,7 +110,8 @@ module named account_voucherss
'report/account_entries_report_view.xml',
'report/account_report_view.xml',
'report/account_analytic_report_view.xml',
- 'report/account_account_report_view.xml'
+ 'report/account_account_report_view.xml',
+ 'report/account_analytic_entries_report_view.xml'
],
'demo_xml': [
#'demo/price_accuracy00.yml',
diff --git a/addons/account/report/__init__.py b/addons/account/report/__init__.py
index 51cb0810f43..b411e404cac 100644
--- a/addons/account/report/__init__.py
+++ b/addons/account/report/__init__.py
@@ -39,5 +39,6 @@ import account_report
import account_analytic_report
import account_account_report
import account_entries_report
+import account_analytic_entries_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/account/report/account_analytic_entries_report.py b/addons/account/report/account_analytic_entries_report.py
new file mode 100644
index 00000000000..38a17a19ec2
--- /dev/null
+++ b/addons/account/report/account_analytic_entries_report.py
@@ -0,0 +1,81 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import tools
+from osv import fields,osv
+
+class analytic_entries_report(osv.osv):
+ _name = "analytic.entries.report"
+ _description = "Analytic Entries Statistics"
+ _auto = False
+ _columns = {
+ 'date': fields.date('Date', readonly=True),
+ 'year': fields.char('Year', size=4, readonly=True),
+ 'day': fields.char('Day', size=128, readonly=True),
+ 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
+ ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
+ ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
+ 'user_id' : fields.many2one('res.users', 'User',readonly=True),
+ 'name': fields.char('Description', size=64, readonly=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'currency_id': fields.many2one('res.currency', 'Currency', required=True),
+ 'account_id': fields.many2one('account.analytic.account', 'Account', required=True),
+ 'general_account_id': fields.many2one('account.account', 'General Account', required=True),
+ 'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),
+ 'move_id': fields.many2one('account.move.line', 'Move', required=True),
+ 'product_id': fields.many2one('product.product', 'Product', required=True),
+ 'product_uom_id': fields.many2one('product.uom', 'Product UOM', required=True),
+ 'amount': fields.float('Amount', readonly=True),
+ 'unit_amount': fields.float('Unit Amount', readonly=True),
+ 'amount_currency': fields.float('Amount Currency', readonly=True),
+ }
+ def init(self, cr):
+ tools.drop_view_if_exists(cr, 'analytic_entries_report')
+ cr.execute("""
+ create or replace view analytic_entries_report as (
+ select
+ min(a.id) as id,
+ a.create_date as date,
+ to_char(a.create_date, 'YYYY') as year,
+ to_char(a.create_date, 'MM') as month,
+ to_char(a.create_date, 'YYYY-MM-DD') as day,
+ a.user_id as user_id,
+ a.name as name,
+ a.company_id as company_id,
+ a.currency_id as currency_id,
+ a.account_id as account_id,
+ a.general_account_id as general_account_id,
+ a.journal_id as journal_id,
+ a.move_id as move_id,
+ a.product_id as product_id,
+ a.product_uom_id as product_uom_id,
+ sum(a.amount) as amount,
+ sum(a.unit_amount) as unit_amount,
+ sum(a.amount_currency) as amount_currency
+ from
+ account_analytic_line a
+ group by
+ a.create_date, a.user_id,a.name,company_id,a.currency_id,
+ a.account_id,a.general_account_id,a.journal_id,
+ a.move_id,a.product_id,a.product_uom_id
+ )
+ """)
+analytic_entries_report()
diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml
new file mode 100644
index 00000000000..4a45b40ed33
--- /dev/null
+++ b/addons/account/report/account_analytic_entries_report_view.xml
@@ -0,0 +1,102 @@
+
+
+
+
+ analytic.entries.report.tree
+ analytic.entries.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ analytic.entries.report.search
+ analytic.entries.report
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Analytic Entries
+ analytic.entries.report
+ form
+ tree,graph
+ {'search_default_month':1,'search_default_Account':1,'group_by_no_leaf':1,'group_by':[]}
+
+
+
+
+
+
+
From cb9b5f2fd01ffdfb595de0b1b9aedaff0aab4e31 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Tue, 4 May 2010 09:31:50 +0200
Subject: [PATCH 078/148] [IMP]account: rename date to effective date
bzr revid: nel@tinyerp.com-20100504073150-n7ox6liy7ps70tw7
---
addons/account/report/account_entries_report.py | 2 +-
addons/account/report/account_entries_report_view.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/account/report/account_entries_report.py b/addons/account/report/account_entries_report.py
index d1431128b49..85ba8a058f7 100644
--- a/addons/account/report/account_entries_report.py
+++ b/addons/account/report/account_entries_report.py
@@ -28,7 +28,7 @@ class account_entries_report(osv.osv):
_auto = False
_rec_name = 'date'
_columns = {
- 'date': fields.date('Date', readonly=True),
+ 'date': fields.date('Effective Date', readonly=True),
'date_created': fields.date('Date Created', readonly=True),
'date_maturity': fields.date('Date Maturity', readonly=True),
'nbr':fields.integer('# of Entries', readonly=True),
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
index ae8546ee75e..cc07f05c499 100644
--- a/addons/account/report/account_entries_report_view.xml
+++ b/addons/account/report/account_entries_report_view.xml
@@ -88,9 +88,9 @@
+
-
From 305d215a342d352741336527b1a0206091a499d2 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Tue, 4 May 2010 10:52:09 +0200
Subject: [PATCH 079/148] [REVERT] project_issue: remove analytic account from
views
bzr revid: nel@tinyerp.com-20100504085209-uwbj7is9xebv9sns
---
addons/project_issue/project_issue.py | 21 -------------------
addons/project_issue/project_issue_demo.xml | 17 ---------------
addons/project_issue/project_issue_view.xml | 19 -----------------
.../report/project_issue_report.py | 7 +------
.../report/project_issue_report_view.xml | 4 +---
5 files changed, 2 insertions(+), 66 deletions(-)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 74ca76262b4..3bf0bf39751 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -128,10 +128,6 @@ class project_issue(osv.osv):
'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="integer", store=True),
'assigned_to' : fields.many2one('res.users', 'Assigned to'),
- 'timesheet_ids' : fields.one2many('hr.analytic.timesheet', 'issue_id', 'Timesheets'),
- 'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account',
- domain="[('partner_id', '=', partner_id)]",
- required=True),
}
def _get_project(self, cr, uid, context):
@@ -224,20 +220,3 @@ class project_issue(osv.osv):
project_issue()
-class account_analytic_line(osv.osv):
- _inherit = 'account.analytic.line'
- _columns = {
- 'create_date' : fields.datetime('Create Date', readonly=True),
- }
-
-account_analytic_line()
-
-class hr_analytic_issue(osv.osv):
- _inherit = 'hr.analytic.timesheet'
-
- _columns = {
- 'issue_id' : fields.many2one('project.issue', 'Issue'),
- }
-
-hr_analytic_issue()
-
diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml
index 8794992b440..7c7764a2e37 100644
--- a/addons/project_issue/project_issue_demo.xml
+++ b/addons/project_issue/project_issue_demo.xml
@@ -18,7 +18,6 @@
-
@@ -38,7 +37,6 @@
-
@@ -55,8 +53,6 @@
-
-
@@ -74,7 +70,6 @@
-
@@ -91,7 +86,6 @@
-
@@ -109,7 +103,6 @@
-
@@ -127,7 +120,6 @@
-
@@ -145,7 +137,6 @@
-
@@ -163,7 +154,6 @@
-
@@ -180,7 +170,6 @@
-
@@ -198,7 +187,6 @@
-
@@ -216,7 +204,6 @@
-
@@ -235,7 +222,6 @@
-
@@ -256,7 +242,6 @@
-
@@ -274,7 +259,6 @@
-
@@ -292,7 +276,6 @@
-
diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml
index 343005d25d7..04168492d38 100644
--- a/addons/project_issue/project_issue_view.xml
+++ b/addons/project_issue/project_issue_view.xml
@@ -46,7 +46,6 @@
-
@@ -132,24 +131,6 @@
context="{'mail':'new', 'model': 'project.issue'}"
icon="gtk-go-forward" type="action" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py
index a14eb67bab4..67a72524af6 100644
--- a/addons/project_issue/report/project_issue_report.py
+++ b/addons/project_issue/report/project_issue_report.py
@@ -24,9 +24,6 @@ class project_issue_report(osv.osv):
'partner_id': fields.many2one('res.partner','Partner',domain="[('object_id.model', '=', 'project.issue')]"),
'canal_id': fields.many2one('res.partner.canal', 'Channel',readonly=True),
'task_id': fields.many2one('project.task', 'Task',domain="[('object_id.model', '=', 'project.issue')]" ),
- 'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account',
- domain="[('partner_id', '=', partner_id)]",
- required=True),
'partner_address_id': fields.many2one('res.partner.address','Contact ',readonly=True),
}
def init(self, cr):
@@ -53,7 +50,6 @@ class project_issue_report(osv.osv):
c.partner_id,
c.canal_id,
c.task_id,
- c.analytic_account_id as analytic_account_id,
c.partner_address_id as partner_address_id,
c.date_open as date_open,
date_trunc('day',c.create_date) as create_date,
@@ -83,7 +79,6 @@ class project_issue_report(osv.osv):
c.canal_id,
c.task_id,
c.date_open,
- c.analytic_account_id,
c.partner_address_id
)""")
@@ -92,4 +87,4 @@ project_issue_report()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index 4ac3222053b..11ddde6a63c 100644
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -27,7 +27,6 @@
-
@@ -69,7 +68,6 @@
-
@@ -137,4 +135,4 @@
-
\ No newline at end of file
+
From 49673c44fa317f20ad349d30bd4d9ba584d76725 Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Tue, 4 May 2010 15:38:22 +0530
Subject: [PATCH 080/148] [ADD]: Add menu Statastic Reports for accounting
reports.
bzr revid: rch_open_erp-20100504100822-9c9x8i4wlva5wobw
---
addons/account/account_menuitem.xml | 1 +
addons/account/report/account_account_report_view.xml | 2 +-
addons/account/report/account_analytic_entries_report_view.xml | 2 +-
addons/account/report/account_analytic_report_view.xml | 2 +-
addons/account/report/account_entries_report_view.xml | 2 +-
addons/account/report/account_invoice_report_view.xml | 2 +-
6 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index 37d539a4b25..be63e7f2726 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -22,6 +22,7 @@
groups="group_account_user"/>
+
diff --git a/addons/account/report/account_account_report_view.xml b/addons/account/report/account_account_report_view.xml
index 19731e390c2..e5dcd8551d1 100644
--- a/addons/account/report/account_account_report_view.xml
+++ b/addons/account/report/account_account_report_view.xml
@@ -81,7 +81,7 @@
-
+
diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml
index 4a45b40ed33..25433e607b8 100644
--- a/addons/account/report/account_analytic_entries_report_view.xml
+++ b/addons/account/report/account_analytic_entries_report_view.xml
@@ -96,7 +96,7 @@
-
+
diff --git a/addons/account/report/account_analytic_report_view.xml b/addons/account/report/account_analytic_report_view.xml
index de97bfcb798..1befff216bd 100644
--- a/addons/account/report/account_analytic_report_view.xml
+++ b/addons/account/report/account_analytic_report_view.xml
@@ -103,7 +103,7 @@
-
+
diff --git a/addons/account/report/account_entries_report_view.xml b/addons/account/report/account_entries_report_view.xml
index ae8546ee75e..e700ab56fae 100644
--- a/addons/account/report/account_entries_report_view.xml
+++ b/addons/account/report/account_entries_report_view.xml
@@ -122,6 +122,6 @@
{'search_default_This Month':1,'search_default_Journal':1,'group_by_no_leaf':1,'group_by':[]}
-
+
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index c36e2313736..461347cbfbb 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -168,7 +168,7 @@
-
+
From 1142999b51f078528f06fb5390b89569b391c75c Mon Sep 17 00:00:00 2001
From: "rch (Open ERP)" <>
Date: Tue, 4 May 2010 18:50:22 +0530
Subject: [PATCH 081/148] [IMP]: Improve account reports.
bzr revid: rch_open_erp-20100504132022-8l2bd1z917ta8dxs
---
addons/account/report/account_account_report.py | 15 +++++++++++----
.../report/account_account_report_view.xml | 11 ++++++++---
.../report/account_analytic_entries_report.py | 2 ++
.../account_analytic_entries_report_view.xml | 1 +
4 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/addons/account/report/account_account_report.py b/addons/account/report/account_account_report.py
index 8a18c7d89f1..55e5d7030c7 100644
--- a/addons/account/report/account_account_report.py
+++ b/addons/account/report/account_account_report.py
@@ -40,10 +40,13 @@ class account_account_report(osv.osv):
'company_id': fields.many2one('res.company', 'Company', required=True),
'currency_mode': fields.selection([('current', 'At Date'), ('average', 'Average Rate')], 'Outgoing Currencies Rate',readonly=True),
'user_type': fields.many2one('account.account.type', 'Account Type',readonly=True),
+ 'quantity': fields.float('Quantity', readonly=True),
+ 'amount_total': fields.float('Total Amount', readonly=True),
'credit': fields.float('Credit', readonly=True),
'debit': fields.float('Debit', readonly=True),
'balance': fields.float('Balance', readonly=True),
'nbr': fields.integer('#Accounts', readonly=True),
+ 'parent_account_id': fields.many2one('account.account', 'Parent Account', required=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_account_report')
@@ -58,14 +61,17 @@ class account_account_report(osv.osv):
a.company_id as company_id,
a.currency_mode as currency_mode,
a.user_type as user_type,
+ a.parent_id as parent_account_id,
+ sum(ail.quantity) as quantity,
+ sum(ail.price_subtotal) as amount_total,
sum(m.credit) as credit,
sum(m.debit) as debit,
(sum(m.credit)-sum(m.debit)) as balance
from
account_account as a
- left join
- account_move_line as m
- on m.account_id=a.id
+ left join account_move_line as m on m.account_id=a.id
+ left join account_invoice_line as ail on ail.account_id=a.id
+ left join account_invoice as ai on ai.account_id=a.id
group by
a.name,
a.code,
@@ -73,7 +79,8 @@ class account_account_report(osv.osv):
a.company_id,
a.currency_mode,
a.user_type,
- m.account_id
+ m.account_id,
+ a.parent_id
)
""")
account_account_report()
diff --git a/addons/account/report/account_account_report_view.xml b/addons/account/report/account_account_report_view.xml
index e5dcd8551d1..32e77be341f 100644
--- a/addons/account/report/account_account_report_view.xml
+++ b/addons/account/report/account_account_report_view.xml
@@ -10,10 +10,13 @@
-
+
+
+
+
@@ -55,8 +58,9 @@
-
-
+
+
+
@@ -67,6 +71,7 @@
+
diff --git a/addons/account/report/account_analytic_entries_report.py b/addons/account/report/account_analytic_entries_report.py
index 38a17a19ec2..2a1b4ad993b 100644
--- a/addons/account/report/account_analytic_entries_report.py
+++ b/addons/account/report/account_analytic_entries_report.py
@@ -46,6 +46,7 @@ class analytic_entries_report(osv.osv):
'amount': fields.float('Amount', readonly=True),
'unit_amount': fields.float('Unit Amount', readonly=True),
'amount_currency': fields.float('Amount Currency', readonly=True),
+ 'nbr': fields.integer('#Entries', readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'analytic_entries_report')
@@ -53,6 +54,7 @@ class analytic_entries_report(osv.osv):
create or replace view analytic_entries_report as (
select
min(a.id) as id,
+ count(distinct a.id) as nbr,
a.create_date as date,
to_char(a.create_date, 'YYYY') as year,
to_char(a.create_date, 'MM') as month,
diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml
index 25433e607b8..967fe3a5272 100644
--- a/addons/account/report/account_analytic_entries_report_view.xml
+++ b/addons/account/report/account_analytic_entries_report_view.xml
@@ -21,6 +21,7 @@
+
From c1d50b9c54159b109e122fb8f3e97b748f47c94f Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Wed, 5 May 2010 17:09:55 +0530
Subject: [PATCH 082/148] [FIX]:Fix the residual problem in invoice reports.
bzr revid: apa@tinyerp.com-20100505113955-3bxz8hjqxzu9e6ps
---
addons/account/report/account_invoice_report.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/account/report/account_invoice_report.py b/addons/account/report/account_invoice_report.py
index 062261f854a..cd1477e79cf 100644
--- a/addons/account/report/account_invoice_report.py
+++ b/addons/account/report/account_invoice_report.py
@@ -100,7 +100,7 @@ class account_invoice_report(osv.osv):
s.address_invoice_id as address_invoice_id,
s.account_id as account_id,
s.partner_bank as partner_bank,
- sum(s.residual) as residual,
+ s.residual as residual,
case when s.state != 'paid' then null else
extract(epoch from avg(am.date_created-l.create_date))/(24*60*60)::decimal(16,2)
end as delay_to_pay
@@ -120,6 +120,7 @@ class account_invoice_report(osv.osv):
l.uos_id,
s.user_id,
s.state,
+ s.residual,
s.company_id,
s.payment_term,
s.period_id,
From 3540e4b74c759bb5ddec5c2630df985071e67869 Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Wed, 5 May 2010 17:54:18 +0530
Subject: [PATCH 083/148] [IMP] Task -620 Usability for sales menu
bzr revid: ksa@tinyerp.co.in-20100505122418-abapkh6l3enrqbmk
---
.../account_analytic_default_view.xml | 6 ++++--
addons/document/document_view.xml | 5 +++--
addons/mrp/wizard/make_procurement_view.xml | 3 ++-
addons/product/product_wizard.xml | 3 ++-
addons/purchase/purchase_view.xml | 3 ++-
addons/sale/sale_view.xml | 2 +-
addons/stock/report/report_stock_view.xml | 9 ++++++---
addons/stock/stock_view.xml | 3 ++-
addons/wiki/test/wiki_test00.yml | 2 ++
9 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/addons/account_analytic_default/account_analytic_default_view.xml b/addons/account_analytic_default/account_analytic_default_view.xml
index ebf304100fd..b94afdc9292 100644
--- a/addons/account_analytic_default/account_analytic_default_view.xml
+++ b/addons/account_analytic_default/account_analytic_default_view.xml
@@ -54,7 +54,8 @@
id="analytic_rule_action_partner"
res_model="account.analytic.default"
src_model="res.partner"
- domain="[('partner_id','=',active_id)]"/>
+ domain="[('partner_id','=',active_id)]"
+ groups="base.group_extended"/>
+ domain="[('product_id','=',active_id)]"
+ groups="base.group_extended"/>
diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml
index 341fe6ceb79..69c000e89a6 100644
--- a/addons/document/document_view.xml
+++ b/addons/document/document_view.xml
@@ -118,7 +118,7 @@
document.directory
document.directory
- tree
+ tree
@@ -316,7 +316,8 @@
+ src_model="res.partner"
+ groups="base.group_extended"/>
+ id="act_make_procurement"
+ groups="base.group_extended"/>
diff --git a/addons/product/product_wizard.xml b/addons/product/product_wizard.xml
index f226cd4e543..bd1567fb1d1 100644
--- a/addons/product/product_wizard.xml
+++ b/addons/product/product_wizard.xml
@@ -6,6 +6,7 @@
string="Price List"
model="product.product"
name="product.price_list"
- keyword="client_print_multi"/>
+ keyword="client_print_multi"
+ groups="base.group_extended"/>
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index c301116db2a..839dc4306fa 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -289,7 +289,8 @@
id="action_purchase_line_product_tree"
name="Product purchases"
res_model="purchase.order.line"
- src_model="product.product"/>
+ src_model="product.product"
+ groups="base.group_extended"/>
From d5ae9ca15a02f1f55282d05e7699b760f2acea8a Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Thu, 6 May 2010 11:35:59 +0530
Subject: [PATCH 086/148] [IMP]: wiki: Apply Remaining changes in yml file for
wiki module
bzr revid: ksa@tinyerp.co.in-20100506060559-ei5hb4fkz0rfsn6s
---
addons/wiki/test/wiki_test00.yml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/addons/wiki/test/wiki_test00.yml b/addons/wiki/test/wiki_test00.yml
index a8208119a29..277b8479a43 100755
--- a/addons/wiki/test/wiki_test00.yml
+++ b/addons/wiki/test/wiki_test00.yml
@@ -33,10 +33,9 @@
ids = self.search(cr, uid, [])
self.wiki_do_index(cr, uid, ids , {'active_ids': [ref('wiki_wiki_openerpwikiediting0')]})
-
- # Remaining Act window
I check the page history for the current page by clicking on "Page History".After that find difference between history.
-
- # !act_window {name: Page History,view_type: form,id: act_wiki_wiki_history,res_model: wiki.wiki.history,src_model: wiki.wiki,view_mode: tree,key2: client_action_multi,target: new}
+ !act_window {name: Page History,view_type: form,id: act_wiki_wiki_history,domain: "[('wiki_id', '=', active_id)]",res_model: wiki.wiki.history,src_model: wiki.wiki,view_mode: tree,key2: client_action_multi,target: new}
-
I create a new wiki group on the Given Home Page
-
@@ -50,7 +49,10 @@
ids = self.search(cr, uid, [])
self.open_wiki_page(cr, uid, ids, {'active_ids': [ref('wiki_groups_wikigroupediting0')]})
-
- # Remaining beacuse of Act window (I search the page by clicking on the "search page".)
+ I search the page by clicking on the "search page".
+-
+ !act_window {name: Search Page,view_type: form,id: act_wiki_group_open,domain: "[('group_id', '=', active_id)]",res_model: wiki.wiki,src_model: wiki.groups,view_mode: tree,key2: client_action_multi,target: new}
+-
In order to create a menu I will create wizard data
-
!record {model: wiki.groups, id: wiki.wiki_groups_wikiformatting0}:
From 6ce3d0ebffccb2fd7b084219f053bc2644e8a5cb Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Thu, 6 May 2010 17:44:30 +0530
Subject: [PATCH 087/148] [IMP]: audittrail: Usability improvement in
audittrail module.
bzr revid: atp@tinyerp.co.in-20100506121430-w269vskl2ucsu5k6
---
addons/audittrail/audittrail.py | 2 +-
addons/audittrail/audittrail_view.xml | 84 ++++++++++++++++++++++-----
2 files changed, 72 insertions(+), 14 deletions(-)
diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py
index 80166298edb..16041889575 100644
--- a/addons/audittrail/audittrail.py
+++ b/addons/audittrail/audittrail.py
@@ -36,7 +36,7 @@ class audittrail_rule(osv.osv):
"name": fields.char("Rule Name", size=32, required=True),
"object_id": fields.many2one('ir.model', 'Object', required=True),
"user_id": fields.many2many('res.users', 'audittail_rules_users',
- 'user_id', 'rule_id', 'Users'),
+ 'user_id', 'rule_id', 'Users', help="if User is not added then it will applicable for all users"),
"log_read": fields.boolean("Log reads"),
"log_write": fields.boolean("Log writes"),
"log_unlink": fields.boolean("Log deletes"),
diff --git a/addons/audittrail/audittrail_view.xml b/addons/audittrail/audittrail_view.xml
index a79e6a0b6c0..b0efa7c29f2 100644
--- a/addons/audittrail/audittrail_view.xml
+++ b/addons/audittrail/audittrail_view.xml
@@ -16,8 +16,9 @@
-
-
+
+
+
-
+
@@ -46,7 +47,38 @@
+
+
+
+ Audittrail-rule Search
+ audittrail.rule
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -55,7 +87,7 @@
ir.actions.act_window
form
tree,form
-
+
+ widget="one2many_list" readonly="1" nolabel="1">
-
+
+
-
+
+
+
+
+ Audittrail-log Search
+ audittrail.log
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -149,13 +208,12 @@
Logs
audittrail.log
form
+ tree,form
+
+
-
-
-
From fda05ce231d5b2854349872eb885d375e28b7b2f Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Thu, 6 May 2010 17:48:54 +0530
Subject: [PATCH 088/148] [IMP]: idea: usability improvement in idea module and
add some new functionality for user vote
bzr revid: atp@tinyerp.co.in-20100506121854-ujd17vefm02o3x6w
---
addons/idea/idea.py | 13 ++---
addons/idea/idea_view.xml | 55 ++++++++++++++++++----
addons/idea/wizard/idea_post_vote.py | 23 ++++++---
addons/idea/wizard/idea_post_vote_view.xml | 14 +-----
4 files changed, 70 insertions(+), 35 deletions(-)
diff --git a/addons/idea/idea.py b/addons/idea/idea.py
index e698c85d0b4..37bdaa80b7f 100644
--- a/addons/idea/idea.py
+++ b/addons/idea/idea.py
@@ -148,7 +148,6 @@ class idea_idea(osv.osv):
if int(field_value) >= 0:
vote_obj.create(cr, uid, {'idea_id': id, 'user_id': uid, 'score': textual_value })
-
_columns = {
'user_id': fields.many2one('res.users', 'Creator', required=True, readonly=True),
'title': fields.char('Idea Summary', size=64, required=True),
@@ -170,12 +169,16 @@ class idea_idea(osv.osv):
opened by the user, the state is \'Opened\'.\
\nIf the idea is accepted, the state is \'Accepted\'.'),
'stat_vote_ids': fields.one2many('idea.vote.stat', 'idea_id', 'Statistics', readonly=True),
+ 'date': fields.date('Creation date'),
+ 'vote_user': fields.integer('Maximum Vote per User',
+ help="Set to one if you require only one Vote per user"),
}
_defaults = {
'user_id': lambda self,cr,uid,context: uid,
'my_vote': lambda *a: '-1',
- 'state': lambda *a: 'draft'
+ 'state': lambda *a: 'draft',
+ 'vote_user': lambda * a: 1,
}
_order = 'id desc'
@@ -196,7 +199,6 @@ class idea_idea(osv.osv):
return True
idea_idea()
-
class idea_comment(osv.osv):
""" Apply Idea for Comment """
@@ -210,7 +212,7 @@ class idea_comment(osv.osv):
'content': fields.text('Comment', required=True),
'create_date': fields.datetime('Creation date', readonly=True),
}
-
+
_defaults = {
'user_id': lambda self, cr, uid, context: uid
}
@@ -230,7 +232,7 @@ class idea_vote(osv.osv):
_columns = {
'user_id': fields.many2one('res.users', 'User'),
'idea_id': fields.many2one('idea.idea', 'Idea', required=True, ondelete='cascade'),
- 'score': fields.selection(VoteValues, 'Score', required=True)
+ 'score': fields.selection(VoteValues, 'Score', required=True),
}
_defaults = {
'score': lambda *a: DefaultVoteValue,
@@ -238,7 +240,6 @@ class idea_vote(osv.osv):
idea_vote()
-
class idea_vote_stat(osv.osv):
""" Idea votes Statistics """
diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml
index 7dc0b5f7178..c1c94ec4bcf 100644
--- a/addons/idea/idea_view.xml
+++ b/addons/idea/idea_view.xml
@@ -14,7 +14,8 @@
-
+
+
@@ -128,6 +129,27 @@
+
+
+
+
+ idea.vote.search
+ idea.vote
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -141,9 +163,12 @@
+
-
-
+
+
+
+
@@ -154,8 +179,9 @@
-
-
+
+
+
@@ -209,17 +235,25 @@
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -327,6 +361,7 @@
idea.vote
form
tree,form
+
diff --git a/addons/idea/wizard/idea_post_vote.py b/addons/idea/wizard/idea_post_vote.py
index c5e6c530334..1da9a92e35a 100644
--- a/addons/idea/wizard/idea_post_vote.py
+++ b/addons/idea/wizard/idea_post_vote.py
@@ -34,7 +34,8 @@ class idea_post_vote(osv.osv_memory):
('25', 'Bad'),
('50', 'Normal'),
('75', 'Good'),
- ('100', 'Very Good') ], 'Post Vote', required=True)
+ ('100', 'Very Good') ], 'Post Vote', required=True),
+# 'content': fields.text('Comment'),
}
def view_init(self, cr, uid, fields, context=None):
@@ -47,7 +48,7 @@ class idea_post_vote(osv.osv_memory):
@param context: A standard dictionary for contextual values
"""
idea_obj = self.pool.get('idea.idea')
-
+
for idea in idea_obj.browse(cr, uid, context.get('active_ids', [])):
if idea.state in ['draft', 'close', 'cancel']:
raise osv.except_osv(_("Warning !"), _("Draft/Accepted/Cancelled \
@@ -57,7 +58,6 @@ ideas Could not be voted"))
\'Open\' state before vote for that idea.'))
return False
-
def do_vote(self, cr, uid, ids, context):
"""
@@ -67,14 +67,23 @@ ideas Could not be voted"))
@param ids: List of Idea Post vote’s IDs.
@return: Dictionary {}
"""
-
+
data = context and context.get('active_id', False) or False
vote_obj = self.pool.get('idea.vote')
-
+ comment_obj = self.pool.get('idea.comment')
+ idea_obj = self.pool.get('idea.idea')
for do_vote_obj in self.read(cr, uid, ids):
score = str(do_vote_obj['vote'])
- dic = {'idea_id': data, 'user_id': uid, 'score': score }
-
+# comment = do_vote_obj['content']
+ idea = idea_obj.browse(cr, uid, data)
+ user_limit = idea.vote_user
+ dic = {'idea_id': data, 'user_id': uid, 'score': score}
+# dic = {'idea_id': data, 'user_id': uid, 'score': score, 'content': comment}
+ cr.execute('select count(id) from idea_vote where user_id=%s\
+ and idea_id=%s' % (uid, context.get('active_id')))
+ res = cr.fetchone()[0]
+ if res >= user_limit:
+ raise osv.except_osv(_('Warning !'),_("You can not give Vote for this idea more than %s times") % (user_limit))
vote = vote_obj.create(cr, uid, dic)
return {}
diff --git a/addons/idea/wizard/idea_post_vote_view.xml b/addons/idea/wizard/idea_post_vote_view.xml
index e49e91f5661..d197497afce 100644
--- a/addons/idea/wizard/idea_post_vote_view.xml
+++ b/addons/idea/wizard/idea_post_vote_view.xml
@@ -13,8 +13,9 @@
-
+
+
@@ -22,17 +23,6 @@
-
-
-
- Vote
- idea.post.vote
- form
- tree,form
-
- new
-
-
Date: Thu, 6 May 2010 17:50:00 +0530
Subject: [PATCH 089/148] [IMP]: lunch: usability improvement in lunch module.
bzr revid: atp@tinyerp.co.in-20100506122000-8wxzo3ddxa1zo4w2
---
addons/lunch/__openerp__.py | 6 +-
addons/lunch/lunch_view.xml | 121 +++++++++++++++---
.../lunch/wizard/lunch_cashbox_clean_view.xml | 12 +-
.../lunch/wizard/lunch_order_cancel_view.xml | 12 +-
.../lunch/wizard/lunch_order_confirm_view.xml | 12 +-
5 files changed, 112 insertions(+), 51 deletions(-)
diff --git a/addons/lunch/__openerp__.py b/addons/lunch/__openerp__.py
index efde2f16e61..5c02874b453 100644
--- a/addons/lunch/__openerp__.py
+++ b/addons/lunch/__openerp__.py
@@ -47,10 +47,8 @@
'lunch_report.xml',
#'process/lunch_process.xml'
],
- "demo_xml": ['lunch_demo.xml',
- ],
- "test": ['test/test_lunch.yml'
- ],
+ "demo_xml": ['lunch_demo.xml'],
+ "test": ['test/test_lunch.yml'],
"installable": True,
}
diff --git a/addons/lunch/lunch_view.xml b/addons/lunch/lunch_view.xml
index ab3d6792683..07ea6a3fc8e 100644
--- a/addons/lunch/lunch_view.xml
+++ b/addons/lunch/lunch_view.xml
@@ -56,13 +56,46 @@
-
+
+
+ lunch-order Search
+ lunch.order
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lunch Orders
lunch.order
tree,form
+
-
-
-
+
+
+
@@ -141,12 +174,37 @@
+
+
+
+ CashMove Search
+ lunch.cashmove
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
CashMove
lunch.cashmove
+
-
@@ -255,29 +312,53 @@
-
-
-
-
- Lunch amount
- report.lunch.amount
- form
-
-
-
-
-
-
-
+
+
+ Lunch.amount.report.graph
+ report.lunch.amount
+ graph
+
+
+
+
+
+
+
+
+
+
+ Lunch amount Search
+ report.lunch.amount
+ search
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lunch amount
report.lunch.amount
form
- tree,form
+ tree,graph
+
+ {'search_default_user':1, 'group_by_no_leaf':1,'group_by':[]}
-
+
+
@@ -22,14 +23,7 @@
-
- Set CashBox to Zero
- lunch.cashbox.clean
- form
- tree,form
-
- new
-
+
-
+
+
@@ -22,14 +23,7 @@
-
- Cancel Order
- lunch.order.cancel
- form
- tree,form
-
- new
-
+
-
+
+
@@ -24,14 +25,7 @@
-
- Confirm Order
- lunch.order.confirm
- form
- tree,form
-
- new
-
+
Date: Thu, 6 May 2010 17:57:27 +0530
Subject: [PATCH 090/148] [IMP]: Improve Analyic Account and Analytic Account
Entries report by adding graph view.
bzr revid: rch_open_erp-20100506122727-aimr38prot4y97vx
---
.../account_analytic_entries_report_view.xml | 20 +++++++++++++++----
.../report/account_analytic_report_view.xml | 16 ++++++++++++++-
2 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/addons/account/report/account_analytic_entries_report_view.xml b/addons/account/report/account_analytic_entries_report_view.xml
index 967fe3a5272..d6f6e542514 100644
--- a/addons/account/report/account_analytic_entries_report_view.xml
+++ b/addons/account/report/account_analytic_entries_report_view.xml
@@ -68,11 +68,11 @@
-
+
-
+
@@ -87,13 +87,25 @@
-
+
+ account.analytic.entries.graph
+ analytic.entries.report
+ graph
+
+
+
+
+
+
+
+
+
Analytic Entries
analytic.entries.report
form
tree,graph
- {'search_default_month':1,'search_default_Account':1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
diff --git a/addons/account/report/account_analytic_report_view.xml b/addons/account/report/account_analytic_report_view.xml
index dfd53b502a5..838cefe5898 100644
--- a/addons/account/report/account_analytic_report_view.xml
+++ b/addons/account/report/account_analytic_report_view.xml
@@ -107,11 +107,25 @@
+
+ account.analytic.report.graph
+ analytic.report
+ graph
+
+
+
+
+
+
+
+
+
+
Analytic Accounts
analytic.report
form
- tree
+ tree,graph
{'search_default_This Month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}
From 6df236b561d3bdcb0fb36c9eab3ca140216a4e7d Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Thu, 6 May 2010 17:59:54 +0530
Subject: [PATCH 091/148] [IMP]: partner_crm hr_timesheet: Task -225
Improvement in partner_crm module
bzr revid: ksa@tinyerp.co.in-20100506122954-leluf2cvydnl27eu
---
addons/hr_timesheet/hr_timesheet.py | 4 ++--
addons/partner_crm/partner_crm.py | 19 +++++++++++--------
addons/partner_crm/partner_crm_view.xml | 22 +++++++++++-----------
3 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py
index e89d52659f4..ccfea216054 100644
--- a/addons/hr_timesheet/hr_timesheet.py
+++ b/addons/hr_timesheet/hr_timesheet.py
@@ -44,6 +44,7 @@ class hr_analytic_timesheet(osv.osv):
_order = "id desc"
_columns = {
'line_id' : fields.many2one('account.analytic.line', 'Analytic line', ondelete='cascade'),
+ 'partner_id': fields.related('account_id', 'partner_id', type='many2one', string='Partner Id',relation='account.analytic.account',store=True),
}
def unlink(self, cr, uid, ids, context={}):
@@ -56,8 +57,7 @@ class hr_analytic_timesheet(osv.osv):
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, unit, context={}):
res = {}
-# if prod_id and unit_amount:
- if prod_id:
+ if prod_id and unit_amount:
# find company
company_id=self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context)
res = self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount,company_id,unit, context)
diff --git a/addons/partner_crm/partner_crm.py b/addons/partner_crm/partner_crm.py
index 2162f850115..fef1b36391c 100644
--- a/addons/partner_crm/partner_crm.py
+++ b/addons/partner_crm/partner_crm.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,7 +15,7 @@
# 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 .
+# along with this program. If not, see .
#
##############################################################################
@@ -24,15 +24,18 @@ from osv import osv, fields
class res_partner(osv.osv):
""" Inherits partner and adds more information in the partner form """
_inherit = 'res.partner'
-
+
_columns = {
- 'opportunity_ids': fields.one2many('crm.opportunity', 'partner_id', 'Opportunities'),
+ 'opportunity_ids': fields.one2many('crm.opportunity', 'partner_id', 'Opportunities'),
'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\
- 'Meetings'),
- 'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id', 'Phonecalls'),
- 'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices'),
+ 'Meetings'),
+ 'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id', 'Phonecalls'),
+ 'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices'),
'contract_ids': fields.one2many('account.analytic.account', \
- 'partner_id', 'Contracts'),
+ 'partner_id', 'Contracts'),
+ 'account_line_ids': fields.one2many('hr.analytic.timesheet', \
+ 'partner_id', 'Anaylitic account lines '),
+
}
res_partner()
diff --git a/addons/partner_crm/partner_crm_view.xml b/addons/partner_crm/partner_crm_view.xml
index ab75f5c58ed..8aabbb242e9 100644
--- a/addons/partner_crm/partner_crm_view.xml
+++ b/addons/partner_crm/partner_crm_view.xml
@@ -11,19 +11,19 @@
-
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
From c8215836a4862f41cdb44f36dd48ed44ce641547 Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Mon, 10 May 2010 10:16:50 +0530
Subject: [PATCH 092/148] [IMP]: base_calendar: Apply minor changes for erule
field in base_calendar module
bzr revid: ksa@tinyerp.co.in-20100510044650-300206tol7lrvm3s
---
addons/base_calendar/base_calendar.py | 27 +++++++--------------------
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index 5bd49221481..1d7fd04b5f2 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -459,7 +459,7 @@ property or property parameter."),
event.add('location').value = event_obj.location
if event_obj.rrule:
event.add('rrule').value = event_obj.rrule
-
+
if event_obj.alarm_id:
# computes alarm data
valarm = event.add('valarm')
@@ -480,10 +480,10 @@ property or property parameter."),
if interval == 'minutes':
delta = timedelta(minutes=duration)
trigger.value = delta
-
+
# Compute other details
valarm.add('DESCRIPTION').value = alarm_data['name'] or 'OpenERP'
-
+
for attendee in event_obj.attendee_ids:
attendee_add = event.add('attendee')
attendee_add.params['CUTYPE'] = [str(attendee.cutype)]
@@ -492,7 +492,7 @@ property or property parameter."),
attendee_add.value = 'MAILTO:' + attendee.email
res = cal.serialize()
return res
-
+
def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context={}):
"""
Send mail for calendar attendee.
@@ -1367,25 +1367,12 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
if until_date:
continue
until_date = arg[2]
- else:
- args_without_date.append(arg)
- # args.append(('rrule_type', '=', 'none'))
- res = super(calendar_event, self).search(cr, uid, args, offset, limit, order, context, count)
- if start_date and until_date:
- recur_args = [('rrule_type', '!=', 'none'), ('date', '<=', until_date), '|', ('end_date', '=', False), ('end_date', '>=', start_date)]
- recur_args.extend(args_without_date)
- recur_res = super(calendar_event, self).search(cr, uid, recur_args, offset, limit, order, context, count)
-
- if not isinstance(res, list):
- res = [res]
- if not isinstance(recur_res, list):
- recur_res = [recur_res]
-
- res.extend(recur_res)
- res = list(set(res))
+ res = super(calendar_event, self).search(cr, uid, args_without_date, \
+ offset, limit, order, context, count)
return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit)
+
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
"""
Writes values in one or several fields.
From 9ac0f18b90d947180a7f30ea40a83c9bc4fadf61 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Mon, 10 May 2010 13:55:04 +0530
Subject: [PATCH 093/148] [IMP]: crm: Improvement in yaml for crm lead and crm
phonecall form and minor improvement in crm phonecall2opportunity wizard.
bzr revid: atp@tinyerp.co.in-20100510082504-fio3jejz1xk16c4s
---
addons/crm/test/test_crm_lead.yml | 14 ++--
addons/crm/test/test_crm_phonecall.yml | 64 +++++++++++--------
.../wizard/crm_phonecall_to_opportunity.py | 27 ++++----
3 files changed, 61 insertions(+), 44 deletions(-)
diff --git a/addons/crm/test/test_crm_lead.yml b/addons/crm/test/test_crm_lead.yml
index 69832d7e7b6..437059f371c 100644
--- a/addons/crm/test/test_crm_lead.yml
+++ b/addons/crm/test/test_crm_lead.yml
@@ -40,6 +40,11 @@
-
!python {model: crm.lead}: |
self.case_open(cr, uid, [ref("crm_lead_newcustomer0")])
+- |
+ I check that lead is now in 'open' state.
+-
+ !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in open state}:
+ - state == "open"
- |
As the lead seems to be a real business opportunity, I will convert it to a
@@ -48,8 +53,8 @@
-
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref('crm_lead_newcustomer0'))
- if not lead.partner_id:
- self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
+ action = self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
+ assert action['res_model'] == 'crm.lead2opportunity.partner'
-
|
Now, select "create a new partner" option in this wizard.
@@ -78,8 +83,8 @@
I can check that a lead and a business opportunity is now assigned to this
lead.
-
- # !python {model: crm.lead, id: crm_lead_newcustomer0}:
- # - opportunity_id.id != False
+ # !python {model: crm.lead, id: crm_lead_newcustomer0}:
+ # - opportunity_id == False
- |
I check that the partner associated to this lead as the same country, phone number
@@ -87,7 +92,6 @@
-
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
- print "lead", lead.partner_name
obj_opportunity = self.pool.get('crm.opportunity')
ids = obj_opportunity.search(cr, uid, [('name', '=', lead.partner_name)])
opportunity = obj_opportunity.browse(cr, uid, ids)[0]
diff --git a/addons/crm/test/test_crm_phonecall.yml b/addons/crm/test/test_crm_phonecall.yml
index feb87e0a879..04cb9ed1670 100644
--- a/addons/crm/test/test_crm_phonecall.yml
+++ b/addons/crm/test/test_crm_phonecall.yml
@@ -4,44 +4,56 @@
!record {model: crm.phonecall, id: crm_phonecall_interviewcall0}:
date: '2010-04-21 18:59:00'
name: Interview call
- partner_address_id: base.res_partner_address_1
- partner_id: base.res_partner_9
- partner_mobile: (+32)2 211 34 83
section_id: crm.section_sales_department
+- |
+ Now , I select partner by click on "Create a Partner" button.
+
+-
+ !record {model: crm.phonecall2partner, id: crm_phonecall2partner_1}:
+ action: exist
+ partner_id: base.res_partner_9
+
+-
+ Now, click on "Continue" button of this wizard.
+-
+ !python {model: crm.phonecall2partner}: |
+ self.make_partner(cr, uid, [ref("crm_phonecall2partner_1")], {"active_ids": [ref("crm_phonecall_interviewcall0")]})
- |
As the success of phonecall seems to be a real business opportunity, I will convert
it to opportunity by clicking on the "Convert to Opportunity" button.
+-
+ !record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_interviewcall0}:
+ name: Interview call
+ partner_id: base.res_partner_9
+ planned_revenue: 0.0
+ probability: 0.0
+-
+ Now, I click on "Convert" button of this wizard.
-
-# !python {model: crm.phonecall2opportunity}: |
-# self.action_apply(cr, uid, [1], {'active_id': ref('crm_phonecall_interviewcall0')})
-
+ !python {model: crm.phonecall2opportunity}: |
+ self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_interviewcall0")], {"active_id": ref("crm_phonecall_interviewcall0")})
-
# This is not working, find a way to do that in YAML
-
+
- |
I can see that a business opportunity is now assigned to this phonecall
-- |
- I check that the partner associated to this as the same country, phone number
- and name than the phonecall.
-- |
- In order to avoid the duplication of similar partner, OpenERP should be able to
- detect if the partner exists or if it should be created from the phonecall during the
- conversion.
-- |
- In order to test this, I log as the user "user_crm2"
-- |
- Then, I create the same phonecall than the preceeding one but I change the name
- of the phonecall. But this customer keeps the same email.
-- |
- This time OpenERP should detect that this customer already exists in the
- partner base and I check that in the wizard, proposes me to link to this existing
- partner instead of creating another one.
-- |
- I confirm the conversion wizard.
+-
+ !assert {model: crm.phonecall, id: crm_phonecall_interviewcall0}:
+ - opportunity_id == True
+
- |
And I check that the phonecall and the newly created business opportunity is linked
- to the partner
+ to same partner
+-
+ !python {model: crm.phonecall}: |
+ xid= ref('crm_phonecall_interviewcall0')
+ obj_phonecall = self.browse(cr, uid, xid)
+ ids = self.pool.get('crm.opportunity').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
+ obj_opp = self.pool.get('crm.opportunity').browse(cr, uid, ids)[0]
+ print "obj_opp", obj_opp, obj_phonecall
+ assert obj_phonecall.partner_id == obj_opp.partner_id
+
- |
I schedule Meeting on this current phonecall by clicking on "schedule
Meeting"
diff --git a/addons/crm/wizard/crm_phonecall_to_opportunity.py b/addons/crm/wizard/crm_phonecall_to_opportunity.py
index 5d44ad4b2bf..e7b2da05b26 100644
--- a/addons/crm/wizard/crm_phonecall_to_opportunity.py
+++ b/addons/crm/wizard/crm_phonecall_to_opportunity.py
@@ -69,7 +69,9 @@ Call Could not convert into Opportunity"))
@return : Dictionary value for created Opportunity form
"""
+
record_id = context and context.get('active_id', False) or False
+ print "ids", ids
if record_id:
opp_obj = self.pool.get('crm.opportunity')
phonecall_obj = self.pool.get('crm.phonecall')
@@ -83,7 +85,6 @@ Call Could not convert into Opportunity"))
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
-
for this in self.browse(cr, uid, ids, context=context):
new_opportunity_id = opp_obj.create(cr, uid, {
'name': this.name,
@@ -105,18 +106,18 @@ Call Could not convert into Opportunity"))
phonecall_obj.case_close(cr, uid, [case.id])
opp_obj.case_open(cr, uid, [new_opportunity_id])
- value = {
- 'name': _('Opportunity'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.opportunity',
- 'res_id': int(new_opportunity_id),
- 'view_id': False,
- 'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id']
- }
- return value
+ value = {
+ 'name': _('Opportunity'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'crm.opportunity',
+ 'res_id': int(new_opportunity_id),
+ 'view_id': False,
+ 'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
+ 'type': 'ir.actions.act_window',
+ 'search_view_id': res['res_id']
+ }
+ return value
_columns = {
'name' : fields.char('Opportunity Summary', size=64, required=True, select=1),
From ac3736381ced8e350c2aafcd426eec2ff1f16eb8 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Mon, 10 May 2010 14:07:16 +0530
Subject: [PATCH 094/148] [FIX]: idea: solve problem reference error for idea
vote wizard.
bzr revid: atp@tinyerp.co.in-20100510083716-xcx6tk5dgkc2u9zq
---
addons/idea/wizard/idea_post_vote_view.xml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/addons/idea/wizard/idea_post_vote_view.xml b/addons/idea/wizard/idea_post_vote_view.xml
index d197497afce..9c6323e5afd 100644
--- a/addons/idea/wizard/idea_post_vote_view.xml
+++ b/addons/idea/wizard/idea_post_vote_view.xml
@@ -22,7 +22,18 @@
+
+
+
+ Vote
+ idea.post.vote
+ form
+ tree,form
+
+ new
+
+
Date: Tue, 11 May 2010 12:41:08 +0530
Subject: [PATCH 095/148] [IMP]: idea: Add comment field in idea vote wizard.
bzr revid: atp@tinyerp.co.in-20100511071108-se2p5zejek3gq2sn
---
addons/idea/wizard/idea_post_vote.py | 26 ++++++++++++----------
addons/idea/wizard/idea_post_vote_view.xml | 2 ++
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/addons/idea/wizard/idea_post_vote.py b/addons/idea/wizard/idea_post_vote.py
index 1da9a92e35a..dac60ddf18b 100644
--- a/addons/idea/wizard/idea_post_vote.py
+++ b/addons/idea/wizard/idea_post_vote.py
@@ -35,7 +35,7 @@ class idea_post_vote(osv.osv_memory):
('50', 'Normal'),
('75', 'Good'),
('100', 'Very Good') ], 'Post Vote', required=True),
-# 'content': fields.text('Comment'),
+ 'content': fields.text('Comment'),
}
def view_init(self, cr, uid, fields, context=None):
@@ -48,8 +48,16 @@ class idea_post_vote(osv.osv_memory):
@param context: A standard dictionary for contextual values
"""
idea_obj = self.pool.get('idea.idea')
-
+
for idea in idea_obj.browse(cr, uid, context.get('active_ids', [])):
+
+ cr.execute('select count(id) from idea_vote where user_id=%s\
+ and idea_id=%s' % (uid, context.get('active_id')))
+ res = cr.fetchone()[0]
+ user_limit = idea.vote_user
+ if res >= user_limit:
+ raise osv.except_osv(_('Warning !'),_("You can not give Vote for this idea more than %s times") % (user_limit))
+
if idea.state in ['draft', 'close', 'cancel']:
raise osv.except_osv(_("Warning !"), _("Draft/Accepted/Cancelled \
ideas Could not be voted"))
@@ -71,19 +79,13 @@ ideas Could not be voted"))
data = context and context.get('active_id', False) or False
vote_obj = self.pool.get('idea.vote')
comment_obj = self.pool.get('idea.comment')
- idea_obj = self.pool.get('idea.idea')
+
for do_vote_obj in self.read(cr, uid, ids):
score = str(do_vote_obj['vote'])
-# comment = do_vote_obj['content']
- idea = idea_obj.browse(cr, uid, data)
- user_limit = idea.vote_user
+ comment = do_vote_obj['content']
dic = {'idea_id': data, 'user_id': uid, 'score': score}
-# dic = {'idea_id': data, 'user_id': uid, 'score': score, 'content': comment}
- cr.execute('select count(id) from idea_vote where user_id=%s\
- and idea_id=%s' % (uid, context.get('active_id')))
- res = cr.fetchone()[0]
- if res >= user_limit:
- raise osv.except_osv(_('Warning !'),_("You can not give Vote for this idea more than %s times") % (user_limit))
+ if comment:
+ comment_id = comment_obj.create(cr, uid, {'idea_id': data, 'user_id': uid, 'content': comment})
vote = vote_obj.create(cr, uid, dic)
return {}
diff --git a/addons/idea/wizard/idea_post_vote_view.xml b/addons/idea/wizard/idea_post_vote_view.xml
index 9c6323e5afd..a3e7fa6a1b3 100644
--- a/addons/idea/wizard/idea_post_vote_view.xml
+++ b/addons/idea/wizard/idea_post_vote_view.xml
@@ -12,6 +12,8 @@
+
+
From c02fc5ee473f76e068ef82f8b04d73c177281082 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Tue, 11 May 2010 16:27:01 +0530
Subject: [PATCH 096/148] [IMP]: idea: Minor Improvement add groups in close
and cancel button
bzr revid: atp@tinyerp.co.in-20100511105701-gwxp1612d5nucjy4
---
addons/idea/idea_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml
index c1c94ec4bcf..d89296d317a 100644
--- a/addons/idea/idea_view.xml
+++ b/addons/idea/idea_view.xml
@@ -172,8 +172,8 @@
-
-
+
+
From 60242c6c01138114b941e25012ab42879abbb4aa Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Tue, 11 May 2010 18:03:37 +0530
Subject: [PATCH 097/148] [IMP]: board: usability improvement in board module.
bzr revid: atp@tinyerp.co.in-20100511123337-ksr71p01h2ahmigj
---
addons/board/board_view.xml | 13 +++++++------
addons/board/wizard/board_menu_create_view.xml | 1 +
addons/crm/crm_view.xml | 3 +--
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/addons/board/board_view.xml b/addons/board/board_view.xml
index ad397ac518e..18e87f12c50 100644
--- a/addons/board/board_view.xml
+++ b/addons/board/board_view.xml
@@ -25,11 +25,12 @@
form
-
-
-
-
-
+
+
+
+
+
+
@@ -70,7 +71,7 @@
name="%(action_board_menu_create)d"
string="Create Menu" type="action"
icon="gtk-justify-fill" />
-
+
diff --git a/addons/board/wizard/board_menu_create_view.xml b/addons/board/wizard/board_menu_create_view.xml
index a4398d1a07d..ce62be47617 100644
--- a/addons/board/wizard/board_menu_create_view.xml
+++ b/addons/board/wizard/board_menu_create_view.xml
@@ -17,6 +17,7 @@
+
-
-
+
From 7509ca21ef15ae6945f34401cf4e0dec1c6d229e Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Tue, 11 May 2010 19:12:39 +0530
Subject: [PATCH 098/148] [IMP]: product crm: Apply shortcut of product and
calendar for any user
bzr revid: ksa@tinyerp.co.in-20100511134239-oaxtlr8dvuy0juws
---
addons/crm/crm_meeting.py | 15 +++++++++++++++
addons/crm/crm_meeting_menu.xml | 20 ++++++++++++++------
addons/product/product.py | 13 +++++++++++++
addons/product/product_view.xml | 6 ++++++
4 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py
index 6979f3e5eee..225044cc57a 100644
--- a/addons/crm/crm_meeting.py
+++ b/addons/crm/crm_meeting.py
@@ -144,4 +144,19 @@ class calendar_attendee(osv.osv):
calendar_attendee()
+class res_users(osv.osv):
+ _name = 'res.users'
+ _inherit = 'res.users'
+
+ def create(self, cr, uid, data, context={}):
+ user_id = super(res_users, self).create(cr, uid, data, context)
+ data_obj = self.pool.get('ir.model.data')
+ data_id = data_obj._get_id(cr, uid, 'crm', 'ir_ui_view_sc_calendar0')
+ view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
+ copy_id = self.pool.get('ir.ui.view_sc').copy(cr, uid, view_id, default = {
+ 'user_id': user_id}, context=context)
+ return user_id
+
+res_users()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/crm_meeting_menu.xml b/addons/crm/crm_meeting_menu.xml
index 7dcb0ec3ec8..e1237e938d4 100644
--- a/addons/crm/crm_meeting_menu.xml
+++ b/addons/crm/crm_meeting_menu.xml
@@ -121,12 +121,6 @@
action="crm_case_categ_meet" parent="menu_meeting_sale"
sequence="1" />
-
- Calendar
- ir.ui.menu
-
-
-
Meeting Invitations
ir.actions.act_window
@@ -180,5 +174,19 @@
+
+
+ Calendar
+ ir.ui.menu
+
+
+
+
+
+ Calendar
+ ir.ui.menu
+
+
+
diff --git a/addons/product/product.py b/addons/product/product.py
index 4849bc7543e..585a22bbbe5 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -676,7 +676,20 @@ class pricelist_partnerinfo(osv.osv):
_order = 'min_quantity asc'
pricelist_partnerinfo()
+class res_users(osv.osv):
+ _name = 'res.users'
+ _inherit = 'res.users'
+ def create(self, cr, uid, data, context={}):
+ user_id = super(res_users, self).create(cr, uid, data, context)
+ data_obj = self.pool.get('ir.model.data')
+ data_id = data_obj._get_id(cr, uid, 'product', 'ir_ui_view_sc_product0')
+ view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
+ copy_id = self.pool.get('ir.ui.view_sc').copy(cr, uid, view_id, default = {
+ 'user_id': user_id}, context=context)
+ return user_id
+
+res_users()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 1b74c829b98..ecaf87a341a 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -612,6 +612,12 @@
ir.ui.menu
+
+
+ Products
+ ir.ui.menu
+
+
-
- New
-
-
-
-
- Assigned
-
-
-
-
- In Process
-
-
-
-
- Converted
-
-
-
-
- Recycled
-
-
-
-
- Dead
-
-
-
-
-
-
- Telesales
-
-
-
-
- Mail
-
-
-
-
- Email
-
-
-
-
- Print
-
-
-
-
- Web
-
-
-
-
- Radio
-
-
-
-
- Television
-
-
-
-
- Newsletter
-
-
-
-
-
-
diff --git a/addons/crm/crm_lead_demo.xml.moved b/addons/crm/crm_lead_demo.xml.moved
deleted file mode 100644
index bc6638601c2..00000000000
--- a/addons/crm/crm_lead_demo.xml.moved
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm/crm_lead_menu.xml.moved b/addons/crm/crm_lead_menu.xml.moved
deleted file mode 100644
index 4d752ca8a9b..00000000000
--- a/addons/crm/crm_lead_menu.xml.moved
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- Leads
- crm.lead
- tree,form
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm/crm_lead_view.xml.moved b/addons/crm/crm_lead_view.xml.moved
deleted file mode 100644
index 03318270e9b..00000000000
--- a/addons/crm/crm_lead_view.xml.moved
+++ /dev/null
@@ -1,331 +0,0 @@
-
-
-
-
-
-
-
- Lead Stages
- crm.case.stage
- form
-
- [('object_id.model', '=', 'crm.lead')]
- {'object_id':'crm.lead'}
-
-
-
-
-
-
- Lead Resource Type
- crm.case.resource.type
- form
-
- [('object_id.model', '=', 'crm.lead')]
- {'object_id':'crm.lead'}
-
-
-
-
-
-
- CRM - Leads Form
- crm.lead
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Leads Tree
- crm.lead
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Leads Calendar
- crm.lead
- calendar
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Leads Search
- crm.lead
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm/crm_opportunity.py.moved b/addons/crm/crm_opportunity.py.moved
deleted file mode 100644
index 204890e348c..00000000000
--- a/addons/crm/crm_opportunity.py.moved
+++ /dev/null
@@ -1,249 +0,0 @@
-#-*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from datetime import datetime
-from osv import fields,osv,orm
-from tools.translate import _
-import crm
-import time
-import mx.DateTime
-
-AVAILABLE_STATES = [
- ('draft','Draft'),
- ('open','Open'),
- ('cancel', 'Lost'),
- ('done', 'Converted'),
- ('pending','Pending')
-]
-
-class crm_opportunity(osv.osv):
- """ Opportunity Cases """
-
- _name = "crm.opportunity"
- _description = "Opportunity Cases"
- _order = "priority,date_action,id desc"
- _inherit = 'crm.case'
-
- def case_open(self, cr, uid, ids, *args):
- """
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of case's Ids
- @param *args: Give Tuple Value
- """
-
- res = super(crm_opportunity, self).case_open(cr, uid, ids, *args)
- self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
- return res
-
- def _compute_day(self, cr, uid, ids, fields, args, context={}):
- """
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Openday’s IDs
- @return: difference between current date and log date
- @param context: A standard dictionary for contextual values
- """
- cal_obj = self.pool.get('resource.calendar')
- res_obj = self.pool.get('resource.resource')
-
- res = {}
- for opportunity in self.browse(cr, uid, ids , context):
- for field in fields:
- res[opportunity.id] = {}
- duration = 0
- ans = False
- if field == 'day_open':
- if opportunity.date_open:
- date_create = datetime.strptime(opportunity.create_date, "%Y-%m-%d %H:%M:%S")
- date_open = datetime.strptime(opportunity.date_open, "%Y-%m-%d %H:%M:%S")
- ans = date_open - date_create
- date_until = opportunity.date_open
- elif field == 'day_close':
- if opportunity.date_closed:
- date_create = datetime.strptime(opportunity.create_date, "%Y-%m-%d %H:%M:%S")
- date_close = datetime.strptime(opportunity.date_closed, "%Y-%m-%d %H:%M:%S")
- date_until = opportunity.date_closed
- ans = date_close - date_create
- if ans:
- resource_id = False
- if opportunity.user_id:
- resource_ids = res_obj.search(cr, uid, [('user_id','=',opportunity.user_id.id)])
- if resource_ids and len(resource_ids):
- resource_id = resource_ids[0]
-
- duration = float(ans.days)
- if opportunity.section_id.resource_calendar_id:
- duration = float(ans.days) * 24
- new_dates = cal_obj.interval_get(cr,
- uid,
- opportunity.section_id.resource_calendar_id and opportunity.section_id.resource_calendar_id.id or False,
- mx.DateTime.strptime(opportunity.create_date, '%Y-%m-%d %H:%M:%S'),
- duration,
- resource=resource_id
- )
- no_days = []
- date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
- for in_time, out_time in new_dates:
- if in_time.date not in no_days:
- no_days.append(in_time.date)
- if out_time > date_until:
- break
- duration = len(no_days)
- res[opportunity.id][field] = abs(int(duration))
- return res
-
- _columns = {
- 'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.opportunity')]"),
- 'categ_id': fields.many2one('crm.case.categ', 'Category', \
- domain="[('section_id','=',section_id), \
- ('object_id.model', '=', 'crm.opportunity')]"),
- 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
- 'referred': fields.char('Referred By', size=64),
- 'probability': fields.float('Probability (%)'),
- 'planned_revenue': fields.float('Expected Revenue'),
- 'ref': fields.reference('Reference', selection=crm._links_get, size=128),
- 'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
- 'date_closed': fields.datetime('Closed', readonly=True),
- 'user_id': fields.many2one('res.users', 'Salesman'),
- 'phone': fields.char("Phone", size=64),
- 'date_deadline': fields.date('Expected Closing'),
- 'date_action': fields.date('Next Action'),
- 'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True,
- help='The state is set to \'Draft\', when a case is created.\
- \nIf the case is in progress the state is set to \'Open\'.\
- \nWhen the case is over, the state is set to \'Done\'.\
- \nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
-
- 'date_open': fields.datetime('Opened', readonly=True),
- 'day_open': fields.function(_compute_day, string='Days to Open', \
- method=True, multi='day_open', type="float", store=True),
- 'day_close': fields.function(_compute_day, string='Days to Close', \
- method=True, multi='day_close', type="float", store=True),
- }
-
- def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
-
- """ @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of stage’s IDs
- @stage_id: change state id on run time """
-
- if not stage_id:
- return {'value':{}}
-
- stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
- if not stage.on_change:
- return {'value':{}}
- return {'value':{'probability':stage.probability}}
-
- def stage_next(self, cr, uid, ids, context={}):
-
- """ @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of stage next’s IDs
- @param context: A standard dictionary for contextual values """
-
- res = super(crm_opportunity, self).stage_next(cr, uid, ids, context=context)
- for case in self.browse(cr, uid, ids, context):
- if case.stage_id and case.stage_id.on_change:
- self.write(cr, uid, [case.id], {'probability': case.stage_id.probability})
- return res
-
- def stage_previous(self, cr, uid, ids, context={}):
-
- """ @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of stage previous’s IDs
- @param context: A standard dictionary for contextual values """
-
- res = super(crm_opportunity, self).stage_previous(cr, uid, ids, context=context)
- for case in self.browse(cr, uid, ids, context):
- if case.stage_id and case.stage_id.on_change:
- self.write(cr, uid, [case.id], {'probability': case.stage_id.probability})
- return res
-
- _defaults = {
- 'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.opportunity', context=c),
- 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
- 'state' : 'draft',
- }
-
- def action_makeMeeting(self, cr, uid, ids, context=None):
- """
- This opens Meeting's calendar view to schedule meeting on current Opportunity
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Opportunity to Meeting IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Meeting view
- """
- value = {}
- for opp in self.browse(cr, uid, ids):
- data_obj = self.pool.get('ir.model.data')
-
- # Get meeting views
- result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_meetings_filter')
- res = data_obj.read(cr, uid, result, ['res_id'])
- id1 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
- id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
- id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
- if id1:
- id1 = data_obj.browse(cr, uid, id1, context=context).res_id
- if id2:
- id2 = data_obj.browse(cr, uid, id2, context=context).res_id
- if id3:
- id3 = data_obj.browse(cr, uid, id3, context=context).res_id
-
- context = {
- 'default_opportunity_id': opp.id,
- 'default_partner_id': opp.partner_id and opp.partner_id.id or False,
- 'default_section_id': opp.section_id and opp.section_id.id or False,
- 'default_email_from': opp.email_from,
- 'default_state': 'open',
- 'default_name': opp.name
- }
- value = {
- 'name': _('Meetings'),
- 'domain': "[('user_id','=',%s)]" % (uid),
- 'context': context,
- 'view_type': 'form',
- 'view_mode': 'calendar,form,tree',
- 'res_model': 'crm.meeting',
- 'view_id': False,
- 'views': [(id1, 'calendar'), (id2, 'form'), (id3, 'tree')],
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id'],
- 'nodestroy': True
- }
-
- return value
-
-crm_opportunity()
-
diff --git a/addons/crm/crm_opportunity_data.xml.moved b/addons/crm/crm_opportunity_data.xml.moved
deleted file mode 100644
index b3780990a13..00000000000
--- a/addons/crm/crm_opportunity_data.xml.moved
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
- Existing Customer
-
-
-
-
- Self Generated
-
-
-
-
- Employee
-
-
-
-
- Partner
-
-
-
-
- Campaign
-
-
-
-
- Website
-
-
-
-
- Word of mouth
-
-
-
-
- Other
-
-
-
-
-
-
- Prospecting
-
-
-
-
- Needs Analysis
-
-
-
-
- Value Proposition
-
-
-
-
- Proposal/Price Quote
-
-
-
-
- Negotiation/Review
-
-
-
-
- Closed Won
-
-
-
-
- Closed Lost
-
-
-
-
-
-
- Existing Business
-
-
-
-
- New Business
-
-
-
-
-
-
diff --git a/addons/crm/crm_opportunity_demo.xml.moved b/addons/crm/crm_opportunity_demo.xml.moved
deleted file mode 100644
index b893d536e44..00000000000
--- a/addons/crm/crm_opportunity_demo.xml.moved
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm/crm_opportunity_menu.xml.moved b/addons/crm/crm_opportunity_menu.xml.moved
deleted file mode 100644
index 3bcdbc7bb9f..00000000000
--- a/addons/crm/crm_opportunity_menu.xml.moved
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
- Opportunities
- crm.opportunity
- tree,form,graph
-
-
-
-
-
- tree
-
-
-
-
-
- form
-
-
-
-
-
- graph
-
-
-
-
-
-
-
-
diff --git a/addons/crm/crm_opportunity_view.xml.moved b/addons/crm/crm_opportunity_view.xml.moved
deleted file mode 100644
index 4bdc0d90158..00000000000
--- a/addons/crm/crm_opportunity_view.xml.moved
+++ /dev/null
@@ -1,329 +0,0 @@
-
-
-
-
-
-
-
- Opportunity Categories
- crm.case.categ
- form
-
- [('object_id.model', '=', 'crm.opportunity')]
- {'object_id':'crm.opportunity'}
-
-
-
-
-
-
-
- Opportunity Stages
- crm.case.stage
- form
-
- [('object_id.model', '=', 'crm.opportunity')]
- {'object_id':'crm.opportunity'}
-
-
-
-
-
-
-
- Opportunity Resource Type
- crm.case.resource.type
- form
-
- [('object_id.model', '=', 'crm.opportunity')]
- {'object_id':'crm.opportunity'}
-
-
-
-
-
-
-
- Opportunities
- crm.opportunity
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Opportunities Tree
- crm.opportunity
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Opportunity Graph
- crm.opportunity
- graph
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Opportunities Search
- crm.opportunity
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm/report/crm_lead_report.py.moved b/addons/crm/report/crm_lead_report.py.moved
deleted file mode 100644
index d400700c0b5..00000000000
--- a/addons/crm/report/crm_lead_report.py.moved
+++ /dev/null
@@ -1,88 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import fields,osv
-import tools
-
-AVAILABLE_STATES = [
- ('draft','Draft'),
- ('open','Open'),
- ('cancel', 'Cancelled'),
- ('done', 'Closed'),
- ('pending','Pending')
-]
-
-class crm_lead_report(osv.osv):
- """ CRM Lead Report """
- _name = "crm.lead.report"
- _auto = False
- _inherit = "crm.case.report"
- _description = "CRM Lead Report"
-
- _columns = {
- 'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
- 'categ_id': fields.many2one('crm.case.categ', 'Category',\
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.lead')]" , readonly=True),
- 'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.lead')]", readonly=True),
- 'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
- 'company_id': fields.many2one('res.company', 'Company', readonly=True),
- }
- def init(self, cr):
-
- """
- CRM Lead Report
- @param cr: the current row, from the database cursor
- """
-
- tools.drop_view_if_exists(cr, 'crm_lead_report')
- cr.execute("""
- create or replace view crm_lead_report as (
- select
- min(c.id) as id,
- to_char(c.create_date, 'YYYY') as name,
- to_char(c.create_date, 'MM') as month,
- to_char(c.create_date, 'YYYY-MM-DD') as day,
- c.state as state,
- c.user_id,
- c.stage_id,
- c.company_id,
- c.section_id,
- c.categ_id,
- c.partner_id,
- count(*) as nbr,
- 0 as avg_answers,
- 0.0 as perc_done,
- 0.0 as perc_cancel,
- date_trunc('day',c.create_date) as create_date,
- avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
- from
- crm_lead c
- group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
- c.state, c.user_id,c.section_id,c.stage_id,categ_id,c.partner_id,c.company_id
- ,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
- )""")
-
-crm_lead_report()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/report/crm_lead_report_view.xml.moved b/addons/crm/report/crm_lead_report_view.xml.moved
deleted file mode 100644
index d6502c190d9..00000000000
--- a/addons/crm/report/crm_lead_report_view.xml.moved
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
- crm.lead.report.tree
- crm.lead.report
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.lead.report.form
- crm.lead.report
-
- form
-
-
-
-
-
-
-
-
-
-
-
- crm.lead.report.graph
- crm.lead.report
- graph
-
-
-
-
-
-
-
-
-
-
-
-
- crm.lead.report.select
- crm.lead.report
-
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Leads
- crm.lead.report
- form
- {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}
- tree,graph
-
-
-
-
-
-
- tree
-
-
-
-
-
-
- graph
-
-
-
-
-
-
-
-
diff --git a/addons/crm/report/crm_opportunity_report.py.moved b/addons/crm/report/crm_opportunity_report.py.moved
deleted file mode 100644
index a3af4be8b7c..00000000000
--- a/addons/crm/report/crm_opportunity_report.py.moved
+++ /dev/null
@@ -1,100 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import fields,osv
-import tools
-
-AVAILABLE_STATES = [
- ('draft','Draft'),
- ('open','Open'),
- ('cancel', 'Cancelled'),
- ('done', 'Closed'),
- ('pending','Pending')
-]
-
-class crm_opportunity_report(osv.osv):
- """ CRM Opportunity Report """
- _name = "crm.opportunity.report"
- _auto = False
- _inherit = "crm.case.report"
- _description = "CRM Opportunity Report"
- _columns = {
- 'probability': fields.float('Avg. Probability', readonly=True,group_operator='avg'),
- 'amount_revenue': fields.float('Est.Revenue', readonly=True),
- 'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
- 'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
- 'categ_id': fields.many2one('crm.case.categ', 'Category',\
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.opportunity')]", readonly=True),
- 'stage_id':fields.many2one('crm.case.stage', 'Stage',\
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.opportunity')]", readonly=True),
- 'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
- 'company_id': fields.many2one('res.company', 'Company', readonly=True),
- 'user_id':fields.many2one('res.users', 'User', readonly=True),
- }
-
- def init(self, cr):
- """ Display Est.Revenue , Average Probability ,Est.Revenue Probability
- @param cr: the current row, from the database cursor
- """
-
- tools.drop_view_if_exists(cr, 'crm_opportunity_report')
- cr.execute("""
- create or replace view crm_opportunity_report as (
- select
- min(c.id) as id,
- to_char(c.create_date, 'YYYY') as name,
- to_char(c.create_date, 'MM') as month,
- to_char(c.create_date, 'YYYY-MM-DD') as day,
- c.state as state,
- c.user_id,
- c.section_id,
- c.categ_id,
- c.stage_id,
- c.partner_id,
- c.company_id,
- count(*) as nbr,
- 0 as avg_answers,
- 0.0 as perc_done,
- 0.0 as perc_cancel,
- date_trunc('day',c.create_date) as create_date,
- sum(planned_revenue) as amount_revenue,
- sum((planned_revenue*probability)/100.0)::decimal(16,2) as amount_revenue_prob,
- avg(probability)::decimal(16,2) as probability,
- avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
- from
- crm_opportunity c
- group by
- to_char(c.create_date, 'YYYY'),
- to_char(c.create_date, 'MM'),
- to_char(c.create_date, 'YYYY-MM-DD'),
- c.state,
- c.user_id,
- c.section_id,
- c.stage_id,
- c.categ_id,
- c.partner_id,
- company_id,
- create_date
- )""")
-
-crm_opportunity_report()
diff --git a/addons/crm/report/crm_opportunity_report_view.xml.moved b/addons/crm/report/crm_opportunity_report_view.xml.moved
deleted file mode 100644
index 29a66b838f0..00000000000
--- a/addons/crm/report/crm_opportunity_report_view.xml.moved
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
-
-
-
- crm.opportunity.report.tree
- crm.opportunity.report
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.opportunity.report.form
- crm.opportunity.report
-
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.opportunity.report.graph
- crm.opportunity.report
- graph
-
-
-
-
-
-
-
-
-
-
-
-
- crm.opportunity.report.select
- crm.opportunity.report
-
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Opportunities
- crm.opportunity.report
- form
- tree,graph
- {"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}
-
-
-
-
- tree
-
-
-
-
-
- graph
-
-
-
-
-
-
-
-
diff --git a/addons/crm/test/test_crm_lead.yml.moved b/addons/crm/test/test_crm_lead.yml.moved
deleted file mode 100644
index 22fdfffca1b..00000000000
--- a/addons/crm/test/test_crm_lead.yml.moved
+++ /dev/null
@@ -1,113 +0,0 @@
-- |
- In order to test the CRM in OpenERP,
- I will do a customer qualification process that
- starts with a fist contact with a customer (a lead), which will be converted to a
- business opportunity and a partner.
-- |
- In order to test the flow, I create a two new users "user_crm" and
- I assign the group "salesman".
--
- !record {model: res.users, id: res_users_usercrm0}:
- company_id: base.main_company
- context_lang: en_US
- context_section_id: crm.section_sales_department
- groups_id:
- - crm.group_crm_user
- login: user_crm
- name: user_crm
- password: user_crm
-
-
-- |
- I start by creating a new lead "New Customer" and I provide an address to this
- new customer, as well as an email "info@mycustomer.com".
--
- !record {model: crm.lead, id: crm_lead_newcustomer0}:
- email_from: info@mycustomer.com
- name: New Customer
- partner_name: Sandip zala
- phone: (855) 924-4364
- mobile: (333) 715-1450
- section_id: crm.section_sales_department
- referred: False
- title: M.
-- |
- I check that the lead is in 'draft' state,
--
- !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in Draft}:
- - state == "draft"
--
- I open lead by click on "Open" button,
--
- !python {model: crm.lead}: |
- self.case_open(cr, uid, [ref("crm_lead_newcustomer0")])
-
-- |
- As the lead seems to be a real business opportunity, I will convert it to a
- partner
- and a business opportunity by clicking on the "Convert" button.
--
- !python {model: crm.lead}: |
- lead = self.browse(cr, uid, ref('crm_lead_newcustomer0'))
- if not lead.partner_id:
- self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
--
- |
- Now, select "create a new partner" option in this wizard.
--
- !record {model: crm.lead2opportunity.partner, id: crm_lead2opportunity_partner_create_0}:
- action: 'create'
--
- I click on "Continue" button of this wizard.
--
- !python {model: crm.lead2opportunity.partner}: |
- self.make_partner(cr, uid, [ref("crm_lead2opportunity_partner_create_0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
--
- Now, I give value to this wizard field.
--
- !record {model: crm.lead2opportunity, id: crm_lead2opportunity_stonage_0}:
- name: Sandip zala
- planned_revenue: 0.00
- probability: 0.00
--
- Then, Click on "Create Opportunity" button of this wizard.
--
- !python {model: crm.lead2opportunity}: |
- self.action_apply(cr, uid, [ref('crm_lead2opportunity_stonage_0')], {'active_id': ref('crm_lead_newcustomer0')})
-
-- |
- I can check that a lead and a business opportunity is now assigned to this
- lead.
--
- # !python {model: crm.lead, id: crm_lead_newcustomer0}:
- # - opportunity_id.id != False
-
-- |
- I check that the partner associated to this lead as the same country, phone number
- and name than the opportunity.
--
- !python {model: crm.lead}: |
- lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
- print "lead", lead.partner_name
- obj_opportunity = self.pool.get('crm.opportunity')
- ids = obj_opportunity.search(cr, uid, [('name', '=', lead.partner_name)])
- opportunity = obj_opportunity.browse(cr, uid, ids)[0]
- assert lead.partner_name == opportunity.partner_id.name
- assert lead.phone == opportunity.phone
--
- |
- # yaml is also not working smpt server and send new email.
-
-- |
- I configure with smtp server.
-- |
- And I communicate with lead through send New mail to Lead using it email address from user which are loged.
-- |
- I check that communication history generated when send email to lead.
-- |
- Then, I add a cc which receive copy of future communication between partner and users by mail.
-
-- |
- I Reply to last Email to lead with some document attached.and check that communication history generated or not.
-
-
\ No newline at end of file
diff --git a/addons/crm/test/test_crm_opportunity.yml.moved b/addons/crm/test/test_crm_opportunity.yml.moved
deleted file mode 100644
index d7118dd0c90..00000000000
--- a/addons/crm/test/test_crm_opportunity.yml.moved
+++ /dev/null
@@ -1,81 +0,0 @@
-- |
- I start by creating a new Opportunity. And I select partner for opportunity.
- I can see that after selecting partner his contact and email is automatically filled.
--
- !record {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
- email_from: info@balmerinc.be
- name: 'ABC FUEL CO 829264 - 10002 units '
- partner_address_id: base.res_partner_address_1
- partner_id: base.res_partner_9
- probability: 1.0
- stage_id: crm.stage_oppor1
- categ_id: crm.categ_oppor2
- section_id: crm.section_sales_department
-
-- |
- I check that the opportunity is in 'New' state.
--
- !assert {model: crm.opportunity, id: crm_opportunity_abcfuelcounits0}:
- - state == "draft"
-- |
- I open opportunity by click on "Open" button,
--
- !python {model: crm.opportunity}: |
- self.case_open(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
-
-- |
- I schedule Meeting on this current opportunity by clicking on "schedule
- Meeting".
--
- !python {model: crm.opportunity}: |
- self.action_makeMeeting(cr, uid, [ref("crm_opportunity_abcfuelcounits0")])
-
-- |
- I can see that Meeting's calendar view is shown.
- then I click on the date on which I want schedule meeting.
- I fill proper data for that meeting and save it
--
- !record {model: crm.meeting, id: crm_meeting_abcfuelcounits0}:
- alarm_id: base_calendar.alarm3
- date: '2010-04-16 00:00:00'
- date_deadline: '2010-04-16 08:00:00'
- duration: 8.0
- email_from: info@balmerinc.be
- name: 'ABC FUEL CO 829264 - 10002 units '
- opportunity_id: 'crm_opportunity_abcfuelcounits0'
- partner_address_id: base.res_partner_address_1
- partner_id: base.res_partner_9
- rrule_type: weekly
- section_id: crm.section_sales_department
- state: open
-- |
- In order to schedule a phonecall to the partner
- I click on "schedule call" button and select planned date for the call.
--
- !record {model: crm.opportunity2phonecall, id: crm_opportunity2phonecall_abcfuelcounits0}:
- date: '2010-04-17 11:15:00'
- name: 'ABC FUEL CO 829264 - 10002 units '
- section_id: crm.section_sales_department
- user_id: base.user_demo
-- |
- schedule phonecall by apply (action_apply)function of opportunity2phoncall wizard
--
- !python {model: crm.opportunity2phonecall}: |
- self.action_apply(cr, uid, [ref('crm_opportunity2phonecall_abcfuelcounits0')], {'active_ids': [ref("crm_opportunity_abcfuelcounits0")]})
-- |
- I check that phonecall record is created for that opportunity.
--
- !python {model: crm.phonecall}: |
- ids = self.search(cr, uid, [('name', '=', 'ABC FUEL CO 829264 - 10002 units')])
- assert len(ids)
-- |
- I can see phonecall record after click on "Schedule call" wizard.
--
- !record {model: crm.phonecall, id: crm_phonecall_abcfuelcounits0}:
- date: '2010-04-17 11:15:00'
- duration: 3.0
- name: 'ABC FUEL CO 829264 - 10002 units'
- partner_address_id: base.res_partner_address_1
- partner_id: base.res_partner_9
- section_id: crm.section_sales_department
-
\ No newline at end of file
diff --git a/addons/crm/test/test_crm_phonecall.yml b/addons/crm/test/test_crm_phonecall.yml
index 04cb9ed1670..47021843348 100644
--- a/addons/crm/test/test_crm_phonecall.yml
+++ b/addons/crm/test/test_crm_phonecall.yml
@@ -51,7 +51,6 @@
obj_phonecall = self.browse(cr, uid, xid)
ids = self.pool.get('crm.opportunity').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
obj_opp = self.pool.get('crm.opportunity').browse(cr, uid, ids)[0]
- print "obj_opp", obj_opp, obj_phonecall
assert obj_phonecall.partner_id == obj_opp.partner_id
- |
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py.moved b/addons/crm/wizard/crm_lead_to_opportunity.py.moved
deleted file mode 100644
index c8cce059f09..00000000000
--- a/addons/crm/wizard/crm_lead_to_opportunity.py.moved
+++ /dev/null
@@ -1,327 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from mx.DateTime import now
-from osv import osv, fields
-from tools.translate import _
-
-
-class crm_lead2opportunity(osv.osv_memory):
- _name = 'crm.lead2opportunity'
- _description = 'Lead To Opportunity'
-
- def action_cancel(self, cr, uid, ids, context=None):
- """
- Closes Lead To Opportunity form
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- """
- return {'type': 'ir.actions.act_window_close'}
-
- def action_apply(self, cr, uid, ids, context=None):
- """
- This converts lead to opportunity and opens Opportunity view
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Opportunity IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Opportunity form
- """
- record_id = context and context.get('active_id', False) or False
- if not record_id:
- return {}
-
- lead_obj = self.pool.get('crm.lead')
- opp_obj = self. pool.get('crm.opportunity')
- data_obj = self.pool.get('ir.model.data')
- history_obj = self.pool.get('crm.case.history')
- model_obj = self.pool.get('ir.model')
-
- # Get Opportunity views
- result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_opportunities_filter')
- res = data_obj.read(cr, uid, result, ['res_id'])
- id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_oppor')
- id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_oppor')
- if id2:
- id2 = data_obj.browse(cr, uid, id2, context=context).res_id
- if id3:
- id3 = data_obj.browse(cr, uid, id3, context=context).res_id
-
- lead = lead_obj.browse(cr, uid, record_id, context=context)
- model_ids = model_obj.search(cr, uid, [('model', '=', 'crm.opportunity')])
-
-
- for this in self.browse(cr, uid, ids, context=context):
- new_opportunity_id = opp_obj.create(cr, uid, {
- 'name': this.name,
- 'referred': lead.referred,
- 'planned_revenue': this.planned_revenue,
- 'probability': this.probability,
- 'partner_id': lead.partner_id and lead.partner_id.id or False,
- 'section_id': lead.section_id and lead.section_id.id or False,
- 'description': lead.description or False,
- 'date_deadline': lead.date_deadline or False,
- 'partner_address_id': lead.partner_address_id and lead.partner_address_id.id or False ,
- 'priority': lead.priority,
- 'phone': lead.phone,
- 'email_from': lead.email_from
- })
- new_opportunity = opp_obj.browse(cr, uid, new_opportunity_id)
- vals = {
- 'partner_id': this.partner_id and this.partner_id.id or False,
- }
- if not lead.opportunity_id:
- vals.update({'opportunity_id' : new_opportunity.id})
-
- model_opportunity_id = self.pool.get('ir.model').search(cr, uid, [('model', '=', 'crm.opportunity')], context=context)[0]
-
- for model in ('crm.case.log', 'crm.case.history'):
- log_proxy = self.pool.get(model)
- log_ids = log_proxy.search(cr, uid, [('model_id.model', '=', 'crm.lead'),('res_id', '=', lead.id)], context=context)
- for log_id in log_ids:
- log_proxy.copy(cr, uid, log_id, {'model_id':model_opportunity_id}, context=context)
-
- lead_obj.write(cr, uid, [lead.id], vals)
- lead_obj.case_close(cr, uid, [lead.id])
-
- # Copy lead history to opportunity
- for his_id in lead.history_line:
- history_ids = history_obj.copy(cr, uid, his_id.id, \
- {'model_id': model_ids[0], \
- 'res_id': new_opportunity_id})
-
- #opp_obj.case_open(cr, uid, [new_opportunity_id])
-
- value = {
- 'name': _('Opportunity'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.opportunity',
- 'res_id': int(new_opportunity_id),
- 'view_id': False,
- 'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id']
- }
- return value
-
- _columns = {
- 'name' : fields.char('Opportunity Summary', size=64, required=True, select=1),
- 'probability': fields.float('Success Probability'),
- 'planned_revenue': fields.float('Expected Revenue'),
- 'partner_id': fields.many2one('res.partner', 'Partner'),
- }
-
- def view_init(self, cr, uid, fields, context=None):
- """
- This function checks for precondition before wizard executes
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- """
- lead_obj = self.pool.get('crm.lead')
-
- for lead in lead_obj.browse(cr, uid, context.get('active_ids', [])):
- if lead.state in ['done', 'cancel']:
- raise osv.except_osv(_("Warning !"), _("Closed/Cancelled \
-Leads Could not convert into Opportunity"))
- if lead.state != 'open':
- raise osv.except_osv(_('Warning !'), _('Lead should be in \
-\'Open\' state before converting to Opportunity.'))
- return False
-
- def default_get(self, cr, uid, fields, context=None):
- """
- This function gets default values
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- @return : default values of fields.
- """
- lead_obj = self.pool.get('crm.lead')
- rec_ids = context and context.get('active_ids', [])
- partner_id = context.get('partner_id', False)
- data = context and context.get('active_ids', []) or []
- res = super(crm_lead2opportunity, self).default_get(cr, uid, fields, context=context)
- for lead in lead_obj.browse(cr, uid, data, context=context):
- if 'name' in fields:
- res.update({'name': lead.partner_name})
- if 'partner_id' in fields:
- res.update({'partner_id': partner_id and partner_id[0] or False})
- return res
-
-crm_lead2opportunity()
-
-
-class crm_lead2opportunity_partner(osv.osv_memory):
- _name = 'crm.lead2opportunity.partner'
- _description = 'Lead To Opportunity Partner'
- _inherit = 'crm.lead2partner'
-
- _columns = {
- 'partner_id': fields.many2one('res.partner', 'Partner'),
- 'action': fields.selection([('exist', 'Link to an existing partner'), ('create', 'Create a new partner')], 'Action'),
- }
-
- def default_get(self, cr, uid, fields, context=None):
- """
- This function gets default values
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- @return : default values of fields.
- """
- lead_obj = self.pool.get('crm.lead')
- partner_obj = self.pool.get('res.partner')
- contact_obj = self.pool.get('res.partner.address')
- rec_ids = context and context.get('active_ids', [])
- partner_id = False
-
- data = context and context.get('active_ids', []) or []
- res = super(crm_lead2opportunity_partner, self).default_get(cr, uid, fields, context=context)
-
- for lead in lead_obj.browse(cr, uid, data, context=context):
- partner_ids = partner_obj.search(cr, uid, [('name', '=', lead.partner_name or lead.name)])
- if not partner_ids and lead.email_from:
- address_ids = contact_obj.search(cr, uid, [('email', '=', lead.email_from)])
- if address_ids:
- addresses = contact_obj.browse(cr, uid, address_ids)
- partner_ids = addresses and [addresses[0].partner_id.id] or False
- partner_id = partner_ids and partner_ids[0] or False
-
- if 'partner_id' in fields:
- res.update({'partner_id': partner_id})
- if 'action' in fields:
- res.update({'action': partner_id and 'exist' or 'create'})
- return res
-
- def make_partner(self, cr, uid, ids, context=None):
- """
- This function Makes partner based on action.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Partner form.
- """
- if not context:
- context = {}
-
- partner_ids = self._create_partner(cr, uid, ids, context)
- mod_obj = self.pool.get('ir.model.data')
- result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
- res = mod_obj.read(cr, uid, result, ['res_id'])
- value = {}
- data_obj = self.pool.get('ir.model.data')
- data_id = data_obj._get_id(cr, uid, 'crm', 'view_crm_lead2opportunity_create')
- view_id = False
- if data_id:
- view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
-
- context.update({'partner_id': partner_ids})
- value = {
- 'name': _('Create Opportunity'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.lead2opportunity',
- 'view_id': False,
- 'context': context,
- 'views': [(view_id, 'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
- return value
-
- def action_skip(self, cr, uid, ids, context=None):
- """
- This skips partner creation
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Opportunity IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for Opportunity form
- """
- value = {}
- data_obj = self.pool.get('ir.model.data')
- data_id = data_obj._get_id(cr, uid, 'crm', 'view_crm_lead2opportunity_create')
- view_id = False
- if data_id:
- view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
-
- context.update({'partner_id': False})
- value = {
- 'name': _('Create Opportunity'),
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'crm.lead2opportunity',
- 'view_id': False,
- 'context': context,
- 'views': [(view_id, 'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
- return value
-
-
- def view_init(self, cr, uid, fields, context=None):
- """
- This function checks for precondition before wizard executes
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- """
- lead_obj = self.pool.get('crm.lead')
-
- for lead in lead_obj.browse(cr, uid, context.get('active_ids', [])):
- if lead.state in ['done', 'cancel']:
- raise osv.except_osv(_("Warning !"), _("Closed/Cancelled \
-Leads Could not convert into Opportunity"))
- if lead.state != 'open':
- raise osv.except_osv(_('Warning !'), _('Lead should be in \
-\'Open\' state before converting to Opportunity.'))
- return False
-
-crm_lead2opportunity_partner()
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_lead_to_opportunity_view.xml.moved b/addons/crm/wizard/crm_lead_to_opportunity_view.xml.moved
deleted file mode 100644
index 229b54e09fe..00000000000
--- a/addons/crm/wizard/crm_lead_to_opportunity_view.xml.moved
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
-
- crm.lead2opportunity.create
- crm.lead2opportunity
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create Opportunity
- ir.actions.act_window
- crm.lead2opportunity
- form
- form
- new
-
-
-
-
- crm.lead2opportunity.partner.form
- crm.lead2opportunity.partner
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm/wizard/crm_lead_to_partner.py.moved b/addons/crm/wizard/crm_lead_to_partner.py.moved
deleted file mode 100644
index 267c3296844..00000000000
--- a/addons/crm/wizard/crm_lead_to_partner.py.moved
+++ /dev/null
@@ -1,216 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import osv, fields
-from tools.translate import _
-
-class crm_lead2partner(osv.osv_memory):
- """ Converts lead to partner """
-
- _name = 'crm.lead2partner'
- _description = 'Lead to Partner'
-
- _columns = {
- 'action': fields.selection([('exist', 'Link to an existing partner'), \
- ('create', 'Create a new partner')], \
- 'Action', required=True),
- 'partner_id': fields.many2one('res.partner', 'Partner')
- }
-
- def view_init(self, cr, uid, fields, context=None):
- """
- This function checks for precondition before wizard executes
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- """
-
- lead_obj = self.pool.get('crm.lead')
- rec_ids = context and context.get('active_ids', [])
- for lead in lead_obj.browse(cr, uid, rec_ids, context=context):
- if lead.partner_id:
- raise osv.except_osv(_('Warning !'),
- _('A partner is already defined on this lead.'))
-
- def default_get(self, cr, uid, fields, context=None):
- """
- This function gets default values
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- @return : default values of fields.
- """
- lead_obj = self.pool.get('crm.lead')
- partner_obj = self.pool.get('res.partner')
- contact_obj = self.pool.get('res.partner.address')
- rec_ids = context and context.get('active_ids', [])
- partner_id = False
-
- data = context and context.get('active_ids', []) or []
- res = super(crm_lead2partner, self).default_get(cr, uid, fields, context=context)
-
- for lead in lead_obj.browse(cr, uid, data, context=context):
- partner_ids = partner_obj.search(cr, uid, [('name', '=', lead.partner_name or lead.name)])
- if not partner_ids and lead.email_from:
- address_ids = contact_obj.search(cr, uid, [('email', '=', lead.email_from)])
- if address_ids:
- addresses = contact_obj.browse(cr, uid, address_ids)
- partner_ids = addresses and [addresses[0].partner_id.id] or False
- partner_id = partner_ids and partner_ids[0] or False
-
- if 'partner_id' in fields:
- res.update({'partner_id': partner_id})
- if 'action' in fields:
- res.update({'action': partner_id and 'exist' or 'create'})
- return res
-
- def open_create_partner(self, cr, uid, ids, context=None):
- """
- This function Opens form of create partner.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for next form.
- """
- if not context:
- context = {}
-
- view_obj = self.pool.get('ir.ui.view')
- view_id = view_obj.search(cr, uid, [('model', '=', 'crm.lead2partner'), \
- ('name', '=', 'crm.lead2partner.view')])
- return {
- 'view_mode': 'form',
- 'view_type': 'form',
- 'view_id': view_id or False,
- 'res_model': 'crm.lead2partner',
- 'context': context,
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- }
-
-
- def _create_partner(self, cr, uid, ids, context=None):
- """
- This function Creates partner based on action.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary {}.
- """
- if not context:
- context = {}
-
- lead_obj = self.pool.get('crm.lead')
- partner_obj = self.pool.get('res.partner')
- contact_obj = self.pool.get('res.partner.address')
- partner_ids = []
- partner_id = False
- contact_id = False
- rec_ids = context and context.get('active_ids', [])
-
- for data in self.browse(cr, uid, ids):
- for lead in lead_obj.browse(cr, uid, rec_ids):
- if data.action == 'create':
- partner_id = partner_obj.create(cr, uid, {
- 'name': lead.partner_name or lead.name,
- 'user_id': lead.user_id.id,
- 'comment': lead.description,
- })
- function_id = self.pool.get('res.partner.function').search(cr,uid,[('name','=',lead.function_name)])
- contact_id = contact_obj.create(cr, uid, {
- 'partner_id': partner_id,
- 'name': lead.name,
- 'phone': lead.phone,
- 'mobile': lead.mobile,
- 'email': lead.email_from,
- 'fax': lead.fax,
- 'title': lead.title,
- 'function': function_id and function_id[0] or False,
- 'street': lead.street,
- 'street2': lead.street2,
- 'zip': lead.zip,
- 'city': lead.city,
- 'country_id': lead.country_id and lead.country_id.id or False,
- 'state_id': lead.state_id and lead.state_id.id or False,
- })
-
- else:
- if data.partner_id:
- partner_id = data.partner_id.id
- contact_id = partner_obj.address_get(cr, uid, [partner_id])['default']
-
- partner_ids.append(partner_id)
-
- vals = {}
- if partner_id:
- vals.update({'partner_id': partner_id})
- if contact_id:
- vals.update({'partner_address_id': contact_id})
- lead_obj.write(cr, uid, [lead.id], vals)
- return partner_ids
-
- def make_partner(self, cr, uid, ids, context=None):
- """
- This function Makes partner based on action.
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Lead to Partner's IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Partner form.
- """
- if not context:
- context = {}
-
- partner_ids = self._create_partner(cr, uid, ids, context)
- mod_obj = self.pool.get('ir.model.data')
- result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
- res = mod_obj.read(cr, uid, result, ['res_id'])
-
- value = {
- 'domain': "[]",
- 'view_type': 'form',
- 'view_mode': 'form,tree',
- 'res_model': 'res.partner',
- 'res_id': partner_ids and int(partner_ids[0]) or False,
- 'view_id': False,
- 'context': context,
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id']
- }
- return value
-
-crm_lead2partner()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_lead_to_partner_view.xml.moved b/addons/crm/wizard/crm_lead_to_partner_view.xml.moved
deleted file mode 100644
index 53d4f1b5476..00000000000
--- a/addons/crm/wizard/crm_lead_to_partner_view.xml.moved
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
- crm.lead2partner.view.create
- crm.lead2partner
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.lead2partner.view
- crm.lead2partner
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm/wizard/crm_opportunity_to_phonecall.py.moved b/addons/crm/wizard/crm_opportunity_to_phonecall.py.moved
deleted file mode 100644
index 148ec3aec6e..00000000000
--- a/addons/crm/wizard/crm_opportunity_to_phonecall.py.moved
+++ /dev/null
@@ -1,139 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-from osv import osv, fields
-from tools.translate import _
-
-class crm_opportunity2phonecall(osv.osv_memory):
- """Converts Opportunity to Phonecall"""
-
- _name = 'crm.opportunity2phonecall'
- _description = 'Opportunity to Phonecall'
-
- _columns = {
- 'name' : fields.char('Call summary', size=64, required=True, select=1),
- 'user_id' : fields.many2one('res.users', "Assign To"),
- 'date': fields.datetime('Date' , required=True),
- 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
- }
-
- def default_get(self, cr, uid, fields, context=None):
- """
- This function gets default values
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param fields: List of fields for default value
- @param context: A standard dictionary for contextual values
-
- @return : default values of fields.
- """
-
- opp_obj = self.pool.get('crm.opportunity')
- record_ids = context and context.get('active_ids', []) or []
- res = super(crm_opportunity2phonecall, self).default_get(cr, uid, fields, context=context)
- for opp in opp_obj.browse(cr, uid, record_ids, context=context):
- if 'name' in fields:
- res.update({'name': opp.name})
- if 'user_id' in fields:
- res.update({'user_id': opp.user_id and opp.user_id.id or False})
- if 'section_id' in fields:
- res.update({'section_id': opp.section_id and opp.section_id.id or False})
- return res
-
- def action_cancel(self, cr, uid, ids, context=None):
- """
- Closes Opportunity to Phonecall form
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Opportunity to Phonecall's IDs
- @param context: A standard dictionary for contextual values
- """
- return {'type': 'ir.actions.act_window_close'}
-
- def action_apply(self, cr, uid, ids, context=None):
- """
- This converts Opportunity to Phonecall and opens Phonecall view
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Opportunity to Phonecall IDs
- @param context: A standard dictionary for contextual values
-
- @return : Dictionary value for created Opportunity form
- """
- value = {}
- record_ids = context and context.get('active_ids', []) or []
-
- phonecall_obj = self.pool.get('crm.phonecall')
- opp_obj = self.pool.get('crm.opportunity')
- mod_obj = self.pool.get('ir.model.data')
- result = mod_obj._get_id(cr, uid, 'crm', 'view_crm_case_phonecalls_filter')
- res = mod_obj.read(cr, uid, result, ['res_id'])
-
- data_obj = self.pool.get('ir.model.data')
- categ_id = mod_obj._get_id(cr, uid, 'crm', 'categ_phone1')
- categ_id = data_obj.browse(cr, uid, categ_id, context=context).res_id
-
- # Select the view
- id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_tree_view')
- id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_phone_form_view')
- if id2:
- id2 = data_obj.browse(cr, uid, id2, context=context).res_id
- if id3:
- id3 = data_obj.browse(cr, uid, id3, context=context).res_id
-
- for this in self.browse(cr, uid, ids, context=context):
- for opp in opp_obj.browse(cr, uid, record_ids, context=context):
- new_case = phonecall_obj.create(cr, uid, {
- 'name' : opp.name,
- 'case_id' : opp.id ,
- 'user_id' : this.user_id and this.user_id.id or False,
- 'categ_id' : categ_id,
- 'description' : opp.description or False,
- 'date' : this.date,
- 'section_id' : opp.section_id and opp.section_id.id or False,
- 'partner_id': opp.partner_id and opp.partner_id.id or False,
- 'partner_address_id': opp.partner_address_id and opp.partner_address_id.id or False,
- 'partner_phone' : opp.phone or (opp.partner_address_id and opp.partner_address_id.phone or False),
- 'partner_mobile' : opp.partner_address_id and opp.partner_address_id.mobile or False,
- 'priority': opp.priority,
- 'opp_id': opp.id
- }, context=context)
-
- phonecall_obj.case_open(cr, uid, [new_case])
-
- value = {
- 'name': _('Phone Call'),
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'crm.phonecall',
- 'res_id' : new_case,
- 'views': [(id3, 'form'), (id2, 'tree'), (False, 'calendar'), (False, 'graph')],
- 'type': 'ir.actions.act_window',
- 'search_view_id': res['res_id']
- }
- return value
-
-crm_opportunity2phonecall()
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml.moved b/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml.moved
deleted file mode 100644
index 827ee867169..00000000000
--- a/addons/crm/wizard/crm_opportunity_to_phonecall_view.xml.moved
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
- crm.opportunity2phonecall.form
- crm.opportunity2phonecall
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Schedule Call
- crm.opportunity2phonecall
- form
- form
-
- new
-
-
-
-
\ No newline at end of file
diff --git a/addons/crm_claim.moved/__init__.py b/addons/crm_claim.moved/__init__.py
deleted file mode 100644
index 7395ea83fe5..00000000000
--- a/addons/crm_claim.moved/__init__.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_claim
-import report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_claim.moved/__openerp__.py b/addons/crm_claim.moved/__openerp__.py
deleted file mode 100644
index 385f861616b..00000000000
--- a/addons/crm_claim.moved/__openerp__.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-
-{
- 'name': 'Customer & Supplier Relationship Management',
- 'version': '1.0',
- 'category': 'Generic Modules/CRM & SRM',
- 'description': """Claims""",
- 'author': 'Tiny',
- 'website': 'http://www.openerp.com',
- 'depends': ['crm'],
- 'init_xml': [
- 'crm_claims_data.xml',
- ],
-
- 'update_xml': [
- 'crm_claims_view.xml',
- 'crm_claims_menu.xml',
- 'security/ir.model.access.csv',
- 'report/crm_claim_report_view.xml',
- ],
- 'demo_xml': [
- 'crm_claims_demo.xml',
- ],
- 'installable': True,
- 'active': False,
-}
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_claim.moved/crm_claims_view.xml b/addons/crm_claim.moved/crm_claims_view.xml
deleted file mode 100644
index ffd0c4943e0..00000000000
--- a/addons/crm_claim.moved/crm_claims_view.xml
+++ /dev/null
@@ -1,294 +0,0 @@
-
-
-
-
-
-
-
- Claim Categories
- crm.case.categ
- form
-
- [('object_id.model', '=', 'crm.claim')]
- {'object_id':'crm.claim'}
-
-
-
-
-
-
-
- Claim Stages
- crm.case.stage
- form
-
- [('object_id.model', '=', 'crm.claim')]
- {'object_id':'crm.claim'}
-
-
-
-
-
-
-
- Claim Resource Type
- crm.case.resource.type
- form
-
- [('object_id.model', '=', 'crm.claim')]
- {'object_id':'crm.claim'}
-
-
-
-
-
-
-
- CRM - Claims Tree
- crm.claim
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Claims Form
- crm.claim
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Claims Calendar
- crm.claim
- calendar
-
-
-
-
-
-
-
-
-
-
-
-
-
- CRM -Graph
- crm.claim
- graph
-
-
-
-
-
-
-
-
-
-
-
-
- CRM - Claims Search
- crm.claim
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/crm_claim.moved/report/__init__.py b/addons/crm_claim.moved/report/__init__.py
deleted file mode 100644
index 4f13d7bd837..00000000000
--- a/addons/crm_claim.moved/report/__init__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_claim_report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_claim.moved/security/ir.model.access.csv b/addons/crm_claim.moved/security/ir.model.access.csv
deleted file mode 100644
index f903ab0c1d7..00000000000
--- a/addons/crm_claim.moved/security/ir.model.access.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_crm_claim","crm.claim","model_crm_claim","crm.group_crm_manager",1,1,1,1
-"access_crm_claim_report_user","crm.claim.report","model_crm_claim_report","crm.group_crm_user",1,0,0,0
diff --git a/addons/crm_claim.moved/crm_claim.py b/addons/crm_claim/crm_claim.py
similarity index 100%
rename from addons/crm_claim.moved/crm_claim.py
rename to addons/crm_claim/crm_claim.py
diff --git a/addons/crm_claim.moved/crm_claims_data.xml b/addons/crm_claim/crm_claim_data.xml
similarity index 100%
rename from addons/crm_claim.moved/crm_claims_data.xml
rename to addons/crm_claim/crm_claim_data.xml
diff --git a/addons/crm_claim.moved/crm_claims_demo.xml b/addons/crm_claim/crm_claim_demo.xml
similarity index 100%
rename from addons/crm_claim.moved/crm_claims_demo.xml
rename to addons/crm_claim/crm_claim_demo.xml
diff --git a/addons/crm_claim.moved/crm_claims_menu.xml b/addons/crm_claim/crm_claim_menu.xml
similarity index 100%
rename from addons/crm_claim.moved/crm_claims_menu.xml
rename to addons/crm_claim/crm_claim_menu.xml
diff --git a/addons/crm_claim.moved/report/crm_claim_report.py b/addons/crm_claim/report/crm_claim_report.py
similarity index 100%
rename from addons/crm_claim.moved/report/crm_claim_report.py
rename to addons/crm_claim/report/crm_claim_report.py
diff --git a/addons/crm_claim.moved/report/crm_claim_report_view.xml b/addons/crm_claim/report/crm_claim_report_view.xml
similarity index 100%
rename from addons/crm_claim.moved/report/crm_claim_report_view.xml
rename to addons/crm_claim/report/crm_claim_report_view.xml
diff --git a/addons/crm_fundraising.moved/__init__.py b/addons/crm_fundraising.moved/__init__.py
deleted file mode 100644
index b16301ec63c..00000000000
--- a/addons/crm_fundraising.moved/__init__.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_fundraising
-import report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_fundraising.moved/__openerp__.py b/addons/crm_fundraising.moved/__openerp__.py
deleted file mode 100644
index 292325f1084..00000000000
--- a/addons/crm_fundraising.moved/__openerp__.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-
-{
- 'name': 'CRM Fundraising',
- 'version': '1.0',
- 'category': 'Generic Modules/CRM & SRM',
- 'description': """Fundraising""",
- 'author': 'Tiny',
- 'website': 'http://www.openerp.com',
- 'depends': ['crm'],
- 'init_xml': [
- 'crm_fundraising_data.xml',
- ],
-
- 'update_xml': [
- 'crm_fundraising_view.xml',
- 'crm_fundraising_menu.xml',
- 'security/ir.model.access.csv',
- 'report/crm_fundraising_report_view.xml',
- ],
- 'demo_xml': [
- 'crm_fundraising_demo.xml',
- ],
- 'installable': True,
- 'active': False,
-}
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/crm_fundraising.moved/report/__init__.py b/addons/crm_fundraising.moved/report/__init__.py
deleted file mode 100644
index 747d6315fdb..00000000000
--- a/addons/crm_fundraising.moved/report/__init__.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL ().
-#
-# 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 .
-#
-##############################################################################
-
-import crm_fundraising_report
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-
diff --git a/addons/crm_fundraising.moved/security/ir.model.access.csv b/addons/crm_fundraising.moved/security/ir.model.access.csv
deleted file mode 100644
index 43e607538ee..00000000000
--- a/addons/crm_fundraising.moved/security/ir.model.access.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
-"access_crm_fundraising","crm.fundraising","model_crm_fundraising","crm.group_crm_manager",1,1,1,1
-"access_crm_fundraising_report_user","crm.fundraising.report","model_crm_fundraising_report","crm.group_crm_user",1,0,0,0
diff --git a/addons/crm_fundraising.moved/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py
similarity index 100%
rename from addons/crm_fundraising.moved/crm_fundraising.py
rename to addons/crm_fundraising/crm_fundraising.py
diff --git a/addons/crm_fundraising.moved/crm_fundraising_data.xml b/addons/crm_fundraising/crm_fundraising_data.xml
similarity index 100%
rename from addons/crm_fundraising.moved/crm_fundraising_data.xml
rename to addons/crm_fundraising/crm_fundraising_data.xml
diff --git a/addons/crm_fundraising.moved/crm_fundraising_demo.xml b/addons/crm_fundraising/crm_fundraising_demo.xml
similarity index 100%
rename from addons/crm_fundraising.moved/crm_fundraising_demo.xml
rename to addons/crm_fundraising/crm_fundraising_demo.xml
diff --git a/addons/crm_fundraising.moved/crm_fundraising_menu.xml b/addons/crm_fundraising/crm_fundraising_menu.xml
similarity index 100%
rename from addons/crm_fundraising.moved/crm_fundraising_menu.xml
rename to addons/crm_fundraising/crm_fundraising_menu.xml
diff --git a/addons/crm_fundraising.moved/crm_fundraising_view.xml b/addons/crm_fundraising/crm_fundraising_view.xml
similarity index 100%
rename from addons/crm_fundraising.moved/crm_fundraising_view.xml
rename to addons/crm_fundraising/crm_fundraising_view.xml
diff --git a/addons/crm_fundraising.moved/report/crm_fundraising_report.py b/addons/crm_fundraising/report/crm_fundraising_report.py
similarity index 100%
rename from addons/crm_fundraising.moved/report/crm_fundraising_report.py
rename to addons/crm_fundraising/report/crm_fundraising_report.py
diff --git a/addons/crm_fundraising.moved/report/crm_fundraising_report_view.xml b/addons/crm_fundraising/report/crm_fundraising_report_view.xml
similarity index 100%
rename from addons/crm_fundraising.moved/report/crm_fundraising_report_view.xml
rename to addons/crm_fundraising/report/crm_fundraising_report_view.xml
diff --git a/addons/crm_helpdesk.moved/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py
similarity index 100%
rename from addons/crm_helpdesk.moved/crm_helpdesk.py
rename to addons/crm_helpdesk/crm_helpdesk.py
diff --git a/addons/crm_helpdesk.moved/crm_helpdesk_data.xml b/addons/crm_helpdesk/crm_helpdesk_data.xml
similarity index 100%
rename from addons/crm_helpdesk.moved/crm_helpdesk_data.xml
rename to addons/crm_helpdesk/crm_helpdesk_data.xml
diff --git a/addons/crm_helpdesk.moved/crm_helpdesk_demo.xml b/addons/crm_helpdesk/crm_helpdesk_demo.xml
similarity index 100%
rename from addons/crm_helpdesk.moved/crm_helpdesk_demo.xml
rename to addons/crm_helpdesk/crm_helpdesk_demo.xml
diff --git a/addons/crm_helpdesk.moved/crm_helpdesk_menu.xml b/addons/crm_helpdesk/crm_helpdesk_menu.xml
similarity index 100%
rename from addons/crm_helpdesk.moved/crm_helpdesk_menu.xml
rename to addons/crm_helpdesk/crm_helpdesk_menu.xml
diff --git a/addons/crm_helpdesk.moved/crm_helpdesk_view.xml b/addons/crm_helpdesk/crm_helpdesk_view.xml
similarity index 100%
rename from addons/crm_helpdesk.moved/crm_helpdesk_view.xml
rename to addons/crm_helpdesk/crm_helpdesk_view.xml
diff --git a/addons/crm_helpdesk.moved/report/crm_helpdesk_report.py b/addons/crm_helpdesk/report/crm_helpdesk_report.py
similarity index 100%
rename from addons/crm_helpdesk.moved/report/crm_helpdesk_report.py
rename to addons/crm_helpdesk/report/crm_helpdesk_report.py
diff --git a/addons/crm_helpdesk.moved/report/crm_helpdesk_report_view.xml b/addons/crm_helpdesk/report/crm_helpdesk_report_view.xml
similarity index 100%
rename from addons/crm_helpdesk.moved/report/crm_helpdesk_report_view.xml
rename to addons/crm_helpdesk/report/crm_helpdesk_report_view.xml
From b0e13d13aaf3ef76c81d0a7fa7694a9ef4317a70 Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Wed, 12 May 2010 16:29:59 +0530
Subject: [PATCH 100/148] [IMP]: olap: Solve Database problem in yml for olap
module
bzr revid: ksa@tinyerp.co.in-20100512105959-5s3i4hpvoq43uu0y
---
addons/olap/test/olap_test00.yml | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/addons/olap/test/olap_test00.yml b/addons/olap/test/olap_test00.yml
index af87950468f..22bdd0e54c8 100644
--- a/addons/olap/test/olap_test00.yml
+++ b/addons/olap/test/olap_test00.yml
@@ -11,20 +11,23 @@
name: OpenERP
type: postgres
-
- I will check the connection for successful login. >>>>>>(Problem)
-# !python {model: olap.fact.database}: |
- # self.test_connection(cr, uid,[ref('olap_fact_database_openerp0')], context)
+ I will check the connection for successful login.
+-
+ !python {model: olap.fact.database}: |
+ import tools
+ if tools.config['db_name'] == 'tiny' and tools.config['db_password'] == '123456' and tools.config['db_host'] == 'localhost':
+ self.test_connection(cr, uid, ids ,{'active_ids':[ref('olap_fact_database_openerp0')]})
-
In order to test schema,I create a new schema record.
-
!record {model: olap.schema, id: olap_schema_Partners0}:
database_id: olap_fact_database_openerp0
name: Partners
--
+-
I press "Connect to Database" and I see that the Schema State is "Database Connected" now
--
+-
!workflow {model: olap.schema, action: dbconnect, ref: olap_schema_Partners0}
--
+-
Now I will load the structure of the database. by structure we mean tables, columns and the relations. This will help in defining cube easily.
-
!record {model: bi.load.db.wizard, id: bi_load_db_wizard_0}:
@@ -45,7 +48,7 @@
!workflow {model: olap.schema, action: dbconfigure, ref: olap_schema_Partners0}
-
Performing a workflow action dbready on module olap.schema
--
+-
!workflow {model: olap.schema, action: dbready, ref: olap_schema_Partners0}
-
In order to create Cube I first define the fact table.Fact table are the key tables in which measures are stored and we can branch to other tables for other parameters.
@@ -93,7 +96,7 @@
table_id: olap_cube_table_partnercubetable0
-
After adding the hierarchy I create level.I select Product's default_code as Columns Name that is loaded in Fact columns.
--
+-
!record {model: olap.level, id: olap_level_productscode0}:
column_id_name: name
column_name: olap.columns_res_user_name
@@ -107,5 +110,4 @@
-
!python {model: olap.load.column}: |
ids = self.search(cr, uid, [])
- self.get_table_data(cr, uid, ids, {'active_ids': [ref('olap_cube_table_partnercubetable0')]})
-
+ self.get_table_data(cr, uid, ids, {'active_ids': [ref('olap_cube_table_partnercubetable0')]})
From 4f2caf3615e325ed0418d43aa1baeb2bb2c38329 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Thu, 13 May 2010 10:50:42 +0530
Subject: [PATCH 101/148] [IMP]: crm: Usability Improvement in case
section(Sale teams)form. and some minor changes in yaml.
bzr revid: atp@tinyerp.co.in-20100513052042-xdwu6fbyh20pe8q3
---
addons/crm/crm.py | 2 +-
addons/crm/crm_view.xml | 23 ++++------
addons/crm/report/crm_report_view.xml | 10 ----
addons/crm/test/test_crm_lead.yml | 19 ++++----
addons/crm/test/test_crm_phonecall.yml | 63 +++++++++++++++-----------
5 files changed, 59 insertions(+), 58 deletions(-)
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 3686537ad1d..5e7e481975c 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -67,7 +67,7 @@ class crm_case_section(osv.osv):
'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"),
'server_id':fields.many2one('email.smtpclient', 'Server ID'),
'note': fields.text('Description'),
-
+ 'working_hours': fields.float('Working Hours', digits=(16,2 )),
}
_defaults = {
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 5c171236836..77d2347d3ec 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -13,31 +13,28 @@
-
+
+
-
+
+
+
-
-
-
-
-
-
-
+
-
-
+
-
+
-
+
+
diff --git a/addons/crm/report/crm_report_view.xml b/addons/crm/report/crm_report_view.xml
index 814b056dbf1..701c9e3c835 100644
--- a/addons/crm/report/crm_report_view.xml
+++ b/addons/crm/report/crm_report_view.xml
@@ -171,16 +171,6 @@
id="act_res_users_2_report_crm_case_user" name="Monthly cases"
res_model="crm.case.report" src_model="res.users" />
-
-
-
-
diff --git a/addons/crm/test/test_crm_lead.yml b/addons/crm/test/test_crm_lead.yml
index 22fdfffca1b..437059f371c 100644
--- a/addons/crm/test/test_crm_lead.yml
+++ b/addons/crm/test/test_crm_lead.yml
@@ -16,7 +16,6 @@
login: user_crm
name: user_crm
password: user_crm
-
- |
I start by creating a new lead "New Customer" and I provide an address to this
@@ -25,7 +24,7 @@
!record {model: crm.lead, id: crm_lead_newcustomer0}:
email_from: info@mycustomer.com
name: New Customer
- partner_name: Sandip zala
+ partner_name: Capegemini
phone: (855) 924-4364
mobile: (333) 715-1450
section_id: crm.section_sales_department
@@ -41,6 +40,11 @@
-
!python {model: crm.lead}: |
self.case_open(cr, uid, [ref("crm_lead_newcustomer0")])
+- |
+ I check that lead is now in 'open' state.
+-
+ !assert {model: crm.lead, id: crm_lead_newcustomer0, string: Lead in open state}:
+ - state == "open"
- |
As the lead seems to be a real business opportunity, I will convert it to a
@@ -49,8 +53,8 @@
-
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref('crm_lead_newcustomer0'))
- if not lead.partner_id:
- self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
+ action = self.convert_opportunity(cr, uid, [ref("crm_lead_newcustomer0")], {'active_ids': [ref("crm_lead_newcustomer0")]})
+ assert action['res_model'] == 'crm.lead2opportunity.partner'
-
|
Now, select "create a new partner" option in this wizard.
@@ -66,7 +70,7 @@
Now, I give value to this wizard field.
-
!record {model: crm.lead2opportunity, id: crm_lead2opportunity_stonage_0}:
- name: Sandip zala
+ name: Capegemini
planned_revenue: 0.00
probability: 0.00
-
@@ -79,8 +83,8 @@
I can check that a lead and a business opportunity is now assigned to this
lead.
-
- # !python {model: crm.lead, id: crm_lead_newcustomer0}:
- # - opportunity_id.id != False
+ # !python {model: crm.lead, id: crm_lead_newcustomer0}:
+ # - opportunity_id == False
- |
I check that the partner associated to this lead as the same country, phone number
@@ -88,7 +92,6 @@
-
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
- print "lead", lead.partner_name
obj_opportunity = self.pool.get('crm.opportunity')
ids = obj_opportunity.search(cr, uid, [('name', '=', lead.partner_name)])
opportunity = obj_opportunity.browse(cr, uid, ids)[0]
diff --git a/addons/crm/test/test_crm_phonecall.yml b/addons/crm/test/test_crm_phonecall.yml
index feb87e0a879..47021843348 100644
--- a/addons/crm/test/test_crm_phonecall.yml
+++ b/addons/crm/test/test_crm_phonecall.yml
@@ -4,44 +4,55 @@
!record {model: crm.phonecall, id: crm_phonecall_interviewcall0}:
date: '2010-04-21 18:59:00'
name: Interview call
- partner_address_id: base.res_partner_address_1
- partner_id: base.res_partner_9
- partner_mobile: (+32)2 211 34 83
section_id: crm.section_sales_department
+- |
+ Now , I select partner by click on "Create a Partner" button.
+
+-
+ !record {model: crm.phonecall2partner, id: crm_phonecall2partner_1}:
+ action: exist
+ partner_id: base.res_partner_9
+
+-
+ Now, click on "Continue" button of this wizard.
+-
+ !python {model: crm.phonecall2partner}: |
+ self.make_partner(cr, uid, [ref("crm_phonecall2partner_1")], {"active_ids": [ref("crm_phonecall_interviewcall0")]})
- |
As the success of phonecall seems to be a real business opportunity, I will convert
it to opportunity by clicking on the "Convert to Opportunity" button.
+-
+ !record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_interviewcall0}:
+ name: Interview call
+ partner_id: base.res_partner_9
+ planned_revenue: 0.0
+ probability: 0.0
+-
+ Now, I click on "Convert" button of this wizard.
-
-# !python {model: crm.phonecall2opportunity}: |
-# self.action_apply(cr, uid, [1], {'active_id': ref('crm_phonecall_interviewcall0')})
-
+ !python {model: crm.phonecall2opportunity}: |
+ self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_interviewcall0")], {"active_id": ref("crm_phonecall_interviewcall0")})
-
# This is not working, find a way to do that in YAML
-
+
- |
I can see that a business opportunity is now assigned to this phonecall
-- |
- I check that the partner associated to this as the same country, phone number
- and name than the phonecall.
-- |
- In order to avoid the duplication of similar partner, OpenERP should be able to
- detect if the partner exists or if it should be created from the phonecall during the
- conversion.
-- |
- In order to test this, I log as the user "user_crm2"
-- |
- Then, I create the same phonecall than the preceeding one but I change the name
- of the phonecall. But this customer keeps the same email.
-- |
- This time OpenERP should detect that this customer already exists in the
- partner base and I check that in the wizard, proposes me to link to this existing
- partner instead of creating another one.
-- |
- I confirm the conversion wizard.
+-
+ !assert {model: crm.phonecall, id: crm_phonecall_interviewcall0}:
+ - opportunity_id == True
+
- |
And I check that the phonecall and the newly created business opportunity is linked
- to the partner
+ to same partner
+-
+ !python {model: crm.phonecall}: |
+ xid= ref('crm_phonecall_interviewcall0')
+ obj_phonecall = self.browse(cr, uid, xid)
+ ids = self.pool.get('crm.opportunity').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
+ obj_opp = self.pool.get('crm.opportunity').browse(cr, uid, ids)[0]
+ assert obj_phonecall.partner_id == obj_opp.partner_id
+
- |
I schedule Meeting on this current phonecall by clicking on "schedule
Meeting"
From 66de871d9fd141a6c3ded3769674bec12f48427d Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Thu, 13 May 2010 12:44:36 +0530
Subject: [PATCH 102/148] [IMP]: wiki: solve osv memoery wizard for create menu
in wiki module
bzr revid: ksa@tinyerp.co.in-20100513071436-b1015w3xqugstb19
---
addons/wiki/wizard/wiki_create_menu.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/wiki/wizard/wiki_create_menu.py b/addons/wiki/wizard/wiki_create_menu.py
index 0b242e655bb..340c40834bd 100644
--- a/addons/wiki/wizard/wiki_create_menu.py
+++ b/addons/wiki/wizard/wiki_create_menu.py
@@ -41,6 +41,7 @@ class wiki_create_menu(osv.osv_memory):
@param ids: List of create menu’s IDs
"""
+ data = context and context.get('active_id', False) or False
mod_obj = self.pool.get('ir.model.data')
action_id = mod_obj._get_id(cr, uid, 'wiki', 'action_view_wiki_wiki_page_open')
@@ -49,10 +50,10 @@ class wiki_create_menu(osv.osv_memory):
'name': menu.menu_name,
'parent_id':menu.menu_parent_id.id,
'icon': 'STOCK_DIALOG_QUESTION',
- 'action': 'ir.actions.act_window,'+ str(action_id)
+ 'action': 'ir.actions.act_window,'+ str(action_id)[0]
}, context)
home = menu.page.id
- group_id = menu.id
+ group_id = data
res = {
'home': home,
}
@@ -61,7 +62,6 @@ class wiki_create_menu(osv.osv_memory):
{'group_id': group_id, 'action_id': menu_id})
return {}
-
wiki_create_menu()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
From fd5a510c1014676783dfc4f63c0ff4fa8c2701c9 Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Thu, 13 May 2010 15:31:20 +0530
Subject: [PATCH 103/148] [IMP]: wiki: Apply usability for wiki module
bzr revid: ksa@tinyerp.co.in-20100513100120-ios37kda8smv77ps
---
addons/wiki/wiki_view.xml | 20 ++++++++++---------
addons/wiki/wizard/wiki_make_index_view.xml | 10 ++++------
addons/wiki/wizard/wiki_show_diff_view.xml | 1 +
.../wiki/wizard/wiki_wiki_page_open_view.xml | 8 +++-----
4 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/addons/wiki/wiki_view.xml b/addons/wiki/wiki_view.xml
index 4675cea75f9..79194659b34 100644
--- a/addons/wiki/wiki_view.xml
+++ b/addons/wiki/wiki_view.xml
@@ -21,7 +21,7 @@
wiki.groups
tree
-
+
@@ -34,7 +34,7 @@
wiki.groups
form
-
+
@@ -62,7 +62,7 @@
- Wikis
+ Wiki Groups
wiki.groups
form
tree,form
@@ -74,7 +74,7 @@
action="action_wiki_groups"/>
- Wikis
+ Wiki Groups
wiki.groups
tree
@@ -126,13 +126,15 @@
-
-
-
-
+
+
+
+
+
+
@@ -169,7 +171,7 @@
- Search Pages
+ Wiki Pages
wiki.wiki
form
tree,form
diff --git a/addons/wiki/wizard/wiki_make_index_view.xml b/addons/wiki/wizard/wiki_make_index_view.xml
index f9b0acbf273..b4ae419deab 100644
--- a/addons/wiki/wizard/wiki_make_index_view.xml
+++ b/addons/wiki/wizard/wiki_make_index_view.xml
@@ -9,13 +9,11 @@
wiki.make.index
form
-
-
-
+
+
-
-
-
+
+
diff --git a/addons/wiki/wizard/wiki_show_diff_view.xml b/addons/wiki/wizard/wiki_show_diff_view.xml
index ec8fcb3ca6d..393e29b8b8b 100644
--- a/addons/wiki/wizard/wiki_show_diff_view.xml
+++ b/addons/wiki/wizard/wiki_show_diff_view.xml
@@ -14,6 +14,7 @@
+
diff --git a/addons/wiki/wizard/wiki_wiki_page_open_view.xml b/addons/wiki/wizard/wiki_wiki_page_open_view.xml
index 507f3d5cdac..98ed33a940d 100644
--- a/addons/wiki/wizard/wiki_wiki_page_open_view.xml
+++ b/addons/wiki/wizard/wiki_wiki_page_open_view.xml
@@ -10,11 +10,9 @@
form
-
-
-
-
-
+
+
+
From e8d3e6a5bbf242660e3debc51755430458424c3d Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Thu, 13 May 2010 16:44:09 +0530
Subject: [PATCH 104/148] [IMP]: olap: Apply usability for olap module
bzr revid: ksa@tinyerp.co.in-20100513111409-0ha9fqtpb8pi3b9g
---
addons/olap/data/olap_cube_view.xml | 154 +++++++++---------
addons/olap/wizard/olap_load_column_view.xml | 10 +-
.../wizard/olap_query_logs_clear_view.xml | 9 +-
3 files changed, 86 insertions(+), 87 deletions(-)
diff --git a/addons/olap/data/olap_cube_view.xml b/addons/olap/data/olap_cube_view.xml
index c3f43b89740..7cc2e490351 100644
--- a/addons/olap/data/olap_cube_view.xml
+++ b/addons/olap/data/olap_cube_view.xml
@@ -3,7 +3,7 @@
-
+
bi.load.db.form
bi.load.db.wizard
@@ -22,7 +22,7 @@
-
+
Load database Structure
bi.load.db.wizard
@@ -33,10 +33,10 @@
new
-
-
+
+
-
+
Olap Warehouse
olap.warehouse.wizard
@@ -51,7 +51,7 @@
-
+
Olap Warehouse
ir.actions.act_window
@@ -60,7 +60,7 @@
form
new
-
+
-
+
-
+
Parameters Configuration
olap.parameters.config.wizard
@@ -90,7 +90,7 @@
-
+
Parameters Configuration
ir.actions.act_window
@@ -99,7 +99,7 @@
form
new
-
+
-
+
Server Parameters Configuration
This wizard will configure the URL of the web client
-
-
+
+
-
+
bi.auto.configure.form
bi.auto.configure.wizard
@@ -131,7 +131,7 @@
-
+
Auto Configuration
bi.auto.configure.wizard
@@ -142,13 +142,13 @@
new
-
-
-
+
+
+
# ------------------------------------------------------------------
# Olap Schema
# ------------------------------------------------------------------
-
+
olap.schema.tree
olap.schema
@@ -160,7 +160,7 @@
-
+
olap.schema.form
olap.schema
@@ -195,19 +195,19 @@
-
+
Olap Schemas
olap.schema
form
-
+
-
+
# ------------------------------------------------------------------
# Olap Cubes Table
# ------------------------------------------------------------------
@@ -245,23 +245,23 @@
-
+
Olap Cube Tables
olap.cube.table
form
-
+
-
+
# ------------------------------------------------------------------
# Olap Cubes
# ------------------------------------------------------------------
-
+
olap.cube.tree
olap.cube
@@ -273,7 +273,7 @@
-
+
olap.cube.form
olap.cube
@@ -287,24 +287,24 @@
-
+
Olap Cubes
olap.cube
form
-
+
-
-
+
+
# ------------------------------------------------------------------
# Olap Dimensions
# ------------------------------------------------------------------
-
+
olap.dimension.tree
olap.dimension
@@ -316,7 +316,7 @@
-
+
olap.dimension.form
olap.dimension
@@ -328,23 +328,23 @@
-
+
Olap Dimensions
olap.dimension
form
-
+
-
+
# ------------------------------------------------------------------
# Olap Hierarchies
# ------------------------------------------------------------------
-
+
olap.hierarchy.tree
olap.hierarchy
@@ -356,7 +356,7 @@
-
+
olap.hierarchy.form
olap.hierarchy
@@ -365,33 +365,29 @@
-
-
-
-
-
+
+
-
+
Olap Hierarchies
olap.hierarchy
form
-
+
-
-
+
+
# ------------------------------------------------------------------
# Olap Levels
# ------------------------------------------------------------------
-
+
olap.level.tree
olap.level
@@ -408,7 +404,7 @@
-
+
olap.level.form
olap.level
@@ -427,24 +423,24 @@
-
+
Olap Level
olap.level
form
-
+
-
-
+
+
# ------------------------------------------------------------------
# Olap Measure
# ------------------------------------------------------------------
-
+
olap.measure.tree
olap.measure
@@ -456,7 +452,7 @@
-
+
olap.measure.form
olap.measure
@@ -471,7 +467,7 @@
-
+
@@ -484,19 +480,19 @@
-
+
Olap Measures
olap.measure
form
-
+
-
+
# ------------------------------------------------------------------
# Olap Saved Query
# ------------------------------------------------------------------
@@ -515,7 +511,7 @@
-
+
olap.saved.query.mdx
olap.saved.query
@@ -531,7 +527,7 @@
-
+
olap.saved.query.form
olap.saved.query
@@ -553,22 +549,22 @@
-
+
Olap Saved Query
olap.saved.query
form
tree,form,mdx
-
+
-
+
-
+
olap.query.logs
olap.query.logs
@@ -582,7 +578,7 @@
-
+
olap.query.logs.form
olap.query.logs
@@ -599,21 +595,21 @@
-
+
All Logs
olap.query.logs
form
-
+
-
+
-
+
olap.query.logs
olap.query.logs
@@ -626,7 +622,7 @@
-
+
olap.query.logs
olap.query.logs
@@ -639,9 +635,9 @@
-
+
-
+
olap.query.logs.form
olap.query.logs
@@ -657,7 +653,7 @@
-
+
My Logs
olap.query.logs
@@ -665,12 +661,12 @@
tree,form,mdx
[('user_id','=',uid)]
-
+
-
+
diff --git a/addons/olap/wizard/olap_load_column_view.xml b/addons/olap/wizard/olap_load_column_view.xml
index e79e8fcfb42..564cc28872b 100644
--- a/addons/olap/wizard/olap_load_column_view.xml
+++ b/addons/olap/wizard/olap_load_column_view.xml
@@ -9,9 +9,13 @@
olap.load.column
form
-
-
-
+
+
+
+
+
+
+
diff --git a/addons/olap/wizard/olap_query_logs_clear_view.xml b/addons/olap/wizard/olap_query_logs_clear_view.xml
index c4015673049..695cd217e73 100644
--- a/addons/olap/wizard/olap_query_logs_clear_view.xml
+++ b/addons/olap/wizard/olap_query_logs_clear_view.xml
@@ -11,11 +11,10 @@
-
-
-
-
-
+
+
+
+
From ea1054ec4517844e7e58946b364a107ee8b737ce Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Thu, 13 May 2010 20:46:04 +0530
Subject: [PATCH 105/148] [IMP]: audittrail: add button for subcribe in list
view of audit rules.
bzr revid: atp@tinyerp.co.in-20100513151604-3hri4a6h8yplafm0
---
addons/audittrail/audittrail_view.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/addons/audittrail/audittrail_view.xml b/addons/audittrail/audittrail_view.xml
index b0efa7c29f2..c8999e78774 100644
--- a/addons/audittrail/audittrail_view.xml
+++ b/addons/audittrail/audittrail_view.xml
@@ -44,6 +44,8 @@
+
From 55d7925b312012c3ec2c2b3748cd12a87a2110b7 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Thu, 13 May 2010 20:48:10 +0530
Subject: [PATCH 106/148] [IMP]: board: Add new field menu_id: many2one
(ir.ui.menu) in dashboard.
bzr revid: atp@tinyerp.co.in-20100513151810-pe2jtw3dyay6iqt6
---
addons/board/board.py | 3 ++-
addons/board/board_view.xml | 13 ++++++++-----
addons/board/wizard/board_menu_create.py | 15 +++++++++------
addons/board/wizard/board_menu_create_view.xml | 6 +++---
4 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/addons/board/board.py b/addons/board/board.py
index 230954d942b..ff62a80b5a6 100644
--- a/addons/board/board.py
+++ b/addons/board/board.py
@@ -143,7 +143,8 @@ class board_board(osv.osv):
_columns = {
'name': fields.char('Dashboard', size=64, required=True),
'view_id': fields.many2one('ir.ui.view', 'Board View'),
- 'line_ids': fields.one2many('board.board.line', 'board_id', 'Action Views')
+ 'line_ids': fields.one2many('board.board.line', 'board_id', 'Action Views'),
+ 'menu_id':fields.many2one('ir.ui.menu', 'Menu', required=False),
}
# the following lines added to let the button on dashboard work.
diff --git a/addons/board/board_view.xml b/addons/board/board_view.xml
index 18e87f12c50..8c957c37f11 100644
--- a/addons/board/board_view.xml
+++ b/addons/board/board_view.xml
@@ -66,11 +66,14 @@
-
-
+
+
+
+
+
diff --git a/addons/board/wizard/board_menu_create.py b/addons/board/wizard/board_menu_create.py
index e986ac7bb3c..6a6da152066 100644
--- a/addons/board/wizard/board_menu_create.py
+++ b/addons/board/wizard/board_menu_create.py
@@ -69,14 +69,17 @@ class board_menu_create(osv.osv_memory):
'view_id': board.view_id.id,
})
obj_menu = self.pool.get('ir.ui.menu')
+ obj_board = self.pool.get('board.board')
#start Loop
for data in self.read(cr, uid, ids):
- obj_menu.create(cr, uid, {
- 'name': data.get('menu_name'),
- 'parent_id': data.get('menu_parent_id'),
- 'icon': 'STOCK_SELECT_COLOR',
- 'action': 'ir.actions.act_window,' + str(action_id)
- }, context=context)
+ id = obj_menu.create(cr, uid, {
+ 'name': data.get('menu_name'),
+ 'parent_id': data.get('menu_parent_id'),
+ 'icon': 'STOCK_SELECT_COLOR',
+ 'action': 'ir.actions.act_window,' + str(action_id)
+ }, context=context)
+ obj_board.write(cr, uid, [context_id], { "menu_id": id})
+
#End Loop
return {}
diff --git a/addons/board/wizard/board_menu_create_view.xml b/addons/board/wizard/board_menu_create_view.xml
index ce62be47617..a2110720440 100644
--- a/addons/board/wizard/board_menu_create_view.xml
+++ b/addons/board/wizard/board_menu_create_view.xml
@@ -18,9 +18,9 @@
-
-
+
From 479d3c7cc740b90b49505535c7aa19e3f177d137 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 14 May 2010 12:01:57 +0530
Subject: [PATCH 107/148] [FIX]: crm: Fixed problem of wrong model in yml test
bzr revid: rpa@tinyerp.com-20100514063157-00rhglityqqj288f
---
addons/crm/test/test_crm_phonecall.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/crm/test/test_crm_phonecall.yml b/addons/crm/test/test_crm_phonecall.yml
index 47021843348..f2020659aed 100644
--- a/addons/crm/test/test_crm_phonecall.yml
+++ b/addons/crm/test/test_crm_phonecall.yml
@@ -49,8 +49,8 @@
!python {model: crm.phonecall}: |
xid= ref('crm_phonecall_interviewcall0')
obj_phonecall = self.browse(cr, uid, xid)
- ids = self.pool.get('crm.opportunity').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
- obj_opp = self.pool.get('crm.opportunity').browse(cr, uid, ids)[0]
+ ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
+ obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0]
assert obj_phonecall.partner_id == obj_opp.partner_id
- |
From 9d6cdee4ed28f677aeaa80e62410a4f96780b0cb Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 14 May 2010 12:02:25 +0530
Subject: [PATCH 108/148] [FIX]: crm: Fixed problem of wrong model in yml test
bzr revid: rpa@tinyerp.com-20100514063225-gtwfy8pkeq88ih66
---
addons/crm/test/test_crm_phonecall.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/crm/test/test_crm_phonecall.yml b/addons/crm/test/test_crm_phonecall.yml
index 47021843348..f2020659aed 100644
--- a/addons/crm/test/test_crm_phonecall.yml
+++ b/addons/crm/test/test_crm_phonecall.yml
@@ -49,8 +49,8 @@
!python {model: crm.phonecall}: |
xid= ref('crm_phonecall_interviewcall0')
obj_phonecall = self.browse(cr, uid, xid)
- ids = self.pool.get('crm.opportunity').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
- obj_opp = self.pool.get('crm.opportunity').browse(cr, uid, ids)[0]
+ ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
+ obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0]
assert obj_phonecall.partner_id == obj_opp.partner_id
- |
From 8c48b03822b5dbdf141425d81974b83e93ac8b7c Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Fri, 14 May 2010 15:24:28 +0530
Subject: [PATCH 109/148] [IMP]: idea: Usability Improvement in idea module.
bzr revid: atp@tinyerp.co.in-20100514095428-g7svp99hdr1j6buc
---
addons/idea/idea.py | 68 +++---------
addons/idea/idea_view.xml | 122 ++++++++++-----------
addons/idea/security/ir.model.access.csv | 1 -
addons/idea/test/test_idea.yml | 25 ++---
addons/idea/wizard/idea_post_vote.py | 76 +++++++++----
addons/idea/wizard/idea_post_vote_view.xml | 44 ++++++--
6 files changed, 168 insertions(+), 168 deletions(-)
diff --git a/addons/idea/idea.py b/addons/idea/idea.py
index 37bdaa80b7f..5a44f678f4e 100644
--- a/addons/idea/idea.py
+++ b/addons/idea/idea.py
@@ -20,6 +20,7 @@
##############################################################################
from osv import osv, fields
+import time
VoteValues = [('-1', 'Not Voted'), ('0', 'Very Bad'), ('25', 'Bad'), \
('50', 'Normal'), ('75', 'Good'), ('100', 'Very Good') ]
@@ -90,26 +91,6 @@ class idea_idea(osv.osv):
cr.execute(sql, (ids,))
return dict(cr.fetchall())
- def _comment_count(self, cr, uid, ids, name, arg, context=None):
-
- """ count number of comment
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of comment’s IDs
- @return: dictionay of Idea """
-
- if not ids:
- return {}
-
- sql = """SELECT i.id, COUNT(1)
- FROM idea_idea i LEFT OUTER JOIN idea_comment c ON i.id = c.idea_id
- WHERE i.id = ANY(%s)
- GROUP BY i.id
- """
-
- cr.execute(sql, (ids,))
- return dict(cr.fetchall())
-
def _vote_read(self, cr, uid, ids, name, arg, context = None):
""" Read Vote
@@ -149,18 +130,15 @@ class idea_idea(osv.osv):
vote_obj.create(cr, uid, {'idea_id': id, 'user_id': uid, 'score': textual_value })
_columns = {
- 'user_id': fields.many2one('res.users', 'Creator', required=True, readonly=True),
+ 'user_id': fields.many2one('res.users', 'Responsible', required=True, readonly=True),
'title': fields.char('Idea Summary', size=64, required=True),
'description': fields.text('Description', required=True, help='Content of the idea'),
- 'comment_ids': fields.one2many('idea.comment', 'idea_id', 'Comments'),
- 'create_date': fields.datetime('Creation date', readonly=True),
- 'vote_ids': fields.one2many('idea.vote', 'idea_id', 'Vote'),
+ 'created_date': fields.datetime('Date'),
+ 'vote_ids': fields.one2many('idea.vote', 'idea_id', 'Vote', readonly=True),
'my_vote': fields.function(_vote_read, fnct_inv = _vote_save, \
string="My Vote", method=True, type="selection", selection=VoteValues),
'vote_avg': fields.function(_vote_avg_compute, method=True, string="Average Score", type="float"),
'count_votes': fields.function(_vote_count, method=True, string="Count of votes", type="integer"),
- 'count_comments': fields.function(_comment_count, method=True, \
- string="Count of comments", type="integer"),
'category_id': fields.many2one('idea.category', 'Category', required=True),
'state': fields.selection([('draft', 'Draft'), ('open', 'Opened'), \
('close', 'Accepted'), ('cancel', 'Cancelled')], \
@@ -169,8 +147,7 @@ class idea_idea(osv.osv):
opened by the user, the state is \'Opened\'.\
\nIf the idea is accepted, the state is \'Accepted\'.'),
'stat_vote_ids': fields.one2many('idea.vote.stat', 'idea_id', 'Statistics', readonly=True),
- 'date': fields.date('Creation date'),
- 'vote_user': fields.integer('Maximum Vote per User',
+ 'vote_limit': fields.integer('Maximum Vote per User',
help="Set to one if you require only one Vote per user"),
}
@@ -178,7 +155,8 @@ class idea_idea(osv.osv):
'user_id': lambda self,cr,uid,context: uid,
'my_vote': lambda *a: '-1',
'state': lambda *a: 'draft',
- 'vote_user': lambda * a: 1,
+ 'vote_limit': lambda * a: 1,
+ 'created_date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
}
_order = 'id desc'
@@ -199,29 +177,6 @@ class idea_idea(osv.osv):
return True
idea_idea()
-class idea_comment(osv.osv):
- """ Apply Idea for Comment """
-
- _name = 'idea.comment'
- _description = 'Comments'
- _rec_name = 'content'
-
- _columns = {
- 'idea_id': fields.many2one('idea.idea', 'Idea', required=True, ondelete='cascade'),
- 'user_id': fields.many2one('res.users', 'User', required=True),
- 'content': fields.text('Comment', required=True),
- 'create_date': fields.datetime('Creation date', readonly=True),
- }
-
- _defaults = {
- 'user_id': lambda self, cr, uid, context: uid
- }
-
- _order = 'id desc'
-
-idea_comment()
-
-
class idea_vote(osv.osv):
""" Apply Idea for Vote """
@@ -230,12 +185,15 @@ class idea_vote(osv.osv):
_rec_name = 'score'
_columns = {
- 'user_id': fields.many2one('res.users', 'User'),
- 'idea_id': fields.many2one('idea.idea', 'Idea', required=True, ondelete='cascade'),
- 'score': fields.selection(VoteValues, 'Score', required=True),
+ 'user_id': fields.many2one('res.users', 'By user', readonly="True"),
+ 'idea_id': fields.many2one('idea.idea', 'Idea', readonly="True", ondelete='cascade'),
+ 'score': fields.selection(VoteValues, 'Vote Status', readonly="True"),
+ 'date': fields.datetime('Date', readonly="True"),
+ 'comment': fields.text('Comment', readonly="True"),
}
_defaults = {
'score': lambda *a: DefaultVoteValue,
+ 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
}
idea_vote()
diff --git a/addons/idea/idea_view.xml b/addons/idea/idea_view.xml
index d89296d317a..4b6fd7b9553 100644
--- a/addons/idea/idea_view.xml
+++ b/addons/idea/idea_view.xml
@@ -47,10 +47,10 @@
id="base.menu_lunch_survey_root" sequence="6"/>
-
+
-
+
@@ -61,13 +61,18 @@
-
+
+
+
-
+
+
Open Ideas
@@ -108,9 +113,9 @@
tree
-
-
-
+
+
+
@@ -123,9 +128,14 @@
form
-
-
-
+
+
+
+
+
+
+
+
@@ -144,6 +154,7 @@
+
@@ -159,37 +170,25 @@
form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -199,8 +198,17 @@
-
-
+
+
+
+
+
+
+
+
+
@@ -213,12 +221,11 @@
tree
-
-
-
-
+
+
+
+
-
@@ -251,30 +258,13 @@
-
+
-
-
-
-
-
-
Ideas
idea.idea
diff --git a/addons/idea/security/ir.model.access.csv b/addons/idea/security/ir.model.access.csv
index 0c720f2ee2d..e89bbf059f5 100644
--- a/addons/idea/security/ir.model.access.csv
+++ b/addons/idea/security/ir.model.access.csv
@@ -1,7 +1,6 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_idea_category","idea.category","model_idea_category","base.group_user",1,0,0,0
"access_idea_idea","idea.idea","model_idea_idea","base.group_user",1,1,1,1
-"access_idea_comment","idea.comment","model_idea_comment","base.group_user",1,1,1,1
"access_idea_vote","idea.vote","model_idea_vote","base.group_user",1,1,1,1
"access_idea_vote_stat","idea.vote.stat","model_idea_vote_stat","base.group_user",1,0,0,0
"access_idea_category_system","idea.category system","model_idea_category","base.group_system",1,1,1,1
diff --git a/addons/idea/test/test_idea.yml b/addons/idea/test/test_idea.yml
index c1ee6deb80f..ae09dd8ef0d 100644
--- a/addons/idea/test/test_idea.yml
+++ b/addons/idea/test/test_idea.yml
@@ -8,10 +8,10 @@
name: Technical
- |
I create a New Idea of "Technical presentation for 1 hours in every day" and specify category "Technical".
-
-
!record {model: idea.idea, id: idea_idea_0}:
category_id: idea_category_technical0
+ created_date: '05/13/2010 19:16:26'
description: I want that Technical presentation are arranged for 1 hours in every
day.\nso, on that presentation, we can know all things what improvement and development
are done in our company.\n\n\n\n\n
@@ -50,31 +50,34 @@
- |
In order to post vote I connect as user1 and open the idea page
- I click on "Vote" wizard and vote the idea as "Normal"
+ I click on "Give Vote" wizard button and vote the idea as "Normal"
-
!record {model: idea.post.vote, id: idea_post_vote_0}:
vote: 50
+
- |
- Now I click on "Post Vote" button of wizard.
+ Now I click on "Post" button of this wizard.
-
!python {model: idea.post.vote}: |
uid = ref('res_users_user0')
- self.do_vote(cr, uid, [ref("idea_post_vote_0")], {'active_id': ref('idea_idea_0')})
+ self.do_vote(cr, uid, [ref("idea_post_vote_0")], {'active_ids': [ref('idea_idea_0')]})
- |
To add other vote I connect as user2 and open the idea page
- I click on "Vote" wizard and vote the idea as "Very Good"
+ I click on "Give Vote" wizard and vote the idea as "Very Good" and put comment "We can learn many things from technical presentation".
-
!record {model: idea.post.vote, id: idea_post_vote_1}:
vote: 100
+ content: We can learn many things from technical presentation
+
- |
- I click on "Post Vote" button of this wizard.
+ I click on "Post" button of this wizard.
-
!python {model: idea.post.vote}: |
uid = ref('res_users_user1')
- self.do_vote(cr, uid, [ref("idea_post_vote_1")], {'active_id': ref('idea_idea_0')})
+ self.do_vote(cr, uid, [ref("idea_post_vote_1")], {'active_ids': [ref('idea_idea_0')]})
- |
I can see that the Average score changed in "Average score" field with value 75
@@ -82,14 +85,6 @@
!record {model: idea.idea, id: idea_idea_0}:
vote_avg: 75
-- |
- I put one comment "We can learn many things from technical presentation" for the idea.
--
- !record {model: idea.idea, id: idea.idea_idea_0}:
- comment_ids:
- - content: We can learn many things from technical presentation
- idea_id: idea.idea_idea_0
- user_id: res_users_user1
- |
I connect as Manager and close this idea by click on "Close" button.
-
diff --git a/addons/idea/wizard/idea_post_vote.py b/addons/idea/wizard/idea_post_vote.py
index dac60ddf18b..d09f3cd24d5 100644
--- a/addons/idea/wizard/idea_post_vote.py
+++ b/addons/idea/wizard/idea_post_vote.py
@@ -34,7 +34,7 @@ class idea_post_vote(osv.osv_memory):
('25', 'Bad'),
('50', 'Normal'),
('75', 'Good'),
- ('100', 'Very Good') ], 'Post Vote', required=True),
+ ('100', 'Very Good') ], 'Give Vote', required=True),
'content': fields.text('Comment'),
}
@@ -48,25 +48,22 @@ class idea_post_vote(osv.osv_memory):
@param context: A standard dictionary for contextual values
"""
idea_obj = self.pool.get('idea.idea')
-
for idea in idea_obj.browse(cr, uid, context.get('active_ids', [])):
- cr.execute('select count(id) from idea_vote where user_id=%s\
- and idea_id=%s' % (uid, context.get('active_id')))
- res = cr.fetchone()[0]
- user_limit = idea.vote_user
- if res >= user_limit:
+ for active_id in context.get('active_ids'):
+ cr.execute('select count(id) from idea_vote where user_id=%s\
+ and idea_id=%s' % (uid, active_id))
+ res = cr.fetchone()[0]
+ user_limit = idea.vote_limit
+ if res >= user_limit:
raise osv.except_osv(_('Warning !'),_("You can not give Vote for this idea more than %s times") % (user_limit))
- if idea.state in ['draft', 'close', 'cancel']:
- raise osv.except_osv(_("Warning !"), _("Draft/Accepted/Cancelled \
-ideas Could not be voted"))
if idea.state != 'open':
- raise osv.except_osv(_('Warning !'), _('idea should be in \
+ raise osv.except_osv(_('Warning !'), _('Idea should be in \
\'Open\' state before vote for that idea.'))
return False
- def do_vote(self, cr, uid, ids, context):
+ def do_vote(self, cr, uid, ids, context=None):
"""
Create idea vote.
@@ -75,21 +72,56 @@ ideas Could not be voted"))
@param ids: List of Idea Post vote’s IDs.
@return: Dictionary {}
"""
-
- data = context and context.get('active_id', False) or False
+ data = context and context.get('active_ids', []) or []
vote_obj = self.pool.get('idea.vote')
- comment_obj = self.pool.get('idea.comment')
-
for do_vote_obj in self.read(cr, uid, ids):
score = str(do_vote_obj['vote'])
comment = do_vote_obj['content']
- dic = {'idea_id': data, 'user_id': uid, 'score': score}
- if comment:
- comment_id = comment_obj.create(cr, uid, {'idea_id': data, 'user_id': uid, 'content': comment})
- vote = vote_obj.create(cr, uid, dic)
+ for id in data:
+ dic = {'idea_id': id, 'user_id': uid, 'score': score, 'comment': comment}
+ vote = vote_obj.create(cr, uid, dic)
return {}
-
+
idea_post_vote()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+class idea_select(osv.osv_memory):
+
+ """ Select idea for vote."""
+
+ _name = "idea.select"
+ _description = "select idea"
+ _columns = {
+ 'idea_id': fields.many2one('idea.idea', 'Idea', required=True),
+ }
+
+ def open_vote(self, cr, uid, ids, context=None):
+ """
+ This function load column.
+ @param cr: the current row, from the database cursor,
+ @param uid: the current users ID for security checks,
+ @param ids: List of load column,
+ @return: dictionary of query logs clear message window
+ """
+ idea_obj = self.browse(cr, uid, ids)
+ for idea in idea_obj:
+ idea_id = idea.idea_id.id
+
+ data_obj = self.pool.get('ir.model.data')
+ id2 = data_obj._get_id(cr, uid, 'idea', 'view_idea_post_vote')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ value = {
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'idea.post.vote',
+ 'views': [(id2, 'form'), (False, 'tree'), (False, 'calendar'), (False, 'graph')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'context': {'active_ids': [idea_id]}
+ }
+ return value
+
+idea_select()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/idea/wizard/idea_post_vote_view.xml b/addons/idea/wizard/idea_post_vote_view.xml
index a3e7fa6a1b3..b7e3a0e5e5f 100644
--- a/addons/idea/wizard/idea_post_vote_view.xml
+++ b/addons/idea/wizard/idea_post_vote_view.xml
@@ -9,8 +9,9 @@
idea.post.vote
form
-
+
+
@@ -18,8 +19,29 @@
-
-
+
+
+
+
+
+
+
+
+
+ idea.select.form
+ idea.select
+ form
+
+
+
+
+
+
+
+
+
+
+
@@ -36,12 +58,16 @@
new
-
-
-
+
+
+ Idea select
+ idea.select
+ form
+ tree,form
+
+ new
+ {'model': 'idea.idea'}
+
From 45100c908f7c2e3a9c4ac6c4661d1e93015a47d3 Mon Sep 17 00:00:00 2001
From: "atp (Open ERP)"
Date: Fri, 14 May 2010 15:42:10 +0530
Subject: [PATCH 110/148] [IMP]: idea: Minor Improvement replace orm method in
place of sql query in view_init method of idea wizard .
bzr revid: atp@tinyerp.co.in-20100514101210-jbvpuhpdzjicy0nr
---
addons/idea/wizard/idea_post_vote.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/addons/idea/wizard/idea_post_vote.py b/addons/idea/wizard/idea_post_vote.py
index d09f3cd24d5..4f57bb9750e 100644
--- a/addons/idea/wizard/idea_post_vote.py
+++ b/addons/idea/wizard/idea_post_vote.py
@@ -48,14 +48,20 @@ class idea_post_vote(osv.osv_memory):
@param context: A standard dictionary for contextual values
"""
idea_obj = self.pool.get('idea.idea')
+ vote_obj = self.pool.get('idea.vote')
+
for idea in idea_obj.browse(cr, uid, context.get('active_ids', [])):
for active_id in context.get('active_ids'):
- cr.execute('select count(id) from idea_vote where user_id=%s\
- and idea_id=%s' % (uid, active_id))
- res = cr.fetchone()[0]
+
+ vote_ids = vote_obj.search(cr, uid, [('user_id', '=', uid), ('idea_id', '=', active_id)])
+ vote_obj_id = vote_obj.browse(cr, uid, vote_ids)
+ count = 0
+ for vote in vote_obj_id:
+ count += 1
+
user_limit = idea.vote_limit
- if res >= user_limit:
+ if count >= user_limit:
raise osv.except_osv(_('Warning !'),_("You can not give Vote for this idea more than %s times") % (user_limit))
if idea.state != 'open':
From d31f828a5829ae360cd32d25fb75f85a02a43072 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 14 May 2010 15:44:26 +0530
Subject: [PATCH 111/148] [IMP]: base_calendar: Improvement in code and
docstring, Retain time of event dates for all day event
bzr revid: rpa@tinyerp.com-20100514101426-f2mrcyev6jvu9fta
---
addons/base_calendar/base_calendar.py | 247 ++++++++++++--------
addons/base_calendar/base_calendar_view.xml | 19 +-
addons/crm/crm_meeting_view.xml | 4 +-
3 files changed, 164 insertions(+), 106 deletions(-)
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index fd1d60914d1..896f63fb955 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -97,7 +97,7 @@ def real_id2base_calendar_id(real_id, recurrent_date):
return '%d-%s' % (real_id, recurrent_date)
return real_id
-def _links_get(self, cr, uid, context={}):
+def _links_get(self, cr, uid, context=None):
"""
Get request link.
@param cr: the current row, from the database cursor,
@@ -213,7 +213,9 @@ class calendar_attendee(osv.osv):
def _get_address(self, name=None, email=None):
"""
- Get Email Address
+ Gives email information in ical CAL-ADDRESS type format
+ @param name: Name for CAL-ADDRESS value
+ @param email: Email address for CAL-ADDRESS value
"""
if name and email:
name += ':'
@@ -221,7 +223,7 @@ class calendar_attendee(osv.osv):
def _compute_data(self, cr, uid, ids, name, arg, context):
"""
- Compute data on field.
+ Compute data on function fields for attendee values .
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of calendar attendee’s IDs.
@@ -241,6 +243,7 @@ class calendar_attendee(osv.osv):
else:
result[id][name] = self._get_address(attdata.sent_by_uid.name, \
attdata.sent_by_uid.address_id.email)
+
if name == 'cn':
if attdata.user_id:
result[id][name] = attdata.user_id.name
@@ -248,40 +251,47 @@ class calendar_attendee(osv.osv):
result[id][name] = attdata.partner_address_id.name or attdata.partner_id.name
else:
result[id][name] = attdata.email or ''
+
if name == 'delegated_to':
todata = []
for child in attdata.child_ids:
if child.email:
todata.append('MAILTO:' + child.email)
result[id][name] = ', '.join(todata)
+
if name == 'delegated_from':
fromdata = []
for parent in attdata.parent_ids:
if parent.email:
fromdata.append('MAILTO:' + parent.email)
result[id][name] = ', '.join(fromdata)
+
if name == 'event_date':
if attdata.ref:
result[id][name] = attdata.ref.date
else:
result[id][name] = False
+
if name == 'event_end_date':
if attdata.ref:
result[id][name] = attdata.ref.date_deadline
else:
result[id][name] = False
+
if name == 'sent_by_uid':
if attdata.ref:
result[id][name] = (attdata.ref.user_id.id, attdata.ref.user_id.name)
else:
result[id][name] = uid
+
if name == 'language':
user_obj = self.pool.get('res.users')
lang = user_obj.read(cr, uid, uid, ['context_lang'], context=context)['context_lang']
result[id][name] = lang.replace('_', '-')
+
return result
- def _links_get(self, cr, uid, context={}):
+ def _links_get(self, cr, uid, context=None):
"""
Get request link for ref field in calendar attendee.
@param cr: the current row, from the database cursor,
@@ -297,7 +307,7 @@ class calendar_attendee(osv.osv):
def _lang_get(self, cr, uid, context={}):
"""
- Get language for language function field.
+ Get language for language selection field.
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param context: A standard dictionary for contextual values
@@ -435,15 +445,18 @@ property or property parameter."),
res = cal.serialize()
return res
- def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context={}):
+ def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context=None):
"""
- Send mail for calendar attendee.
+ Send mail for event invitation to event attendees.
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
- @param ids: List of calendar attendee’s IDs.
+ @param ids: List of attendee’s IDs.
+ @param email_from: Email address for user sending the mail
@param context: A standard dictionary for contextual values
@return: True
"""
+ if not context:
+ context = {}
company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.name
for att in self.browse(cr, uid, ids, context=context):
@@ -471,12 +484,12 @@ property or property parameter."),
attach = self.get_ics_file(cr, uid, res_obj, context=context)
if mail_to and email_from:
tools.email_send(
- email_from,
- mail_to,
- sub,
- body,
- attach=attach and [('invitation.ics', attach)] or None,
- subtype='html',
+ email_from,
+ mail_to,
+ sub,
+ body,
+ attach=attach and [('invitation.ics', attach)] or None,
+ subtype='html',
reply_to=email_from
)
return True
@@ -487,7 +500,7 @@ property or property parameter."),
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of calendar attendee’s IDs.
- @param user_id: User id
+ @param user_id: Changed value of User id
@return: dictionary of value. which put value in email and availability fields.
"""
@@ -498,24 +511,27 @@ property or property parameter."),
return {'value': {'email': user.address_id.email, 'availability':user.availability}}
def do_tentative(self, cr, uid, ids, context=None, *args):
- """ @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of calendar attendee’s IDs
- @param *args: Get Tupple value
- @param context: A standard dictionary for contextual values """
+ """ Makes event invitation as Tentative
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of calendar attendee’s IDs
+ @param *args: Get Tupple value
+ @param context: A standard dictionary for contextual values
+ """
self.write(cr, uid, ids, {'state': 'tentative'}, context)
def do_accept(self, cr, uid, ids, context=None, *args):
"""
- Update state which value is accepted.
+ Update state of invitation as Accepted and
+ if the invited user is other then event user it will make a copy of this event for invited user
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of calendar attendee’s IDs.
+ @param context: A standard dictionary for contextual values
@return: True
"""
-
if not context:
context = {}
@@ -532,21 +548,23 @@ property or property parameter."),
return True
def do_decline(self, cr, uid, ids, context=None, *args):
- """ @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of calendar attendee’s IDs
- @param *args: Get Tupple value
- @param context: A standard dictionary for contextual values """
+ """ Marks event invitation as Declined
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of calendar attendee’s IDs
+ @param *args: Get Tupple value
+ @param context: A standard dictionary for contextual values """
self.write(cr, uid, ids, {'state': 'declined'}, context)
def create(self, cr, uid, vals, context=None):
- """ @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param vals: Get Values
- @param context: A standard dictionary for contextual values """
+ """ Overrides orm create method.
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param vals: Get Values
+ @param context: A standard dictionary for contextual values """
if not context:
context = {}
@@ -561,8 +579,10 @@ property or property parameter."),
calendar_attendee()
class res_alarm(osv.osv):
+ """Resource Alarm """
_name = 'res.alarm'
_description = 'Basic Alarm Information'
+
_columns = {
'name':fields.char('Name', size=256, required=True),
'trigger_occurs': fields.selection([('before', 'Before'), \
@@ -590,17 +610,19 @@ true, it will allow you to hide the event alarm information without removing it.
'active': lambda *x: 1,
}
- def do_alarm_create(self, cr, uid, ids, model, date, context={}):
+ def do_alarm_create(self, cr, uid, ids, model, date, context=None):
"""
- Create Alarm for meeting.
+ Create Alarm for event.
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of res alarm’s IDs.
@param model: Model name.
+ @param date: Event date
@param context: A standard dictionary for contextual values
@return: True
"""
-
+ if not context:
+ context = {}
alarm_obj = self.pool.get('calendar.alarm')
ir_obj = self.pool.get('ir.model')
model_id = ir_obj.search(cr, uid, [('model', '=', model)])[0]
@@ -638,16 +660,17 @@ true, it will allow you to hide the event alarm information without removing it.
cr.commit()
return True
- def do_alarm_unlink(self, cr, uid, ids, model, context={}):
+ def do_alarm_unlink(self, cr, uid, ids, model, context=None):
"""
Delete alarm specified in ids
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of res alarm’s IDs.
- @param model: Model name.
+ @param model: Model name for which alarm is to be cleared.
@return: True
"""
-
+ if not context:
+ context = {}
alarm_obj = self.pool.get('calendar.alarm')
ir_obj = self.pool.get('ir.model')
model_id = ir_obj.search(cr, uid, [('model', '=', model)])[0]
@@ -670,51 +693,53 @@ class calendar_alarm(osv.osv):
__attribute__ = {}
_columns = {
- 'alarm_id': fields.many2one('res.alarm', 'Basic Alarm', ondelete='cascade'),
+ 'alarm_id': fields.many2one('res.alarm', 'Basic Alarm', ondelete='cascade'),
'name': fields.char('Summary', size=124, help="""Contains the text to be \
used as the message subject for email \
- or contains the text to be used for display"""),
+ or contains the text to be used for display"""),
'action': fields.selection([('audio', 'Audio'), ('display', 'Display'), \
('procedure', 'Procedure'), ('email', 'Email') ], 'Action', \
- required=True, help="Defines the action to be invoked when an alarm is triggered"),
+ required=True, help="Defines the action to be invoked when an alarm is triggered"),
'description': fields.text('Description', help='Provides a more complete \
description of the calendar component, than that \
- provided by the "SUMMARY" property'),
+ provided by the "SUMMARY" property'),
'attendee_ids': fields.many2many('calendar.attendee', 'alarm_attendee_rel', \
- 'alarm_id', 'attendee_id', 'Attendees', readonly=True),
+ 'alarm_id', 'attendee_id', 'Attendees', readonly=True),
'attach': fields.binary('Attachment', help="""* Points to a sound resource,\
which is rendered when the alarm is triggered for audio,
* File which is intended to be sent as message attachments for email,
* Points to a procedure resource, which is invoked when\
- the alarm is triggered for procedure."""),
- 'res_id': fields.integer('Resource ID'),
- 'model_id': fields.many2one('ir.model', 'Model'),
- 'user_id': fields.many2one('res.users', 'Owner'),
- 'event_date': fields.datetime('Event Date'),
- 'event_end_date': fields.datetime('Event End Date'),
- 'trigger_date': fields.datetime('Trigger Date', readonly="True"),
+ the alarm is triggered for procedure."""),
+ 'res_id': fields.integer('Resource ID'),
+ 'model_id': fields.many2one('ir.model', 'Model'),
+ 'user_id': fields.many2one('res.users', 'Owner'),
+ 'event_date': fields.datetime('Event Date'),
+ 'event_end_date': fields.datetime('Event End Date'),
+ 'trigger_date': fields.datetime('Trigger Date', readonly="True"),
'state':fields.selection([
- ('draft', 'Draft'),
- ('run', 'Run'),
- ('stop', 'Stop'),
- ('done', 'Done'),
- ], 'State', select=True, readonly=True),
+ ('draft', 'Draft'),
+ ('run', 'Run'),
+ ('stop', 'Stop'),
+ ('done', 'Done'),
+ ], 'State', select=True, readonly=True),
}
_defaults = {
'action': lambda *x: 'email',
'state': lambda *x: 'run',
}
- def create(self, cr, uid, vals, context={}):
+
+ def create(self, cr, uid, vals, context=None):
"""
- create new record.
+ Overrides orm create method.
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param vals: dictionary of fields value.{‘name_of_the_field’: value, ...}
@param context: A standard dictionary for contextual values
@return: new record id for calendar_alarm.
"""
-
+ if not context:
+ context = {}
event_date = vals.get('event_date', False)
if event_date:
dtstart = datetime.strptime(vals['event_date'], "%Y-%m-%d %H:%M:%S")
@@ -731,7 +756,7 @@ class calendar_alarm(osv.osv):
def do_run_scheduler(self, cr, uid, automatic=False, use_new_cursor=False, \
context=None):
- """
+ """Scheduler for event reminder
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -808,7 +833,7 @@ class calendar_event(osv.osv):
return [(x.lower(), x) for x in pytz.all_timezones]
def onchange_allday(self, cr, uid, ids, allday, context={}):
- """
+ """Sets duration as 24 Hours if event is selcted for all day
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -820,23 +845,23 @@ class calendar_event(osv.osv):
return {}
event = self.browse(cr, uid, ids, context=context)[0]
value = {
- 'date': event.date and event.date[:11] + '00:00:00',
- 'date_deadline': event.date_deadline and event.date_deadline[:11] + '00:00:00',
'duration': 24
}
return {'value': value}
- def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, allday=False, context={}):
- """
+ def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, allday=False, context=None):
+ """Returns duration and/or end date based on values passed
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of calendar event’s IDs.
- @param start_date: Get starting date
- @param duration: Get Duration between start date and end date or False
- @param end_date: Get Ending Date or False
+ @param start_date: Starting date
+ @param duration: Duration between start date and end date
+ @param end_date: Ending Datee
@param context: A standard dictionary for contextual values
"""
+ if not context:
+ context = {}
value = {}
if not start_date:
return value
@@ -845,10 +870,7 @@ class calendar_event(osv.osv):
value['duration'] = duration
if allday: # For all day event
- start = start_date[:11] + '00:00:00'
value = {
- 'date': start,
- 'date_deadline': start,
'duration': 24
}
return {'value': value}
@@ -865,15 +887,17 @@ class calendar_event(osv.osv):
return {'value': value}
- def _set_rrulestring(self, cr, uid, id, name, value, arg, context):
+ def _set_rrulestring(self, cr, uid, id, name, value, arg, context=None):
"""
- Set rule string.
+ Sets values of fields that defines event recurrence from the value of rrule string
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param id: List of calendar event's ids.
@param context: A standard dictionary for contextual values
@return: dictionary of rrule value.
"""
+ if not context:
+ context = {}
cr.execute("UPDATE %s set freq='None',interval=0,count=0,end_date=Null,\
mo=False,tu=False,we=False,th=False,fr=False,sa=False,su=False,\
day=0,select1='date',month_list=Null ,byday=Null where id=%s" % (self._table, id))
@@ -950,7 +974,7 @@ class calendar_event(osv.osv):
def _get_rulestring(self, cr, uid, ids, name, arg, context=None):
"""
- Get rule string.
+ Gets Recurrence rule string according to value type RECUR of iCalendar from the values given.
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param id: List of calendar event's ids.
@@ -968,7 +992,7 @@ class calendar_event(osv.osv):
raise osv.except_osv('Warning!', 'Interval can not be Negative')
if datas.get('count', 0) < 0:
raise osv.except_osv('Warning!', 'Count can not be Negative')
- rrule_custom = self.compute_rule_string(cr, uid, datas,\
+ rrule_custom = self.compute_rule_string(cr, uid, datas, \
context=context)
result[event] = rrule_custom
else:
@@ -986,8 +1010,8 @@ class calendar_event(osv.osv):
'duration': fields.float('Duration'),
'description': fields.text('Your action'),
'class': fields.selection([('public', 'Public'), ('private', 'Private'), \
- ('confidential', 'Confidential')], 'Mark as'),
- 'location': fields.char('Location', size=264, help="Location of Event"),
+ ('confidential', 'Confidential')], 'Mark as'),
+ 'location': fields.char('Location', size=264, help="Location of Event"),
'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], \
'Show as'),
'base_calendar_url': fields.char('Caldav URL', size=264),
@@ -1040,8 +1064,8 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
'month_list': fields.selection(months.items(), 'Month'),
'end_date': fields.date('Repeat Until'),
- 'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel',\
- 'event_id', 'attendee_id', 'Attendees'),
+ 'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel', \
+ 'event_id', 'attendee_id', 'Attendees'),
'allday': fields.boolean('All Day'),
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it.")
@@ -1088,7 +1112,7 @@ true, it will allow you to hide the event alarm information without removing it.
'view_mode': 'form,tree',
'res_model': 'calendar.event',
'view_id': False,
- 'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
+ 'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
'type': 'ir.actions.act_window',
'res_id': base_calendar_id2real_id(id),
'nodestroy': True
@@ -1097,15 +1121,15 @@ true, it will allow you to hide the event alarm information without removing it.
return value
def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args):
- """
+ """Modifies only one event record out of virtual recurrent events
+ and creates new event as a specific instance of a Recurring Event",
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
- @param event_id: Get Event_id
- @param real_date: Get Real Date
+ @param event_id: Id of Recurring Event
+ @param real_date: Date of event recurrence that is being modified
@param context: A standard dictionary for contextual values
- @param *args: Get Tuppel Value
-
+ @param *args: Get Tupple Value
"""
event_id = base_calendar_id2real_id(event_id)
@@ -1125,10 +1149,11 @@ true, it will allow you to hide the event alarm information without removing it.
def modify_all(self, cr, uid, event_ids, defaults, context=None, *args):
"""
- Modify name, date, date_deadline fields.
+ Modifies the recurring event
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param event_ids: List of crm meeting’s IDs.
+ @param context: A standard dictionary for contextual values
@return: True
"""
@@ -1150,7 +1175,8 @@ true, it will allow you to hide the event alarm information without removing it.
return True
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100):
- """
+ """Gives virtual event ids for recurring events based on value of Recurrence Rule
+ This method gives ids of dates that comes between start date and end date of calendar views
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -1232,12 +1258,13 @@ true, it will allow you to hide the event alarm information without removing it.
def compute_rule_string(self, cr, uid, datas, context=None, *args):
"""
- Compute rule string.
+ Compute rule string according to value type RECUR of iCalendar from the values given.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param datas: dictionary of freq and interval value.
- @return: string value which compute FREQILY;INTERVAL
+ @param context: A standard dictionary for contextual values
+ @return: String value of the format RECUR of iCalendar
"""
weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
@@ -1295,6 +1322,8 @@ true, it will allow you to hide the event alarm information without removing it.
@param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...].
@param offset: The Number of Results to Pass
@param limit: The Number of Results to Return
+ @param context: A standard dictionary for contextual values
+ @param count: If its True the method returns number of records instead of ids
@return: List of id
"""
args_without_date = []
@@ -1319,12 +1348,13 @@ true, it will allow you to hide the event alarm information without removing it.
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
"""
- Writes values in one or several fields.
+ Overrides orm write method.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of crm meeting's ids
@param vals: Dictionary of field value.
+ @param context: A standard dictionary for contextual values
@return: True
"""
if not context:
@@ -1364,6 +1394,7 @@ true, it will allow you to hide the event alarm information without removing it.
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of crm meeting's ids
+ @param context: A standard dictionary for contextual values
@return: the object list.
"""
if isinstance(ids, (str, int, long)):
@@ -1378,15 +1409,19 @@ true, it will allow you to hide the event alarm information without removing it.
return res
- def read(self, cr, uid, ids, fields=None, context={}, load='_classic_read'):
+ def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
"""
Overrides orm Read method.Read List of fields for calendar event.
@param cr: the current row, from the database cursor,
@param user: the current user’s ID for security checks,
@param ids: List of calendar event's id.
@param fields: List of fields.
+ @param context: A standard dictionary for contextual values
@return: List of Dictionary of form [{‘name_of_the_field’: value, ...}, ...]
"""
+ if not context:
+ context = {}
+
if isinstance(ids, (str, int, long)):
select = [ids]
else:
@@ -1408,14 +1443,17 @@ true, it will allow you to hide the event alarm information without removing it.
return result and result[0] or False
return result
- def copy(self, cr, uid, id, default=None, context={}):
+ def copy(self, cr, uid, id, default=None, context=None):
"""
Duplicate record on specified id.
@param self: the object pointer.
@param cr: the current row, from the database cursor,
@param id: id of record from which we duplicated.
+ @param context: A standard dictionary for contextual values
@return: Duplicate record id.
"""
+ if not context:
+ context = {}
res = super(calendar_event, self).copy(cr, uid, base_calendar_id2real_id(id), default, context)
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date')
@@ -1428,6 +1466,7 @@ true, it will allow you to hide the event alarm information without removing it.
@param self: the object pointer.
@param cr: the current row, from the database cursor,
@param id: List of calendar event's id.
+ @param context: A standard dictionary for contextual values
@return: True
"""
res = False
@@ -1454,15 +1493,18 @@ true, it will allow you to hide the event alarm information without removing it.
alarm_obj.do_alarm_unlink(cr, uid, ids, self._name)
return res
- def create(self, cr, uid, vals, context={}):
+ def create(self, cr, uid, vals, context=None):
"""
Create new record.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param vals: dictionary of every field value.
+ @param context: A standard dictionary for contextual values
@return: new created record id.
"""
+ if not context:
+ context = {}
res = super(calendar_event, self).create(cr, uid, vals, context)
alarm_obj = self.pool.get('res.alarm')
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date')
@@ -1582,7 +1624,7 @@ class ir_values(osv.osv):
return super(ir_values, self).set(cr, uid, key, key2, name, new_model, \
value, replace, isobject, meta, preserve_user, company)
- def get(self, cr, uid, key, key2, models, meta=False, context={}, \
+ def get(self, cr, uid, key, key2, models, meta=False, context=None, \
res_id_req=False, without_user=True, key2_req=True):
"""
Get IR Values
@@ -1591,7 +1633,8 @@ class ir_values(osv.osv):
@param uid: the current user’s ID for security checks,
@param model: Get The Model
"""
-
+ if not context:
+ context = {}
new_model = []
for data in models:
if type(data) in (list, tuple):
@@ -1607,17 +1650,18 @@ class ir_model(osv.osv):
_inherit = 'ir.model'
- def read(self, cr, uid, ids, fields=None, context={},
+ def read(self, cr, uid, ids, fields=None, context=None,
load='_classic_read'):
"""
- Read IR Model
+ Overrides orm read method.
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of IR Model’s IDs.
@param context: A standard dictionary for contextual values
"""
-
+ if not context:
+ context = {}
data = super(ir_model, self).read(cr, uid, ids, fields=fields, \
context=context, load=load)
if data:
@@ -1655,7 +1699,7 @@ class res_users(osv.osv):
def _get_user_avail(self, cr, uid, ids, context=None):
"""
- Get USer Availability
+ Get User Availability
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -1686,7 +1730,7 @@ class res_users(osv.osv):
def _get_user_avail_fun(self, cr, uid, ids, name, args, context=None):
"""
- Get USer Availability Function
+ Get User Availability Function
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@@ -1701,6 +1745,7 @@ class res_users(osv.osv):
selection=[('free', 'Free'), ('busy', 'Busy')], \
string='Free/Busy', method=True),
}
+
res_users()
diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml
index 0c8a52260ef..c8bba10ea16 100644
--- a/addons/base_calendar/base_calendar_view.xml
+++ b/addons/base_calendar/base_calendar_view.xml
@@ -77,6 +77,8 @@
+
+
@@ -99,6 +101,20 @@
+
+
+
+
+
+
+
+
+
@@ -138,9 +154,6 @@
-
-
-
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml
index 3286936b8a0..79a09055086 100644
--- a/addons/crm/crm_meeting_view.xml
+++ b/addons/crm/crm_meeting_view.xml
@@ -33,9 +33,9 @@
domain="[('object_id.model', '=', 'crm.meeting')]" />
+ on_change="onchange_dates(date,duration,False,allday)" />
+ on_change="onchange_dates(date,duration,False,allday)" />
From 742e72db26ce31186e75d422331bf55bcbe0742e Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 14 May 2010 16:45:34 +0530
Subject: [PATCH 112/148] [IMP]: crm: Removed side panel for create partner
from lead and phonecall
bzr revid: rpa@tinyerp.com-20100514111534-gunyidvylmkypu06
---
addons/crm/wizard/crm_lead_to_partner_view.xml | 15 +++++++++------
.../crm/wizard/crm_phonecall_to_partner_view.xml | 14 +++++++++-----
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/addons/crm/wizard/crm_lead_to_partner_view.xml b/addons/crm/wizard/crm_lead_to_partner_view.xml
index ee6c1522e22..2f7f8540e7f 100644
--- a/addons/crm/wizard/crm_lead_to_partner_view.xml
+++ b/addons/crm/wizard/crm_lead_to_partner_view.xml
@@ -42,12 +42,15 @@
-
-
+
+
+ Create a Partner
+ ir.actions.act_window
+ crm.lead2partner
+ form
+
+ new
+
diff --git a/addons/crm/wizard/crm_phonecall_to_partner_view.xml b/addons/crm/wizard/crm_phonecall_to_partner_view.xml
index 524384328f3..c7da406f687 100644
--- a/addons/crm/wizard/crm_phonecall_to_partner_view.xml
+++ b/addons/crm/wizard/crm_phonecall_to_partner_view.xml
@@ -43,11 +43,15 @@
-
+
+ Create a Partner
+ ir.actions.act_window
+ crm.phonecall2partner
+ form
+
+ new
+
+
From 5c1057024432c6edb8d80b6d34f7dd4c4399e990 Mon Sep 17 00:00:00 2001
From: "ksa (Open ERP)"
Date: Fri, 14 May 2010 17:03:09 +0530
Subject: [PATCH 113/148] [IMP] task-620 usability Improvement for sales menu
in crm ,sale,base_calendar,product
bzr revid: ksa@tinyerp.co.in-20100514113309-grkxy5795dzkf220
---
.../base_calendar_invite_attendee_view.xml | 11 +--
addons/crm/crm_lead.py | 36 ++++-----
addons/crm/crm_lead_view.xml | 4 +-
addons/crm/crm_meeting_menu.xml | 3 +-
addons/crm/crm_meeting_view.xml | 1 -
addons/crm/crm_opportunity.py | 77 +------------------
addons/crm/crm_opportunity_menu.xml | 20 ++---
addons/crm/crm_opportunity_view.xml | 2 -
addons/crm/crm_phonecall_menu.xml | 1 +
addons/crm/report/crm_lead_report_view.xml | 16 ++--
.../crm_partner_to_opportunity_view.xml | 3 +-
addons/product/product.py | 2 +-
addons/sale/sale.py | 3 +-
addons/sale/sale_view.xml | 6 ++
addons/sale/wizard/sale_line_invoice.xml | 15 ++--
.../sale/wizard/sale_make_invoice_advance.xml | 18 ++---
addons/sale_crm/sale_crm_view.xml | 2 +-
addons/sale_crm/wizard/makesale.py | 10 +--
18 files changed, 83 insertions(+), 147 deletions(-)
diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee_view.xml b/addons/base_calendar/wizard/base_calendar_invite_attendee_view.xml
index 4fe55998e59..bea5ea66a84 100644
--- a/addons/base_calendar/wizard/base_calendar_invite_attendee_view.xml
+++ b/addons/base_calendar/wizard/base_calendar_invite_attendee_view.xml
@@ -13,37 +13,38 @@
-
-
-
+ colspan="6" />
-
+
+
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 0b970da2bca..335c7a96906 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -74,7 +74,7 @@ class crm_lead(osv.osv, crm_case):
duration = float(ans.days)
if lead.section_id and lead.section_id.resource_calendar_id:
- duration = float(ans.days) * 24
+ duration = float(ans.days) * 24
new_dates = cal_obj.interval_get(cr,
uid,
lead.section_id.resource_calendar_id and lead.section_id.resource_calendar_id.id or False,
@@ -95,18 +95,18 @@ class crm_lead(osv.osv, crm_case):
_columns = {
# From crm.case
- 'email_from': fields.char('Email', size=128, help="These people will receive email."),
+ 'email_from': fields.char('Email', size=128, help="These people will receive email."),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help='Sales team to which Case belongs to.\
- Define Responsible user and Email account for mail gateway.'),
+ Define Responsible user and Email account for mail gateway.'),
'create_date': fields.datetime('Creation Date' , readonly=True),
'email_cc': fields.text('Watchers Emails', size=252 , help="These \
people will receive a copy of the future communication between partner \
and users by email"),
- 'description': fields.text('Description'),
- 'write_date': fields.datetime('Update Date' , readonly=True),
+ 'description': fields.text('Description'),
+ 'write_date': fields.datetime('Update Date' , readonly=True),
- # Lead fields
+ # Lead fields
'categ_id': fields.many2one('crm.case.categ', 'Lead Source', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]"),
@@ -117,34 +117,34 @@ and users by email"),
'type':fields.selection([
('lead','Lead'),
('opportunity','Opportunity'),
-
- ],'Type', help="Type is used to separate Leads and Opportunities"),
+
+ ],'Type', help="Type is used to separate Leads and Opportunities"),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'date_closed': fields.datetime('Closed', readonly=True),
'stage_id': fields.many2one('crm.case.stage', 'Stage', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]"),
- 'user_id': fields.many2one('res.users', 'Salesman'),
+ 'user_id': fields.many2one('res.users', 'Salesman',help='By Default Salesman is Administrator when create New User'),
'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True),
'day_open': fields.function(_compute_day, string='Days to Open', \
method=True, multi='day_open', type="float", store=True),
'day_close': fields.function(_compute_day, string='Days to Close', \
method=True, multi='day_close', type="float", store=True),
- 'function_name': fields.char('Function', size=64),
- 'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
+ 'function_name': fields.char('Function', size=64),
+ 'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
- \nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
+ \nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
}
_defaults = {
- 'active': lambda *a: 1,
- 'user_id': crm_case._get_default_user,
- 'email_from': crm_case._get_default_email,
- 'state': lambda *a: 'draft',
- 'section_id': crm_case._get_section,
+ 'active': lambda *a: 1,
+ 'user_id': crm_case._get_default_user,
+ 'email_from': crm_case._get_default_email,
+ 'state': lambda *a: 'draft',
+ 'section_id': crm_case._get_section,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
}
@@ -160,7 +160,7 @@ and users by email"),
res = super(crm_lead, self).case_open(cr, uid, ids, *args)
self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
return res
-
+
def case_close(self, cr, uid, ids, *args):
"""Overrides close for crm_case for setting close date
@param self: The object pointer
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index aaca747e594..f521f734b1f 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -47,7 +47,7 @@
name="convert_opportunity"
string="Convert"
help="Convert to Opportunity"
- icon="gtk-index"
+ icon="gtk-index"
type="object"/>
-
+
+ sequence="10" action="action_view_attendee_form"
+ groups="base.group_extended" />
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml
index a2a47ca7d10..0eae9554f7d 100644
--- a/addons/crm/crm_meeting_view.xml
+++ b/addons/crm/crm_meeting_view.xml
@@ -217,7 +217,6 @@
-
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
index 68b4351aa9a..22eb2e62d0d 100644
--- a/addons/crm/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -40,81 +40,12 @@ class crm_opportunity(osv.osv):
_name = "crm.lead"
_description = "Opportunity Cases"
_order = "priority,date_action,id desc"
-
- def case_open(self, cr, uid, ids, *args):
- """
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of case's Ids
- @param *args: Give Tuple Value
- """
-
- res = super(crm_opportunity, self).case_open(cr, uid, ids, *args)
- self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
- return res
-
- def _compute_day(self, cr, uid, ids, fields, args, context={}):
- """
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Openday’s IDs
- @return: difference between current date and log date
- @param context: A standard dictionary for contextual values
- """
- cal_obj = self.pool.get('resource.calendar')
- res_obj = self.pool.get('resource.resource')
-
- res = {}
- for opportunity in self.browse(cr, uid, ids , context):
- for field in fields:
- res[opportunity.id] = {}
- duration = 0
- ans = False
- if field == 'day_open':
- if opportunity.date_open:
- date_create = datetime.strptime(opportunity.create_date, "%Y-%m-%d %H:%M:%S")
- date_open = datetime.strptime(opportunity.date_open, "%Y-%m-%d %H:%M:%S")
- ans = date_open - date_create
- date_until = opportunity.date_open
- elif field == 'day_close':
- if opportunity.date_closed:
- date_create = datetime.strptime(opportunity.create_date, "%Y-%m-%d %H:%M:%S")
- date_close = datetime.strptime(opportunity.date_closed, "%Y-%m-%d %H:%M:%S")
- date_until = opportunity.date_closed
- ans = date_close - date_create
- if ans:
- resource_id = False
- if opportunity.user_id:
- resource_ids = res_obj.search(cr, uid, [('user_id','=',opportunity.user_id.id)])
- if resource_ids and len(resource_ids):
- resource_id = resource_ids[0]
-
- duration = float(ans.days)
- if opportunity.section_id and opportunity.section_id.resource_calendar_id:
- duration = float(ans.days) * 24
- new_dates = cal_obj.interval_get(cr,
- uid,
- opportunity.section_id.resource_calendar_id and opportunity.section_id.resource_calendar_id.id or False,
- mx.DateTime.strptime(opportunity.create_date, '%Y-%m-%d %H:%M:%S'),
- duration,
- resource=resource_id
- )
- no_days = []
- date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
- for in_time, out_time in new_dates:
- if in_time.date not in no_days:
- no_days.append(in_time.date)
- if out_time > date_until:
- break
- duration = len(no_days)
- res[opportunity.id][field] = abs(int(duration))
- return res
+ _inherit = 'crm.lead'
_columns = {
# From crm.case
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
- domain="[('partner_id','=',partner_id)]"),
+ domain="[('partner_id','=',partner_id)]"),
# Opportunity fields
'probability': fields.float('Probability (%)'),
@@ -125,7 +56,7 @@ class crm_opportunity(osv.osv):
'date_deadline': fields.date('Expected Closing'),
'date_action': fields.date('Next Action'),
}
-
+
def case_close(self, cr, uid, ids, *args):
"""Overrides close for crm_case for setting probability and close date
@param self: The object pointer
@@ -149,7 +80,7 @@ class crm_opportunity(osv.osv):
res = super(crm_opportunity, self).case_cancel(cr, uid, ids, args)
self.write(cr, uid, ids, {'probability' : 0.0})
return res
-
+
def case_open(self, cr, uid, ids, *args):
"""Overrides cancel for crm_case for setting Open Date
@param self: The object pointer
diff --git a/addons/crm/crm_opportunity_menu.xml b/addons/crm/crm_opportunity_menu.xml
index cfce1a6aa9a..9d1ccf15258 100644
--- a/addons/crm/crm_opportunity_menu.xml
+++ b/addons/crm/crm_opportunity_menu.xml
@@ -2,16 +2,6 @@
-
-
+
+
Opportunities
crm.lead
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index d4d6864c43b..d40276a05df 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -315,8 +315,6 @@
domain="[]" context="{'group_by':'categ_id'}" />
-
diff --git a/addons/crm/crm_phonecall_menu.xml b/addons/crm/crm_phonecall_menu.xml
index 916cd5f64f3..89a31d41e10 100644
--- a/addons/crm/crm_phonecall_menu.xml
+++ b/addons/crm/crm_phonecall_menu.xml
@@ -10,6 +10,7 @@
view_mode="calendar,tree,form"
context="{'default_partner_id': active_id, 'default_duration': 1.0}"
domain="[('partner_id', '=', active_id)]"
+ groups="base.group_extended"
/>
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index 78a5ffa34c8..c1d64ee332c 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -63,7 +63,7 @@
-
+
crm.lead.report.select
crm.lead.report
@@ -119,7 +119,7 @@
-
+
@@ -144,14 +144,14 @@
-
+
-
+
@@ -180,9 +180,9 @@
-
+
-
+
@@ -220,7 +220,7 @@
-
+
Opportunities
crm.lead.report
@@ -244,7 +244,7 @@
-
+
diff --git a/addons/crm/wizard/crm_partner_to_opportunity_view.xml b/addons/crm/wizard/crm_partner_to_opportunity_view.xml
index 41c32a9fa42..7bda631e032 100644
--- a/addons/crm/wizard/crm_partner_to_opportunity_view.xml
+++ b/addons/crm/wizard/crm_partner_to_opportunity_view.xml
@@ -39,7 +39,8 @@
key2="client_action_multi" name="Create Opportunity"
res_model="crm.partner2opportunity" src_model="res.partner"
view_id="view_crm_lead2partner_create"
- view_mode="form" target="new" view_type="form" />
+ view_mode="form" target="new" view_type="form"
+ groups="base.group_extended"/>
diff --git a/addons/product/product.py b/addons/product/product.py
index 6ccabcb97a2..cd212867c55 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -446,7 +446,7 @@ class product_product(osv.osv):
'outgoing_qty': fields.function(_product_outgoing_qty, method=True, type='float', string='Outgoing'),
'price': fields.function(_product_price, method=True, type='float', string='Pricelist', digits_compute=dp.get_precision('Sale Price')),
'lst_price' : fields.function(_product_lst_price, method=True, type='float', string='List Price', digits_compute=dp.get_precision('Sale Price')),
- 'code': fields.function(_product_code, method=True, type='char', string='Code'),
+ 'code': fields.function(_product_code, method=True, type='char', string='Reference'),
'partner_ref' : fields.function(_product_partner_ref, method=True, type='char', string='Customer ref'),
'default_code' : fields.char('Reference', size=64),
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the product without removing it."),
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 718f29f12d7..2a482538553 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -49,7 +49,6 @@ def _incoterm_get(self, cr, uid, context=None):
cr.execute('select code, code||\', \'||name from stock_incoterms where active')
return cr.fetchall()
-
class sale_order(osv.osv):
_name = "sale.order"
_description = "Sale Order"
@@ -1043,7 +1042,7 @@ class sale_order_line(osv.osv):
if product_obj.uos_id.category_id.id != uos2.category_id.id:
uos = False
else:
- uos = False
+ uos = False
if product_obj.description_sale:
result['notes'] = product_obj.description_sale
fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 894ff6b2e6c..f57c20ad7c4 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -193,6 +193,7 @@
+
@@ -384,6 +385,11 @@
+
-
+
+ Make Invoices
+ ir.actions.act_window
+ sale.order.line.make.invoice
+ form
+ form
+ new
+
diff --git a/addons/sale/wizard/sale_make_invoice_advance.xml b/addons/sale/wizard/sale_make_invoice_advance.xml
index 5fc8b993921..00636c9d7ae 100644
--- a/addons/sale/wizard/sale_make_invoice_advance.xml
+++ b/addons/sale/wizard/sale_make_invoice_advance.xml
@@ -1,4 +1,3 @@
-
@@ -20,15 +19,14 @@
-
-
-
+
+ Advance Invoice
+ ir.actions.act_window
+ sale.advance.payment.inv
+ form
+ form
+ new
+
Open Invoice
diff --git a/addons/sale_crm/sale_crm_view.xml b/addons/sale_crm/sale_crm_view.xml
index 7660dcc5cd2..bc23b1b84a2 100644
--- a/addons/sale_crm/sale_crm_view.xml
+++ b/addons/sale_crm/sale_crm_view.xml
@@ -9,7 +9,7 @@
-
+
diff --git a/addons/sale_crm/wizard/makesale.py b/addons/sale_crm/wizard/makesale.py
index 780634e62e4..0d8d4a766b0 100644
--- a/addons/sale_crm/wizard/makesale.py
+++ b/addons/sale_crm/wizard/makesale.py
@@ -28,7 +28,7 @@ import pooler
from tools.translate import _
sale_form = """
-
+
@@ -130,10 +130,10 @@ class make_sale(wizard.interface):
if data['form']['close']:
case_obj.case_close(cr, uid, data['ids'])
-
+
if not new_ids:
return {}
-
+
if len(new_ids)<=1:
value = {
'domain': str([('id', 'in', new_ids)]),
@@ -154,14 +154,14 @@ class make_sale(wizard.interface):
'type': 'ir.actions.act_window',
'res_id':new_ids
}
-
+
return value
states = {
'init': {
'actions': [_selectPartner],
'result': {'type': 'form', 'arch': sale_form, 'fields': sale_fields,
- 'state' : [('end', 'Cancel', 'gtk-cancel'),('order', 'Create Quote', 'gtk-go-forward')]}
+ 'state' : [('end', 'Cancel', 'gtk-cancel'),('order', 'Create', 'gtk-go-forward')]}
},
'order': {
'actions': [],
From 57bdcdc4c97eae0ca16bcefb2c6fab976a97e3cc Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 14 May 2010 17:35:27 +0530
Subject: [PATCH 114/148] [IMP]: base_calendar, caldav: Minor code improvements
bzr revid: rpa@tinyerp.com-20100514120527-xz24fzwkqiw9xhe9
---
addons/base_calendar/base_calendar_view.xml | 19 ++++++++++++++++---
addons/caldav/wizard/calendar_event_import.py | 16 ++++++++--------
2 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml
index c8bba10ea16..d31266c9090 100644
--- a/addons/base_calendar/base_calendar_view.xml
+++ b/addons/base_calendar/base_calendar_view.xml
@@ -1,6 +1,8 @@
+
+
calendar.attendee.form
@@ -65,6 +67,8 @@
+
+
calendar.attendee.tree
@@ -82,7 +86,9 @@
-
+
+
+
calendar.attendee.search
calendar.attendee
@@ -119,7 +125,8 @@
-
+
+
Event Invitations
ir.actions.act_window
@@ -131,10 +138,12 @@
+
+
@@ -175,7 +184,8 @@
-
+
+
Available Alarms
ir.actions.act_window
@@ -183,6 +193,8 @@
form
tree,form
+
+
-
-
+
+
From 97fdadcffa0299aac77255f24546425c26bb8aaf Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 14 May 2010 18:26:47 +0530
Subject: [PATCH 116/148] [FIX]: document_ics: Fixed document ics data
according to crm changes
bzr revid: rpa@tinyerp.com-20100514125647-57vbkumn9dgwd1b6
---
addons/document/document_view.xml | 4 ++--
addons/document_ics/document_demo.xml | 12 ++++++------
addons/document_ics/document_view.xml | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/addons/document/document_view.xml b/addons/document/document_view.xml
index 720ab6de69f..0210af40c1a 100644
--- a/addons/document/document_view.xml
+++ b/addons/document/document_view.xml
@@ -77,7 +77,7 @@
-
+
@@ -86,7 +86,7 @@
-
+
diff --git a/addons/document_ics/document_demo.xml b/addons/document_ics/document_demo.xml
index 06c72022fe7..a0e35563857 100644
--- a/addons/document_ics/document_demo.xml
+++ b/addons/document_ics/document_demo.xml
@@ -23,32 +23,32 @@
dtstart
-
+
dtend
-
+
summary
-
+
uid
-
+
description
-
+
url
-
+
diff --git a/addons/document_ics/document_view.xml b/addons/document_ics/document_view.xml
index 0cbfb6f81e2..39b6908dc76 100644
--- a/addons/document_ics/document_view.xml
+++ b/addons/document_ics/document_view.xml
@@ -45,7 +45,7 @@
form
-
+
From 73ca8140dbbb0e068ef0cd66f71c35b20f203b4b Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 14 May 2010 19:32:17 +0530
Subject: [PATCH 117/148] [IMP]: crm: Put name as required in opportunity form
view
bzr revid: rpa@tinyerp.com-20100514140217-k51eu45gwz3pq0s3
---
addons/crm/crm_opportunity_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index edf10eaae18..7133908833e 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -56,7 +56,7 @@
-
+
Date: Mon, 17 May 2010 17:17:06 +0530
Subject: [PATCH 118/148] [FIX]: base_contact: Fixed wrong widget in view
bzr revid: rpa@tinyerp.com-20100517114706-lskir1nbjbgdv57h
---
addons/base_contact/base_contact_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/base_contact/base_contact_view.xml b/addons/base_contact/base_contact_view.xml
index 9019691c00d..49147fb2112 100644
--- a/addons/base_contact/base_contact_view.xml
+++ b/addons/base_contact/base_contact_view.xml
@@ -136,8 +136,8 @@
-
-
+
+
From c3c3e539f887780650f726937cab333c4e5490a7 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Mon, 17 May 2010 19:01:14 +0530
Subject: [PATCH 119/148] [IMP, FIX]: event: Improvement in event modules for:
* Removed dependency on crm.case as it is removed * Fixes in
event/registration computation as per ner changes * Improvement in wizard
bzr revid: rpa@tinyerp.com-20100517133114-jjp82khn32m5zvjr
---
addons/event/event.py | 339 ++++++++----------
addons/event/event_view.xml | 41 ++-
addons/event/security/event_security.xml | 4 +-
.../wizard/event_confirm_registration.py | 12 +-
addons/event/wizard/event_registration.py | 4 +-
5 files changed, 177 insertions(+), 223 deletions(-)
diff --git a/addons/event/event.py b/addons/event/event.py
index ffdeb84d15d..abe3ea6dcd9 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -27,23 +27,12 @@ import tools
from tools.translate import _
from crm import crm
-class crm_case_log(osv.osv):
- _inherit = 'crm.case.log'
- _description = 'crm.case.log'
- def create(self, cr, uid, vals, *args, **kwargs):
- if not 'name' in vals:
- vals['name']='Historize'
- return super(osv.osv,self).create(cr, uid, vals, *args, **kwargs)
- _defaults = {
- 'user_id': lambda self,cr,uid,context: uid,
- }
-crm_case_log()
class event_type(osv.osv):
_name = 'event.type'
_description= 'Event type'
_columns = {
- 'name': fields.char('Event type', size=64, required=True),
+ 'name': fields.char('Event type', size=64, required=True),
}
event_type()
@@ -54,58 +43,53 @@ class event(osv.osv):
_order = 'date_begin'
def copy(self, cr, uid, id, default=None, context=None):
- return super(event, self).copy(cr, uid,id, default={'code': self.pool.get('ir.sequence').get(cr, uid, 'event.event'),'state':'draft'})
+ return super(event, self).copy(cr, uid, id, default={'code': self.pool.get('ir.sequence').get(cr, uid, 'event.event'), 'state': 'draft'})
def button_draft(self, cr, uid, ids, context={}):
- return self.write(cr, uid, ids, {'state':'draft'})
+ return self.write(cr, uid, ids, {'state': 'draft'})
def button_cancel(self, cr, uid, ids, context={}):
- return self.write(cr, uid, ids, {'state':'cancel'})
+ return self.write(cr, uid, ids, {'state': 'cancel'})
def button_done(self, cr, uid, ids, context={}):
- return self.write(cr, uid, ids, {'state':'done'})
+ return self.write(cr, uid, ids, {'state': 'done'})
def button_confirm(self, cr, uid, ids, context={}):
for eve in self.browse(cr, uid, ids):
if eve.mail_auto_confirm:
#send reminder that will confirm the event for all the people that were already confirmed
- reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id','=',eve.id),('state','not in',['draft','cancel'])])
+ reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id', '=', eve.id), ('state', 'not in', ['draft', 'cancel'])])
if reg_ids:
self.pool.get('event.registration').mail_user_confirm(cr, uid, reg_ids)
- return self.write(cr, uid, ids, {'state':'confirm'})
+ return self.write(cr, uid, ids, {'state': 'confirm'})
def _get_register(self, cr, uid, ids, name, args, context=None):
res={}
for event in self.browse(cr, uid, ids, context):
- query = """select sum(nb_register) from crm_case c left join crm_case_section s on (c.section_id=s.id) right join event_event e on (e.section_id=s.id) right join event_registration r on (r.case_id=c.id) where e.section_id = %s and c.state in ('open','done')"""
- cr.execute(query,(event.section_id.id,))
+ res[event.id] = {}
+ state = 'draft'
+ if name[0] == 'register_current':
+ state = 'open'
+ query = """SELECT sum(r.nb_register)
+ from event_registration r
+ where state=%s and event_id=%s"""
+
+ cr.execute(query, (state, event.id, ))
res2 = cr.fetchone()
if res2 and res2[0]:
- res[event.id] = res2[0]
+ res[event.id][name[0]] = res2[0]
else:
- res[event.id] = 0
+ res[event.id][name[0]] = 0
return res
- def _get_prospect(self, cr, uid, ids, name, args, context=None):
- res={}
- for event in self.browse(cr, uid, ids, context):
- query = """select sum(nb_register) from crm_case c left join crm_case_section s on (c.section_id=s.id) right join event_event e on (e.section_id=s.id) right join event_registration r on (r.case_id=c.id) where e.section_id = %s and c.state = 'draft'"""
- cr.execute(query,(event.section_id.id,))
- res2 = cr.fetchone()
- if res2 and res2[0]:
- res[event.id] = res2[0]
- else:
- res[event.id] = 0
- return res
-
- def write(self, cr, uid, ids,vals, *args, **kwargs):
- res = super(event,self).write(cr, uid, ids,vals, *args, **kwargs)
+ def write(self, cr, uid, ids, vals, *args, **kwargs):
+ res = super(event, self).write(cr, uid, ids, vals, *args, **kwargs)
if 'date_begin' in vals and vals['date_begin']:
for eve in self.browse(cr, uid, ids):
#change the deadlines of the registration linked to this event
- reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id','=',eve.id)])
+ reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id', '=', eve.id)])
if reg_ids:
- self.pool.get('event.registration').write(cr, uid, reg_ids, {'date_deadline':vals['date_begin']})
+ self.pool.get('event.registration').write(cr, uid, reg_ids, {'date_deadline': vals['date_begin']})
#change the description of the registration linked to this event
if 'mail_auto_confirm' in vals:
@@ -117,36 +101,36 @@ class event(osv.osv):
vals['mail_confirm']=False
if 'mail_confirm' in vals:
for eve in self.browse(cr, uid, ids):
- reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id','=',eve.id)])
+ reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id', '=', eve.id)])
if reg_ids:
- self.pool.get('event.registration').write(cr, uid, reg_ids, {'description':vals['mail_confirm']})
+ self.pool.get('event.registration').write(cr, uid, reg_ids, {'description': vals['mail_confirm']})
return res
_columns = {
- 'type': fields.many2one('event.type', 'Type'),
- 'section_id': fields.many2one('crm.case.section', 'Case section', required=True),
- 'register_max': fields.integer('Maximum Registrations'),
- 'register_min': fields.integer('Minimum Registrations'),
- 'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations'),
- 'register_prospect': fields.function(_get_prospect, method=True, string='Unconfirmed Registrations'),
- 'date_begin': fields.datetime('Beginning date', required=True),
- 'date_end': fields.datetime('Ending date', required=True),
- 'state': fields.selection([('draft','Draft'),('confirm','Confirmed'),('done','Done'),('cancel','Cancelled')], 'State', readonly=True, required=True,
+ 'type': fields.many2one('event.type', 'Type'),
+ 'section_id': fields.many2one('crm.case.section', 'Case section', required=True),
+ 'register_max': fields.integer('Maximum Registrations'),
+ 'register_min': fields.integer('Minimum Registrations'),
+ 'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations', multi='register_current'),
+ 'register_prospect': fields.function(_get_register, method=True, string='Unconfirmed Registrations', multi='register_prospect'),
+ 'date_begin': fields.datetime('Beginning date', required=True),
+ 'date_end': fields.datetime('Ending date', required=True),
+ 'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, required=True,
help='If event is created, the state is \'Draft\'.\n If event is confirmed for the particular dates the state is set to \'Confirmed\'.\
- \nIf the event is over, the state is set to \'Done\'.\n If event is cancelled the state is set to \'Cancelled\'.'),
- 'mail_auto_registr':fields.boolean('Mail Auto Register',help='Check this box if you want to use the automatic mailing for new registration'),
- 'mail_auto_confirm':fields.boolean('Mail Auto Confirm',help='Check this box if you want ot use the automatic confirmation emailing or the reminder'),
- 'mail_registr':fields.text('Registration Email',help='This email will be sent when someone subscribes to the event.'),
- 'mail_confirm': fields.text('Confirmation Email', help="This email will be sent when the event gets confimed or when someone subscribes to a confirmed event. This is also the email sent to remind someone about the event."),
- 'product_id':fields.many2one('product.product','Product', required=True),
+ \nIf the event is over, the state is set to \'Done\'.\n If event is cancelled the state is set to \'Cancelled\'.'),
+ 'mail_auto_registr': fields.boolean('Mail Auto Register', help='Check this box if you want to use the automatic mailing for new registration'),
+ 'mail_auto_confirm': fields.boolean('Mail Auto Confirm', help='Check this box if you want ot use the automatic confirmation emailing or the reminder'),
+ 'mail_registr': fields.text('Registration Email', help='This email will be sent when someone subscribes to the event.'),
+ 'mail_confirm': fields.text('Confirmation Email', help="This email will be sent when the event gets confimed or when someone subscribes to a confirmed event. This is also the email sent to remind someone about the event."),
+ 'product_id': fields.many2one('product.product', 'Product', required=True),
}
_defaults = {
- 'state': lambda *args: 'draft',
- 'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'event.event'),
- 'user_id': lambda self,cr,uid,ctx: uid,
-
+ 'state': lambda *args: 'draft',
+ 'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'event.event'),
+ 'user_id': lambda self, cr, uid, ctx: uid,
}
+
event()
class event_registration(osv.osv):
@@ -156,48 +140,45 @@ class event_registration(osv.osv):
current_registration = self.browse(cr, uid, [ids[0]])[0]
total_confirmed = current_registration.event_id.register_current + current_registration.nb_register
if total_confirmed <= current_registration.event_id.register_max or current_registration.event_id.register_max == 0:
- self.write(cr, uid, [ids[0]], {'state':'open'}, context=context)
+ self.write(cr, uid, [ids[0]], {'state': 'open'}, context=context)
self._history(cr, uid, [ids[0]], 'Open', history=True)
self.mail_user(cr, uid, [ids[0]])
return True
else:
- model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_event_confirm_registration')], context=context)
+ model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'), ('name', '=', 'view_event_confirm_registration')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
context.update({'reg_id': ids[0]})
return {
- 'name': _('Confirm Registration'),
- 'context': context,
- 'view_type': 'form',
- 'view_mode': 'tree,form',
- 'res_model': 'event.confirm.registration',
- 'views': [(resource_id,'form')],
- 'type': 'ir.actions.act_window',
- 'target': 'new',
+ 'name': _('Confirm Registration'),
+ 'context': context,
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'event.confirm.registration',
+ 'views': [(resource_id, 'form')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
'nodestroy': True
}
- def _history(self, cr, uid,ids,keyword, history=False, email=False, context={}):
+ def _history(self, cr, uid, ids, keyword, history=False, email=False, context={}):
for case in self.browse(cr, uid, ids):
- if not case.case_id:
- return True
data = {
- 'name': keyword,
- 'som': case.som.id,
- 'canal_id': case.canal_id.id,
- 'user_id': uid,
- 'case_id': case.case_id.id
+ 'name': keyword,
+ 'som': case.som.id,
+ 'canal_id': case.canal_id.id,
+ 'user_id': uid,
}
- obj = self.pool.get('crm.case.log')
- obj.create(cr, uid, data, context)
+ obj = self.pool.get('mailgate.message')
+ obj.create(cr, uid, data, context=context)
return True
def button_reg_close(self, cr, uid, ids, *args):
- self.write(cr, uid, ids, {'state':'done',})
+ self.write(cr, uid, ids, {'state': 'done', })
self._history(cr, uid, ids, 'Done', history=True)
return True
def button_reg_cancel(self, cr, uid, ids, *args):
- self.write(cr, uid, ids, {'state':'cancel',})
+ self.write(cr, uid, ids, {'state': 'cancel', })
self._history(cr, uid, ids, 'Cancel', history=True)
return True
@@ -207,7 +188,7 @@ class event_registration(osv.osv):
args[0]['date_deadline']= event.date_begin
args[0]['description']= event.mail_confirm
res = super(event_registration, self).create(cr, uid, *args, **argv)
- self._history(cr, uid,[res], 'Created', history=True)
+ self._history(cr, uid, [res], 'Created', history=True)
return res
def write(self, cr, uid, *args, **argv):
@@ -218,21 +199,21 @@ class event_registration(osv.osv):
args[1]['description']= event.mail_confirm
return super(event_registration, self).write(cr, uid, *args, **argv)
- def mail_user_confirm(self,cr,uid,ids):
- reg_ids=self.browse(cr,uid,ids)
+ def mail_user_confirm(self, cr, uid, ids):
+ reg_ids=self.browse(cr, uid, ids)
for reg_id in reg_ids:
src = reg_id.event_id.reply_to or False
dest = [reg_id.email_from]
if reg_id.email_cc:
dest += [reg_id.email_cc]
if dest and src:
- tools.email_send(src, dest,'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, openobject_id = str(reg_id.case_id.id))
+ tools.email_send(src, dest, 'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, openobject_id = str(reg_id.id))
if not src:
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
return False
- def mail_user(self,cr,uid,ids):
- reg_ids=self.browse(cr,uid,ids)
+ def mail_user(self, cr, uid, ids):
+ reg_ids=self.browse(cr, uid, ids)
for reg_id in reg_ids:
src = reg_id.event_id.reply_to or False
dest = [reg_id.email_from]
@@ -240,49 +221,50 @@ class event_registration(osv.osv):
dest += [reg_id.email_cc]
if reg_id.event_id.mail_auto_confirm or reg_id.event_id.mail_auto_registr:
if dest and src:
- if reg_id.event_id.state in ['draft', 'fixed', 'open','confirm','running'] and reg_id.event_id.mail_auto_registr:
- tools.email_send(src, dest,'Auto Registration: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_registr, openobject_id = str(reg_id.case_id.id))
- if (reg_id.event_id.state in ['confirm','running']) and reg_id.event_id.mail_auto_confirm:
- tools.email_send(src, dest,'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, openobject_id = str(reg_id.case_id.id))
+ if reg_id.event_id.state in ['draft', 'fixed', 'open', 'confirm', 'running'] and reg_id.event_id.mail_auto_registr:
+ tools.email_send(src, dest, 'Auto Registration: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_registr, openobject_id = str(reg_id.id))
+ if (reg_id.event_id.state in ['confirm', 'running']) and reg_id.event_id.mail_auto_confirm:
+ tools.email_send(src, dest, 'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, openobject_id = str(reg_id.id))
if not src:
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
return False
def _create_invoice_lines(self, cr, uid, ids, vals):
- return self.pool.get('account.invoice.line').create(cr, uid,vals )
+ return self.pool.get('account.invoice.line').create(cr, uid, vals)
_name= 'event.registration'
_description = 'Event Registration'
- _inherits = {'crm.case': 'case_id'}
+ _inherit = 'crm.meeting'
+
_columns = {
- 'case_id':fields.many2one('crm.case','Case'),
- 'nb_register': fields.integer('Number of Registration', readonly=True, states={'draft':[('readonly',False)]}),
- 'event_id':fields.many2one('event.event', 'Event Related', required=True),
- "partner_invoice_id":fields.many2one('res.partner', 'Partner Invoiced'),
- "contact_id":fields.many2one('res.partner.contact', 'Partner Contact'), #TODO: filter only the contacts that have a function into the selected partner_id
- "unit_price": fields.float('Unit Price'),
- "badge_title":fields.char('Badge Title',size=128),
- "badge_name":fields.char('Badge Name',size=128),
- "badge_partner":fields.char('Badge Partner',size=128),
- "invoice_label":fields.char("Label Invoice",size=128,required=True),
- "tobe_invoiced":fields.boolean("To be Invoiced"),
- "invoice_id":fields.many2one("account.invoice","Invoice"),
- 'date_closed': fields.datetime('Closed', readonly=True),
- 'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
- 'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
- 'categ_id': fields.many2one('crm.case.categ','Category', domain="[('section_id','=',section_id)]"),
- 'canal_id': fields.many2one('res.partner.canal', 'Channel',help="The channels represent the different communication modes available with the customer." \
- " With each commercial opportunity, you can indicate the canall which is this opportunity source."),
+ 'email_cc': fields.text('Watchers Emails', size=252 , help="These \
+people will receive a copy of the future communication between partner \
+and users by email"),
+ 'nb_register': fields.integer('Number of Registration', readonly=True, states={'draft': [('readonly', False)]}),
+ 'event_id': fields.many2one('event.event', 'Event Related', required=True),
+ "partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced'),
+ "contact_id": fields.many2one('res.partner.contact', 'Partner Contact'), #TODO: filter only the contacts that have a function into the selected partner_id
+ "unit_price": fields.float('Unit Price'),
+ "badge_title": fields.char('Badge Title', size=128),
+ "badge_name": fields.char('Badge Name', size=128),
+ "badge_partner": fields.char('Badge Partner', size=128),
+ "invoice_label": fields.char("Label Invoice", size=128, required=True),
+ "tobe_invoiced": fields.boolean("To be Invoiced"),
+ "invoice_id": fields.many2one("account.invoice", "Invoice"),
+ 'date_closed': fields.datetime('Closed', readonly=True),
+ 'ref': fields.reference('Reference', selection=crm._links_get, size=128),
+ 'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
+ 'canal_id': fields.many2one('res.partner.canal', 'Channel', help="The channels represent the different communication modes available with the customer." \
+ " With each commercial opportunity, you can indicate the canall which is this opportunity source."),
'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
"the partner mentality in relation to our services.The scale has" \
- "to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
-
+ "to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
}
+
_defaults = {
- 'nb_register': lambda *a: 1,
- 'tobe_invoiced' : lambda *a: True,
- 'name': lambda *a: 'Registration',
- 'state': lambda *b: 'draft'
+ 'nb_register': lambda *a: 1,
+ 'tobe_invoiced': lambda *a: True,
+ 'name': lambda *a: 'Registration',
}
def onchange_badge_name(self, cr, uid, ids, badge_name):
@@ -290,7 +272,7 @@ class event_registration(osv.osv):
if not badge_name:
return data
data['name'] = 'Registration: ' + badge_name
- return {'value':data}
+ return {'value': data}
def onchange_contact_id(self, cr, uid, ids, contact, partner):
data ={}
@@ -300,109 +282,76 @@ class event_registration(osv.osv):
data['badge_name'] = contact_id.name
data['badge_title'] = contact_id.title
if partner:
- partner_addresses = self.pool.get('res.partner.address').search(cr, uid, [('partner_id','=',partner)])
- job_ids = self.pool.get('res.partner.job').search(cr, uid, [('contact_id','=',contact),('address_id','in',partner_addresses)])
+ partner_addresses = self.pool.get('res.partner.address').search(cr, uid, [('partner_id', '=', partner)])
+ job_ids = self.pool.get('res.partner.job').search(cr, uid, [('contact_id', '=', contact), ('address_id', 'in', partner_addresses)])
if job_ids:
data['email_from'] = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0]).email
- d = self.onchange_badge_name(cr, uid, ids,data['badge_name'])
+ d = self.onchange_badge_name(cr, uid, ids, data['badge_name'])
data.update(d['value'])
- return {'value':data}
+ return {'value': data}
def onchange_event(self, cr, uid, ids, event_id, partner_invoice_id):
context={}
if not event_id:
- return {'value':{'unit_price' : False ,'invoice_label' : False }}
- data_event = self.pool.get('event.event').browse(cr,uid,event_id)
+ return {'value': {'unit_price': False , 'invoice_label': False }}
+ data_event = self.pool.get('event.event').browse(cr, uid, event_id)
if data_event.product_id:
if not partner_invoice_id:
- unit_price=self.pool.get('product.product').price_get(cr, uid, [data_event.product_id.id],context=context)[data_event.product_id.id]
- return {'value':{'unit_price' : unit_price , 'invoice_label' : data_event.product_id.name}}
- data_partner = self.pool.get('res.partner').browse(cr,uid,partner_invoice_id)
- context.update({'partner_id':data_partner})
- unit_price = self.pool.get('product.product')._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist':data_partner.property_product_pricelist.id})[data_event.product_id.id]
- return {'value':{'unit_price' :unit_price , 'invoice_label' : data_event.product_id.name}}
- return {'value':{'unit_price' : False,'invoice_label' : False}}
+ unit_price=self.pool.get('product.product').price_get(cr, uid, [data_event.product_id.id], context=context)[data_event.product_id.id]
+ return {'value': {'unit_price': unit_price , 'invoice_label': data_event.product_id.name}}
+ data_partner = self.pool.get('res.partner').browse(cr, uid, partner_invoice_id)
+ context.update({'partner_id': data_partner})
+ unit_price = self.pool.get('product.product')._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist': data_partner.property_product_pricelist.id})[data_event.product_id.id]
+ return {'value': {'unit_price': unit_price , 'invoice_label': data_event.product_id.name}}
+ return {'value': {'unit_price': False, 'invoice_label': False}}
def onchange_partner_id(self, cr, uid, ids, part, event_id, email=False):
data={}
data['badge_partner'] = data['contact_id'] = data['partner_invoice_id'] = data['email_from'] = data['badge_title'] = data['badge_name'] = False
if not part:
- return {'value':data}
+ return {'value': data}
data['partner_invoice_id']=part
# this calls onchange_partner_invoice_id
- d = self.onchange_partner_invoice_id(cr, uid, ids, event_id,part)
+ d = self.onchange_partner_invoice_id(cr, uid, ids, event_id, part)
# this updates the dictionary
data.update(d['value'])
addr = self.pool.get('res.partner').address_get(cr, uid, [part])
if addr:
if addr.has_key('default'):
- job_ids = self.pool.get('res.partner.job').search(cr, uid, [('address_id','=',addr['default'])])
+ job_ids = self.pool.get('res.partner.job').search(cr, uid, [('address_id', '=', addr['default'])])
if job_ids:
data['contact_id'] = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0]).contact_id.id
- d = self.onchange_contact_id(cr, uid, ids, data['contact_id'],part)
+ d = self.onchange_contact_id(cr, uid, ids, data['contact_id'], part)
data.update(d['value'])
partner_data = self.pool.get('res.partner').browse(cr, uid, part)
data['badge_partner'] = partner_data.name
- return {'value':data}
+ return {'value': data}
def onchange_partner_invoice_id(self, cr, uid, ids, event_id, partner_invoice_id):
data={}
context={}
data['unit_price']=False
if not event_id:
- return {'value':data}
- data_event = self.pool.get('event.event').browse(cr,uid,event_id)
+ return {'value': data}
+ data_event = self.pool.get('event.event').browse(cr, uid, event_id)
if data_event.product_id:
if not partner_invoice_id:
- data['unit_price']=self.pool.get('product.product').price_get(cr, uid, [data_event.product_id.id],context=context)[data_event.product_id.id]
- return {'value':data}
- data_partner = self.pool.get('res.partner').browse(cr,uid,partner_invoice_id)
- context.update({'partner_id':data_partner})
- data['unit_price'] = self.pool.get('product.product')._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist':data_partner.property_product_pricelist.id})[data_event.product_id.id]
- return {'value':data}
- return {'value':data}
+ data['unit_price']=self.pool.get('product.product').price_get(cr, uid, [data_event.product_id.id], context=context)[data_event.product_id.id]
+ return {'value': data}
+ data_partner = self.pool.get('res.partner').browse(cr, uid, partner_invoice_id)
+ context.update({'partner_id': data_partner})
+ data['unit_price'] = self.pool.get('product.product')._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist': data_partner.property_product_pricelist.id})[data_event.product_id.id]
+ return {'value': data}
+ return {'value': data}
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
if not categ:
- return {'value':{}}
+ return {'value': {}}
cat = self.pool.get('crm.case.categ').browse(cr, uid, categ, context).probability
- return {'value':{'probability':cat}}
-
- def _map_ids(self,method,cr, uid, ids, *args, **argv):
- case_data = self.browse(cr,uid,ids)
- new_ids=[]
- for case in case_data:
- if case.case_id:
- new_ids.append(case.case_id.id)
- return getattr(self.pool.get('crm.case'),method)(cr, uid, new_ids, *args, **argv)
-
-
- def case_close(self,cr, uid, ids, *args, **argv):
- return self._map_ids('case_close',cr,uid,ids,*args,**argv)
- def case_escalate(self,cr, uid, ids, *args, **argv):
- return self._map_ids('case_escalate',cr,uid,ids,*args,**argv)
- def case_open(self,cr, uid, ids, *args, **argv):
- return self._map_ids('case_open',cr,uid,ids,*args,**argv)
- def case_cancel(self,cr, uid, ids, *args, **argv):
- return self._map_ids('case_cancel',cr,uid,ids,*args,**argv)
- def case_pending(self,cr, uid, ids, *args, **argv):
- return self._map_ids('case_pending',cr,uid,ids,*args,**argv)
- def case_reset(self,cr, uid, ids, *args, **argv):
- return self._map_ids('case_reset',cr,uid,ids,*args,**argv)
- def case_log(self,cr, uid, ids, *args, **argv):
- return self._map_ids('case_log',cr,uid,ids,*args,**argv)
- def case_log_reply(self,cr, uid, ids, *args, **argv):
- return self._map_ids('case_log_reply',cr,uid,ids,*args,**argv)
- def add_reply(self,cr, uid, ids, *args, **argv):
- return self._map_ids('add_reply',cr,uid,ids,*args,**argv)
- def remind_partner(self,cr, uid, ids, *args, **argv):
- return self._map_ids('remind_partner',cr,uid,ids,*args,**argv)
- def remind_user(self,cr, uid, ids, *args, **argv):
- return self._map_ids('remind_user',cr,uid,ids,*args,**argv)
-
+ return {'value': {'probability': cat}}
event_registration()
@@ -413,12 +362,12 @@ class report_event_registration(osv.osv):
_description = "Events on registrations"
_auto = False
_columns = {
- 'name': fields.char('Event',size=20),
- 'date_begin': fields.datetime('Beginning date', required=True),
- 'date_end': fields.datetime('Ending date', required=True),
- 'draft_state': fields.integer('Draft Registration',size=20),
- 'confirm_state': fields.integer('Confirm Registration',size=20),
- 'register_max': fields.integer('Maximum Registrations'),
+ 'name': fields.char('Event', size=20),
+ 'date_begin': fields.datetime('Beginning date', required=True),
+ 'date_end': fields.datetime('Ending date', required=True),
+ 'draft_state': fields.integer('Draft Registration', size=20),
+ 'confirm_state': fields.integer('Confirm Registration', size=20),
+ 'register_max': fields.integer('Maximum Registrations'),
}
def init(self, cr):
cr.execute("""
@@ -428,8 +377,8 @@ class report_event_registration(osv.osv):
c.name as name,
e.date_begin as date_begin,
e.date_end as date_end,
- (SELECT sum(nb_register) FROM event_registration x , crm_case c WHERE x.case_id=c.id and c.section_id=e.section_id and state in ('draft')) as draft_state,
- (SELECT sum(nb_register) FROM event_registration x , crm_case c WHERE x.case_id=c.id and c.section_id=e.section_id and state in ('open')) as confirm_state,
+ (SELECT sum(c.nb_register) FROM event_registration c WHERE c.section_id=e.section_id and state in ('draft')) as draft_state,
+ (SELECT sum(c.nb_register) FROM event_registration c WHERE c.section_id=e.section_id and state in ('open')) as confirm_state,
e.register_max as register_max
from
event_event e,crm_case_section c
@@ -444,19 +393,21 @@ class report_event_type_registration(osv.osv):
_description = "Event type on registration"
_auto = False
_columns = {
- 'name': fields.char('Event Type',size=20),
- 'nbevent':fields.integer('Number Of Events'),
- 'draft_state': fields.integer('Draft Registrations',size=20),
- 'confirm_state': fields.integer('Confirm Registrations',size=20),
+ 'name': fields.char('Event Type', size=20),
+ 'nbevent': fields.integer('Number Of Events'),
+ 'draft_state': fields.integer('Draft Registrations', size=20),
+ 'confirm_state': fields.integer('Confirm Registrations', size=20),
}
+
+
def init(self, cr):
cr.execute("""
create or replace view report_event_type_registration as (
select
count(t.id) as id,
t.name as name,
- (select sum(nb_register) from event_registration r , crm_case c , event_event e where c.section_id=e.section_id and r.case_id=c.id and c.state='draft' and e.type=t.id ) as draft_state ,
- (select sum(nb_register) from event_registration r , crm_case c , event_event e where c.section_id=e.section_id and r.case_id=c.id and c.state='open' and e.type=t.id ) as confirm_state,
+ (select sum(c.nb_register) from event_registration c, event_event e where c.section_id=e.section_id and c.state='draft' and e.type=t.id ) as draft_state ,
+ (select sum(c.nb_register) from event_registration c, event_event e where c.section_id=e.section_id and c.state='open' and e.type=t.id ) as confirm_state,
count(t.id) as nbevent
from
event_event e
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index cb13b0662a8..86cf6c213f8 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -33,8 +33,8 @@
event.type
form
-
-
+
+
@@ -221,23 +221,26 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/event/security/event_security.xml b/addons/event/security/event_security.xml
index db731e1ccd3..e80f0eeae0c 100644
--- a/addons/event/security/event_security.xml
+++ b/addons/event/security/event_security.xml
@@ -2,11 +2,11 @@
diff --git a/addons/event/wizard/event_confirm_registration.py b/addons/event/wizard/event_confirm_registration.py
index f8a9d02de7d..0e64c0abe53 100644
--- a/addons/event/wizard/event_confirm_registration.py
+++ b/addons/event/wizard/event_confirm_registration.py
@@ -27,21 +27,23 @@ class event_confirm_registration(osv.osv_memory):
"""
_name = "event.confirm.registration"
_description = "Event Registraion"
+
_columns = {
- 'msg': fields.text('Message', readonly=True),
+ 'msg': fields.text('Message', readonly=True),
}
_defaults={
- 'msg':lambda *a:'The event limit is reached. What do you want to do?'
+ 'msg':lambda *a:'The event limit is reached. What do you want to do?'
}
def confirm(self, cr, uid, ids, context):
registration_obj = self.pool.get('event.registration')
reg_id = context.get('reg_id', False) or context.get('active_id', False)
if reg_id:
- registration_obj.write(cr, uid, [reg_id], {'state':'open',})
+ registration_obj.write(cr, uid, [reg_id], {'state':'open', })
registration_obj._history(cr, uid, [reg_id], 'Open', history=True)
- registration_obj.mail_user(cr,uid,[reg_id])
+ registration_obj.mail_user(cr, uid, [reg_id])
return {}
event_confirm_registration()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/event/wizard/event_registration.py b/addons/event/wizard/event_registration.py
index d8087b7a569..4803d118610 100644
--- a/addons/event/wizard/event_registration.py
+++ b/addons/event/wizard/event_registration.py
@@ -36,10 +36,8 @@ class event_registration_list(osv.osv_memory):
'type': 'ir.actions.act_window'
}
- cr.execute('SELECT section_id FROM event_event WHERE id = %s', (context['active_id'],))
- res = cr.fetchone()
return {
- 'domain': [('section_id', '=', res[0])],
+ 'domain': [('section_id', '=', context['active_id'])],
'name': 'Event Registrations',
'view_type': 'form',
'view_mode': 'tree,form',
From 69257f39a5d5d3c7aad99e580c7e36ad7ed65793 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Tue, 18 May 2010 09:44:37 +0200
Subject: [PATCH 120/148] [IMP] project_report, project_issue, sale: Rename
some columns
bzr revid: nel@tinyerp.com-20100518074437-bwu9c4rjql0u8kee
---
addons/project/report/project_report_view.xml | 20 +++++++++----------
.../report/project_issue_report.py | 2 +-
.../report/project_issue_report_view.xml | 8 --------
addons/sale/report/sale_report.py | 16 ++++++++++-----
addons/sale/report/sale_report_view.xml | 12 +++++++----
5 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index ef0abd119fa..64fc88dc5ed 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -52,13 +52,13 @@
-
-
+
+ help="Tasks performed in last 30 days"/>
+
-
-
+
diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py
index 67a72524af6..7c00b68d1fe 100644
--- a/addons/project_issue/report/project_issue_report.py
+++ b/addons/project_issue/report/project_issue_report.py
@@ -17,7 +17,7 @@ class project_issue_report(osv.osv):
'company_id' : fields.many2one('res.company', 'Company'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'project_id':fields.many2one('project.project', 'Project',readonly=True),
- 'type_id': fields.many2one('crm.case.resource.type', 'Type', domain="[('object_id.model', '=', 'project.issue')]"),
+ 'type_id': fields.many2one('crm.case.resource.type', 'Version', domain="[('object_id.model', '=', 'project.issue')]"),
'date_closed': fields.datetime('Close Date', readonly=True),
'date_open': fields.datetime('Opened', readonly=True),
'assigned_to' : fields.many2one('res.users', 'Assigned to',readonly=True),
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index 11ddde6a63c..8fb99f318ad 100644
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -18,9 +18,7 @@
-
-
@@ -66,7 +64,6 @@
-
@@ -76,7 +73,6 @@
-
@@ -92,12 +88,8 @@
-
-
-
-
diff --git a/addons/sale/report/sale_report.py b/addons/sale/report/sale_report.py
index c5e1a65e6e8..c8b616ced78 100644
--- a/addons/sale/report/sale_report.py
+++ b/addons/sale/report/sale_report.py
@@ -185,10 +185,14 @@ class product_bought_by_sale_order(osv.osv):
_name = "product.bought.by.sale.order"
_description = "Product bought by sale order"
_auto = False
- _rec_name = 'partner'
+ _rec_name = 'month'
_columns = {
'total_products': fields.integer('Total Products', readonly=True),
- 'name': fields.char('Sale order', size=64, readonly=True)
+ 'product_id':fields.many2one('product.product', 'Product', readonly=True),
+ 'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
+ ('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
+ ('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
+ 'year': fields.char('Year', size=64, readonly=True)
}
_order = 'total_products desc'
def init(self, cr):
@@ -197,8 +201,10 @@ class product_bought_by_sale_order(osv.osv):
create or replace view product_bought_by_sale_order as (
select
min(s.id) as id,
- count(*) as total_products,
- s.name as name
+ l.product_id as product_id,
+ to_char(l.create_date, 'MM') as month,
+ to_char(l.create_date, 'YYYY') as year,
+ count(*) as total_products
from
sale_order_line l
left join
@@ -206,7 +212,7 @@ class product_bought_by_sale_order(osv.osv):
where
s.state='manual' or s.state='progress'
group by
- s.name
+ l.product_id, to_char(l.create_date, 'MM'), to_char(l.create_date, 'YYYY')
)
""")
product_bought_by_sale_order()
diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml
index 639004803fd..332a551ec5d 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -226,7 +226,9 @@
tree
-
+
+
+
@@ -238,8 +240,9 @@
graph
-
-
+
+
+
@@ -248,7 +251,8 @@
Product bought by sale order
product.bought.by.sale.order
form
- tree,graph
+ graph,tree
+ [('year','=', time.strftime('%Y'))]
From 93d9c221342a60c20c61a6017ca8285f7e28acf1 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Wed, 19 May 2010 13:55:36 +0530
Subject: [PATCH 121/148] [IMP]:board_project:improved issue dashboard like:
Tree1: current issues(draft and open) Tree2: pending issues Graph1: issues by
stage Graph2: issues by state
bzr revid: apa@tinyerp.com-20100519082536-cxgbvmkcr9nd2i2o
---
.../board_project_issue_view.xml | 60 +++++++++++++++++--
.../report/project_issue_report_view.xml | 2 +-
2 files changed, 55 insertions(+), 7 deletions(-)
diff --git a/addons/board_project/board_project_issue_view.xml b/addons/board_project/board_project_issue_view.xml
index eaf3a2f8612..60103007985 100644
--- a/addons/board_project/board_project_issue_view.xml
+++ b/addons/board_project/board_project_issue_view.xml
@@ -7,24 +7,72 @@
project.issue
form
tree,form
- [('create_date', '>=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '<=', time.strftime('%Y-%m-%d 23:59:59'))]
+ [('user_id','=',uid),('state','in',['draft','open'])]
+
+ Project issues
+ project.issue
+ form
+ tree,form
+ [('user_id','=',uid),('state','=','pending')]
+
+
+
+
+ Project Issue
+ project.issue.report
+ form
+ graph
+ [('user_id','=',uid)]
+
+
+
+
+ project.issue.report.graph
+ project.issue.report
+ graph
+
+
+
+
+
+
+
+
+
+
+ Project Issue
+ project.issue.report
+ form
+ graph
+ [('user_id','=',uid)]
+
+
+
board.project.issue.form
board.board
form
-
-
+
+
-
+
+
-
+
+
+
+
+
+
+
+
-
+
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index 8fb99f318ad..57031572ed7 100644
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -37,7 +37,7 @@
project.issue.report
graph
-
+
From 92922b8dee716e67883d61aaa2f0e9dfec94ef6f Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Wed, 19 May 2010 14:56:25 +0530
Subject: [PATCH 122/148] [REM]: crm: Removed case log and history objects +
Unused view of cases
bzr revid: rpa@tinyerp.com-20100519092625-ueo5u2qai12uus8v
---
addons/crm/crm.py | 56 ----
addons/crm/crm_view.xml | 311 -------------------
addons/crm/security/ir.model.access.csv | 6 +-
addons/crm/wizard/crm_forward_to_partner.py | 1 -
addons/crm/wizard/crm_lead_to_opportunity.py | 1 -
addons/project_issue/project_issue_demo.xml | 2 +-
6 files changed, 2 insertions(+), 375 deletions(-)
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 46ef999604a..80b06bf7aba 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -508,62 +508,6 @@ def _links_get(self, cr, uid, context=None):
res = obj.read(cr, uid, ids, ['object', 'name'], context)
return [(r['object'], r['name']) for r in res]
-
-class crm_case_log(osv.osv):
- """ Case Communication History """
- _name = "crm.case.log"
- _description = "Case Communication History"
-
- _order = "id desc"
- _columns = {
- 'name': fields.char('Status', size=64),
- 'date': fields.datetime('Date'),
- 'section_id': fields.many2one('crm.case.section', 'Sales Team'),
- 'user_id': fields.many2one('res.users', 'User Responsible', readonly=True),
- 'model_id': fields.many2one('ir.model', "Model"),
- 'res_id': fields.integer('Resource ID'),
- }
-
- _defaults = {
- 'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
- }
-
-crm_case_log()
-
-class crm_case_history(osv.osv):
- """Case history"""
-
- _name = "crm.case.history"
- _description = "Case history"
- _order = "id desc"
- _inherits = {'crm.case.log': "log_id"}
-
- def _note_get(self, cursor, user, ids, name, arg, context=None):
- """ Gives case History Description
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of case History’s IDs
- @param context: A standard dictionary for contextual values
- """
- res = {}
- for hist in self.browse(cursor, user, ids, context or {}):
- res[hist.id] = (hist.email_from or '/') + ' (' + str(hist.date) + ')\n'
- res[hist.id] += (hist.description or '')
- return res
-
- _columns = {
- 'description': fields.text('Description'),
- 'note': fields.function(_note_get, method=True, string="Description", type="text"),
- 'email_to': fields.char('Email To', size=84),
- 'email_from' : fields.char('Email From', size=84),
- 'log_id': fields.many2one('crm.case.log','Log',ondelete='cascade'),
- 'message_id': fields.char('Message Id', size=1024, readonly=True, help="Message Id on Email Server.", select=True),
- }
-
-crm_case_history()
-
-
class users(osv.osv):
_inherit = 'res.users'
_description = "Users"
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 1d7a357e992..6e03295aa23 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -232,318 +232,7 @@
-
-
- crm.case.history.tree
- crm.case.history
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.case.calendar
- mailgate.thread
- calendar
-
-
-
-
-
-
-
-
-
-
-
-
- crm.case.tree
- mailgate.thread
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.case.form
- mailgate.thread
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.case.select
- mailgate.thread
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Cases
- mailgate.thread
- form
-
-
-
-
-
- Open Cases
- mailgate.thread
- form
-
- [('state','<>','done'),('state','<>','cancel'),('state','<>','pending')]
-
-
-
-
-
- Cases
- mailgate.thread
- [('section_id','child_of',[active_id])]
- form
- tree,form,calendar
-
-
-
-
- Open Cases
-
-
-
-
-
-
-
- crm.case.history.form
- crm.case.history
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- crm.case.history.select
- crm.case.history
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Histories
- crm.case.history
- form
- tree,form
-
-
-
diff --git a/addons/crm/security/ir.model.access.csv b/addons/crm/security/ir.model.access.csv
index f78044ea38e..1f90f74f281 100644
--- a/addons/crm/security/ir.model.access.csv
+++ b/addons/crm/security/ir.model.access.csv
@@ -6,12 +6,8 @@
"access_crm_meeting","crm.meeting","model_crm_meeting","crm.group_crm_manager",1,1,1,1
"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_manager",1,1,1,1
"access_crm_phonecall","crm.phonecall","model_crm_phonecall","crm.group_crm_manager",1,1,1,1
-"access_crm_case_log","crm.case.log","model_crm_case_log","crm.group_crm_user",1,1,1,1
-"access_crm_case_history","crm.case.history","model_crm_case_history","crm.group_crm_user",1,1,1,1
-"o","crm.case.section.manager","model_crm_case_section","crm.group_crm_manager",1,1,1,1
+"access_crm_case_section_manager","crm.case.section.manager","model_crm_case_section","crm.group_crm_manager",1,1,1,1
"access_crm_case_categ_manager","crm.case.categ.manager","model_crm_case_categ","crm.group_crm_manager",1,1,1,1
-"access_crm_case_log_manager","crm.case.log manager","model_crm_case_log","crm.group_crm_manager",1,1,1,1
-"access_crm_case_history_manager","crm.case.history manager","model_crm_case_history","crm.group_crm_manager",1,1,1,1
"access_crm_case_stage","crm.case.stage","model_crm_case_stage","crm.group_crm_user",1,0,0,0
"access_crm_case_stage_manager","crm.case.stage","model_crm_case_stage","crm.group_crm_manager",1,1,1,1
"access_crm_case_resource_type_user","crm_case_resource_type user","model_crm_case_resource_type","crm.group_crm_user",1,0,0,0
diff --git a/addons/crm/wizard/crm_forward_to_partner.py b/addons/crm/wizard/crm_forward_to_partner.py
index 98d5392faa3..153f136cfb2 100644
--- a/addons/crm/wizard/crm_forward_to_partner.py
+++ b/addons/crm/wizard/crm_forward_to_partner.py
@@ -176,7 +176,6 @@ class crm_lead_forward_to_partner(osv.osv_memory):
this = self.browse(cr, uid, ids[0], context=context)
- hist_obj = self.pool.get('crm.case.history')
smtp_pool = self.pool.get('email.smtpclient')
case_pool = self.pool.get(model)
case = case_pool.browse(cr, uid, res_id, context=context)
diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py
index f4cecbe508f..12edf5edc6d 100644
--- a/addons/crm/wizard/crm_lead_to_opportunity.py
+++ b/addons/crm/wizard/crm_lead_to_opportunity.py
@@ -57,7 +57,6 @@ class crm_lead2opportunity(osv.osv_memory):
lead_obj = self.pool.get('crm.lead')
data_obj = self.pool.get('ir.model.data')
- history_obj = self.pool.get('crm.case.history')
model_obj = self.pool.get('ir.model')
# Get Opportunity views
diff --git a/addons/project_issue/project_issue_demo.xml b/addons/project_issue/project_issue_demo.xml
index 7c7764a2e37..ed031672360 100644
--- a/addons/project_issue/project_issue_demo.xml
+++ b/addons/project_issue/project_issue_demo.xml
@@ -22,7 +22,7 @@
-
+
From 0fde2df8ffd6f05902a8a12824dd16386029bb94 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Wed, 19 May 2010 14:57:39 +0530
Subject: [PATCH 123/148] [FIX]: project_issue, hr_recruitment: Minor fixes for
search view
bzr revid: rpa@tinyerp.com-20100519092739-cdz8zc5lgshqebh3
---
addons/hr_recruitment/report/hr_recruitment_report_view.xml | 2 +-
addons/project_issue/project_issue.py | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
index 8e0c3f0845a..4e07f8c9d41 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml
+++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
@@ -10,7 +10,7 @@
-
+
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 49bbfd60bcd..b0ca2433b78 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -109,6 +109,7 @@ class project_issue(osv.osv, crm.crm_case):
return res
_columns = {
+ 'id': fields.integer('ID'),
'create_date': fields.datetime('Creation Date' , readonly=True),
'write_date': fields.datetime('Update Date' , readonly=True),
'date_deadline': fields.date('Deadline'),
From 209efb21aec2a79663cd699b0c9d2f06c49393f8 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Wed, 19 May 2010 19:09:28 +0530
Subject: [PATCH 124/148] [IMP]: mailgate_way: Improvement in mail_gateway for
the changes in crm objects, now they "_inherits" the mailgate.thread
bzr revid: rpa@tinyerp.com-20100519133928-kt7m3vz4etmgu2i0
---
addons/mail_gateway/mail_gateway.py | 78 ++++++++---------------
addons/mail_gateway/mail_gateway_view.xml | 47 +++++++++++---
2 files changed, 64 insertions(+), 61 deletions(-)
diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py
index 81f32d12f60..c88fecad19f 100644
--- a/addons/mail_gateway/mail_gateway.py
+++ b/addons/mail_gateway/mail_gateway.py
@@ -22,60 +22,38 @@
from osv import osv, fields
import time
+class one2many_domain(fields.one2many):
+ def set(self, cr, obj, id, field, values, user=None, context=None):
+ if not values:
+ return
+ return super(one2many_domain, self).set(cr, obj, id, field, values,
+ user=user, context=context)
+ def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None):
+ if not context:
+ context = {}
+ res = {}
+ msg_obj = obj.pool.get('mailgate.message')
+ for thread in obj.browse(cr, user, ids, context=context):
+ final = msg_obj.search(cr, user, self._domain + [('thread_id', '=', thread.id)], context=context)
+ res[thread.id] = final
+ return res
+
+
class mailgate_thread(osv.osv):
'''
Mailgateway Thread
'''
_name = 'mailgate.thread'
_description = 'Mailgateway Thread'
-
- def _get_log_ids(self, cr, uid, ids, field_names, arg, context=None):
- """Gets id for case log from history of particular case
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Case IDs
- @param context: A standard dictionary for contextual values
- @return:Dictionary of History Ids
- """
- if not context:
- context = {}
-
- result = {}
- domain = []
- history_obj = False
- model_obj = self.pool.get('ir.model')
- history_obj = self.pool.get('mailgate.message')
-
- if 'message_ids' in field_names:
- name = 'message_ids'
- domain += [('email_to', '!=', False)]
-
- if 'log_ids' in field_names:
- name = 'log_ids'
- domain += [('email_to', '=', False)]
-
- model_ids = model_obj.search(cr, uid, [('model', '=', self._name)])
- domain += [('model_id', '=', model_ids[0])]
- for case in self.browse(cr, uid, ids, context):
- domain1 = domain + [('res_id', '=', case.id)]
- history_ids = history_obj.search(cr, uid, domain1, context=context)
- if history_ids:
- result[case.id] = {name: history_ids}
- else:
- result[case.id] = {name: []}
- return result
+ _rec_name = 'thread'
_columns = {
- 'name':fields.char('Name', size=64),
- 'active': fields.boolean('Active'),
- 'message_ids': fields.function(_get_log_ids, method=True, type='one2many', \
- multi="message_ids", relation="mailgate.message", string="Messages"),
- 'log_ids': fields.function(_get_log_ids, method=True, type='one2many', \
- multi="log_ids", relation="mailgate.message", string="Logs"),
- }
-
+ 'thread': fields.char('Thread', size=32, required=False),
+ 'message_ids': one2many_domain('mailgate.message', 'thread_id', 'Messages', domain=[('history', '=', True)], required=False),
+ 'log_ids': one2many_domain('mailgate.message', 'thread_id', 'Logs', domain=[('history', '=', False)], required=False),
+ }
+
def __history(self, cr, uid, cases, keyword, history=False, email=False, details=None, email_from=False, message_id=False, context={}):
"""
@param self: The object pointer
@@ -89,7 +67,6 @@ class mailgate_thread(osv.osv):
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
-
# The mailgate sends the ids of the cases and not the object list
if all(isinstance(case_id, (int, long)) for case_id in cases) and context.get('model'):
cases = self.pool.get(context['model']).browse(cr, uid, cases, context=context)
@@ -103,13 +80,13 @@ class mailgate_thread(osv.osv):
'name': keyword,
'user_id': uid,
'date': time.strftime('%Y-%m-%d %H:%M:%S'),
- 'model_id' : model_ids and model_ids[0] or False,
- 'res_id': case.id,
+ 'thread_id': case.id,
'section_id': case.section_id.id,
- 'message_id':message_id
+ 'message_id': message_id
}
if history:
+ data['history'] = True
data['description'] = details or case.description
data['email_to'] = email or \
(case.section_id and case.section_id.reply_to) or \
@@ -140,8 +117,7 @@ class mailgate_message(osv.osv):
'name':fields.char('Message', size=64),
'thread_id':fields.many2one('mailgate.thread', 'Thread'),
'date': fields.datetime('Date'),
- 'model_id': fields.many2one('ir.model', "Model"),
- 'res_id': fields.integer('Resource ID'),
+ 'history': fields.boolean('Is History?', required=False),
'user_id': fields.many2one('res.users', 'User Responsible', readonly=True),
'message': fields.text('Description'),
'email_from': fields.char('Email From', size=84),
diff --git a/addons/mail_gateway/mail_gateway_view.xml b/addons/mail_gateway/mail_gateway_view.xml
index e735f75b7f0..d73946a842c 100644
--- a/addons/mail_gateway/mail_gateway_view.xml
+++ b/addons/mail_gateway/mail_gateway_view.xml
@@ -9,9 +9,8 @@
-
-
+
@@ -51,20 +50,19 @@
form
-
-
-
-
+
+
+
+
-
+
-
-
+
@@ -82,6 +80,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -92,7 +119,7 @@
tree
-
+
From 37aeeae4624ad455669bce5d97676de0ccf077e5 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Wed, 19 May 2010 19:12:43 +0530
Subject: [PATCH 125/148] [IMP]: Improvements in crm classes for
_inherits(mailgate.thread), * Moved some functions of action rule for
crm_case into crm.py to solve the problem of (python)inheritance
bzr revid: rpa@tinyerp.com-20100519134243-75vrkkymk9k3jssr
---
addons/crm/crm.py | 116 ++++++++++++++++++++++++++++
addons/crm/crm_action_rule.py | 114 ---------------------------
addons/crm/crm_lead.py | 12 ++-
addons/crm/crm_lead_menu.xml | 2 +-
addons/crm/crm_opportunity_menu.xml | 2 +-
addons/crm/crm_phonecall.py | 2 +
6 files changed, 129 insertions(+), 119 deletions(-)
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 80b06bf7aba..da76a0d09b3 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -202,6 +202,21 @@ class crm_case(object):
return {'value': {'email_from': False}}
address = self.pool.get('res.partner.address').browse(cr, uid, add)
return {'value': {'email_from': address.email}}
+
+ def _history(self, cr, uid, cases, keyword, history=False, email=False, details=None, email_from=False, message_id=False, context={}):
+ mailgate_pool = self.pool.get('mailgate.thread')
+ return mailgate_pool._history(cr, uid, cases, keyword, history=history, email=email, details=details, email_from=email_from, message_id=message_id, context=context)
+
+ def _action(self, cr, uid, cases, state_to, scrit=None, context={}):
+ if not context:
+ context = {}
+ context['state_to'] = state_to
+ rule_obj = self.pool.get('base.action.rule')
+ model_obj = self.pool.get('ir.model')
+ model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
+ rule_ids = rule_obj.search(cr, uid, [('name','=',model_ids[0])])
+ return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
+
def case_open(self, cr, uid, ids, *args):
"""Opens Case
@@ -311,6 +326,107 @@ class crm_case(object):
self._action(cr, uid, cases, 'draft')
return True
+ def remind_partner(self, cr, uid, ids, context={}, attach=False):
+
+ """
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Remind Partner's IDs
+ @param context: A standard dictionary for contextual values
+
+ """
+ return self.remind_user(cr, uid, ids, context, attach,
+ destination=False)
+
+ def remind_user(self, cr, uid, ids, context={}, attach=False,destination=True):
+
+ """
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of Remind user's IDs
+ @param context: A standard dictionary for contextual values
+
+ """
+ for case in self.browse(cr, uid, ids):
+ if not case.section_id.reply_to:
+ raise osv.except_osv(_('Error!'), ("Reply To is not specified in the sales team"))
+ if not case.email_from:
+ raise osv.except_osv(_('Error!'), ("Partner Email is not specified in Case"))
+ if case.section_id.reply_to and case.email_from:
+ src = case.email_from
+ dest = case.section_id.reply_to
+ body = ""
+ body = case.email_last or case.description
+ if not destination:
+ src, dest = dest, src
+ if body and case.user_id.signature:
+ body += '\n\n%s' % (case.user_id.signature)
+
+ body = self.format_body(body)
+ dest = [dest]
+
+ attach_to_send = None
+
+ if attach:
+ attach_ids = self.pool.get('ir.attachment').search(cr, uid, [('res_model', '=', 'mailgate.thread'), ('res_id', '=', case.id)])
+ attach_to_send = self.pool.get('ir.attachment').read(cr, uid, attach_ids, ['datas_fname','datas'])
+ attach_to_send = map(lambda x: (x['datas_fname'], base64.decodestring(x['datas'])), attach_to_send)
+
+ # Send an email
+ flag = tools.email_send(
+ src,
+ dest,
+ "Reminder: [%s] %s" % (str(case.id), case.name, ),
+ body,
+ reply_to=case.section_id.reply_to,
+ openobject_id=str(case.id),
+ attach=attach_to_send
+ )
+ self._history(cr, uid, [case], _('Send'), history=True, email=dest, details=body, email_from=src)
+ #if flag:
+ # raise osv.except_osv(_('Email!'),("Email Successfully Sent"))
+ #else:
+ # raise osv.except_osv(_('Email Fail!'),("Email is not sent successfully"))
+ return True
+
+ def _check(self, cr, uid, ids=False, context={}):
+ """
+ Function called by the scheduler to process cases for date actions
+ Only works on not done and cancelled cases
+
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param context: A standard dictionary for contextual values
+ """
+ cr.execute('select * from crm_case \
+ where (date_action_last<%s or date_action_last is null) \
+ and (date_action_next<=%s or date_action_next is null) \
+ and state not in (\'cancel\',\'done\')',
+ (time.strftime("%Y-%m-%d %H:%M:%S"),
+ time.strftime('%Y-%m-%d %H:%M:%S')))
+
+ ids2 = map(lambda x: x[0], cr.fetchall() or [])
+ cases = self.browse(cr, uid, ids2, context)
+ return self._action(cr, uid, cases, False, context=context)
+
+ def _action(self, cr, uid, cases, state_to, scrit=None, context={}):
+ if not context:
+ context = {}
+ context['state_to'] = state_to
+ rule_obj = self.pool.get('base.action.rule')
+ model_obj = self.pool.get('ir.model')
+ model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
+ rule_ids = rule_obj.search(cr, uid, [('name','=',model_ids[0])])
+ return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
+
+ def format_body(self, body):
+ return self.pool.get('base.action.rule').format_body(body)
+
+ def format_mail(self, obj, body):
+ return self.pool.get('base.action.rule').format_mail(obj, body)
class crm_case_section(osv.osv):
"""Sales Team"""
diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py
index 82c60e64f23..ee5e3d357c8 100644
--- a/addons/crm/crm_action_rule.py
+++ b/addons/crm/crm_action_rule.py
@@ -34,120 +34,6 @@ from osv.orm import except_orm
import crm
-class case(osv.osv):
- """ Case """
-
- _inherit = 'mailgate.thread'
- _description = 'case'
-
- _columns = {
- 'date_action_last': fields.datetime('Last Action', readonly=1),
- 'date_action_next': fields.datetime('Next Action', readonly=1),
- }
-
- def remind_partner(self, cr, uid, ids, context={}, attach=False):
-
- """
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Remind Partner's IDs
- @param context: A standard dictionary for contextual values
-
- """
- return self.remind_user(cr, uid, ids, context, attach,
- destination=False)
-
- def remind_user(self, cr, uid, ids, context={}, attach=False,destination=True):
-
- """
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param ids: List of Remind user's IDs
- @param context: A standard dictionary for contextual values
-
- """
- for case in self.browse(cr, uid, ids):
- if not case.section_id.reply_to:
- raise osv.except_osv(_('Error!'), ("Reply To is not specified in the sales team"))
- if not case.email_from:
- raise osv.except_osv(_('Error!'), ("Partner Email is not specified in Case"))
- if case.section_id.reply_to and case.email_from:
- src = case.email_from
- dest = case.section_id.reply_to
- body = ""
- body = case.email_last or case.description
- if not destination:
- src, dest = dest, src
- if body and case.user_id.signature:
- body += '\n\n%s' % (case.user_id.signature)
-
- body = self.format_body(body)
- dest = [dest]
-
- attach_to_send = None
-
- if attach:
- attach_ids = self.pool.get('ir.attachment').search(cr, uid, [('res_model', '=', 'mailgate.thread'), ('res_id', '=', case.id)])
- attach_to_send = self.pool.get('ir.attachment').read(cr, uid, attach_ids, ['datas_fname','datas'])
- attach_to_send = map(lambda x: (x['datas_fname'], base64.decodestring(x['datas'])), attach_to_send)
-
- # Send an email
- flag = tools.email_send(
- src,
- dest,
- "Reminder: [%s] %s" % (str(case.id), case.name, ),
- body,
- reply_to=case.section_id.reply_to,
- openobject_id=str(case.id),
- attach=attach_to_send
- )
- self._history(cr, uid, [case], _('Send'), history=True, email=dest, details=body, email_from=src)
- #if flag:
- # raise osv.except_osv(_('Email!'),("Email Successfully Sent"))
- #else:
- # raise osv.except_osv(_('Email Fail!'),("Email is not sent successfully"))
- return True
-
- def _check(self, cr, uid, ids=False, context={}):
- """
- Function called by the scheduler to process cases for date actions
- Only works on not done and cancelled cases
-
- @param self: The object pointer
- @param cr: the current row, from the database cursor,
- @param uid: the current user’s ID for security checks,
- @param context: A standard dictionary for contextual values
- """
- cr.execute('select * from crm_case \
- where (date_action_last<%s or date_action_last is null) \
- and (date_action_next<=%s or date_action_next is null) \
- and state not in (\'cancel\',\'done\')',
- (time.strftime("%Y-%m-%d %H:%M:%S"),
- time.strftime('%Y-%m-%d %H:%M:%S')))
-
- ids2 = map(lambda x: x[0], cr.fetchall() or [])
- cases = self.browse(cr, uid, ids2, context)
- return self._action(cr, uid, cases, False, context=context)
-
- def _action(self, cr, uid, cases, state_to, scrit=None, context={}):
- if not context:
- context = {}
- context['state_to'] = state_to
- rule_obj = self.pool.get('base.action.rule')
- model_obj = self.pool.get('ir.model')
- model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
- rule_ids = rule_obj.search(cr, uid, [('name','=',model_ids[0])])
- return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
-
- def format_body(self, body):
- return self.pool.get('base.action.rule').format_body(body)
-
- def format_mail(self, obj, body):
- return self.pool.get('base.action.rule').format_mail(obj, body)
-case()
-
class base_action_rule(osv.osv):
""" Base Action Rule """
_inherit = 'base.action.rule'
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 335c7a96906..09cc6773df0 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -28,13 +28,14 @@ import mx.DateTime
from tools.translate import _
from crm import crm_case
-class crm_lead(osv.osv, crm_case):
+class crm_lead(osv.osv, crm_case, ):
""" CRM Lead Case """
_name = "crm.lead"
_description = "Leads Cases"
_order = "priority, id desc"
- _inherit = ['res.partner.address', 'mailgate.thread']
+ _inherit = ['res.partner.address']
+ _inherits = {'mailgate.thread': 'thread_id'}
def _compute_day(self, cr, uid, ids, fields, args, context={}):
"""
@@ -95,6 +96,10 @@ class crm_lead(osv.osv, crm_case):
_columns = {
# From crm.case
+ 'name': fields.char('Name', size=64),
+ 'active': fields.boolean('Active', required=False),
+ 'date_action_last': fields.datetime('Last Action', readonly=1),
+ 'date_action_next': fields.datetime('Next Action', readonly=1),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help='Sales team to which Case belongs to.\
@@ -107,6 +112,7 @@ and users by email"),
'write_date': fields.datetime('Update Date' , readonly=True),
# Lead fields
+ 'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'categ_id': fields.many2one('crm.case.categ', 'Lead Source', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]"),
@@ -148,7 +154,7 @@ and users by email"),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
}
-
+
def case_open(self, cr, uid, ids, *args):
"""Overrides cancel for crm_case for setting Open Date
@param self: The object pointer
diff --git a/addons/crm/crm_lead_menu.xml b/addons/crm/crm_lead_menu.xml
index d4d182a2dc5..4fef09d28df 100644
--- a/addons/crm/crm_lead_menu.xml
+++ b/addons/crm/crm_lead_menu.xml
@@ -9,7 +9,7 @@
['|', ('type','=','lead'), ('type','=',False)]
- {'search_default_current':1}
+ {'search_default_current':1, 'default_type': 'lead'}
diff --git a/addons/crm/crm_opportunity_menu.xml b/addons/crm/crm_opportunity_menu.xml
index 9d1ccf15258..4471c0bcb8e 100644
--- a/addons/crm/crm_opportunity_menu.xml
+++ b/addons/crm/crm_opportunity_menu.xml
@@ -27,7 +27,7 @@
crm.lead
tree,form,graph
[('type','=','opportunity')]
- {'search_default_current':1}
+ {'search_default_current':1, 'default_type': 'opportunity'}
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py
index 6244ba1807a..4644f129c87 100644
--- a/addons/crm/crm_phonecall.py
+++ b/addons/crm/crm_phonecall.py
@@ -35,6 +35,8 @@ class crm_phonecall(osv.osv, crm_case):
_columns = {
# From crm.case
+ 'name': fields.char('Name', size=64),
+ 'active': fields.boolean('Active', required=False),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help='Sales team to which Case belongs to.\
Define Responsible user and Email account for mail gateway.'),
From e1ec62f4283ace126febfae482d9c4f0ce7062e0 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Thu, 20 May 2010 11:45:25 +0530
Subject: [PATCH 126/148] [IMP]: crm: Improvement in meeting, phonecall for
_inherits(mailgate thread)
bzr revid: rpa@tinyerp.com-20100520061525-d390dgd29z21br8t
---
addons/crm/crm_meeting.py | 4 +++-
addons/crm/crm_meeting_view.xml | 10 +++++-----
addons/crm/crm_phonecall.py | 3 ++-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py
index 1582c61491c..633558334b7 100644
--- a/addons/crm/crm_meeting.py
+++ b/addons/crm/crm_meeting.py
@@ -43,7 +43,8 @@ class crm_meeting(osv.osv, crm_case):
_name = 'crm.meeting'
_description = "Meeting Cases"
_order = "id desc"
- _inherit = ["mailgate.thread", "calendar.event"]
+ _inherit = ["calendar.event"]
+ _inherits = {'mailgate.thread': 'thread_id'}
_columns = {
# From crm.case
@@ -58,6 +59,7 @@ class crm_meeting(osv.osv, crm_case):
'id': fields.integer('ID'),
# Meeting fields
+ 'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'categ_id': fields.many2one('crm.case.categ', 'Meeting Type', \
domain="[('object_id.model', '=', 'crm.meeting')]", \
),
diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml
index 70461fc8eb3..894fdbb6207 100644
--- a/addons/crm/crm_meeting_view.xml
+++ b/addons/crm/crm_meeting_view.xml
@@ -24,15 +24,15 @@
form
-
+
+ required="1" colspan="2" />
-
-
+
@@ -327,7 +327,7 @@
-
+
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py
index 4644f129c87..7a6c728789c 100644
--- a/addons/crm/crm_phonecall.py
+++ b/addons/crm/crm_phonecall.py
@@ -31,12 +31,13 @@ class crm_phonecall(osv.osv, crm_case):
_name = "crm.phonecall"
_description = "Phonecall Cases"
_order = "id desc"
- _inherit = 'mailgate.thread'
+ _inherits = {'mailgate.thread': 'thread_id'}
_columns = {
# From crm.case
'name': fields.char('Name', size=64),
'active': fields.boolean('Active', required=False),
+ 'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help='Sales team to which Case belongs to.\
Define Responsible user and Email account for mail gateway.'),
From 3c77d58db079cbcfe04ffb040a0d18128c682fa1 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Thu, 20 May 2010 11:46:37 +0530
Subject: [PATCH 127/148] [IMP]: Improvement in other crm modules for
_inherits(mailgate thread)
bzr revid: rpa@tinyerp.com-20100520061637-8r0x83z2357aox7x
---
addons/base_calendar/base_calendar.py | 2 +-
addons/crm_claim/crm_claim.py | 7 ++++++-
addons/crm_fundraising/crm_fundraising.py | 8 ++++++--
addons/crm_helpdesk/crm_helpdesk.py | 6 +++++-
addons/hr_recruitment/hr_recruitment.py | 14 ++++++++++++-
addons/project_issue/project_issue.py | 24 +++++++++++++++++------
6 files changed, 49 insertions(+), 12 deletions(-)
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index 09ca54b8251..f20df08edb3 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -1002,7 +1002,7 @@ class calendar_event(osv.osv):
_columns = {
'id': fields.integer('ID'),
'sequence': fields.integer('Sequence'),
- 'name': fields.char('Description', size=64, required=True),
+ 'name': fields.char('Description', size=64, required=False),
'date': fields.datetime('Date'),
'date_deadline': fields.datetime('Deadline'),
'create_date': fields.datetime('Created', readonly=True),
diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py
index a535efbdb81..d9a7a2b34c0 100644
--- a/addons/crm_claim/crm_claim.py
+++ b/addons/crm_claim/crm_claim.py
@@ -29,10 +29,15 @@ class crm_claim(osv.osv, crm.crm_case):
_name = "crm.claim"
_description = "Claim Cases"
_order = "id desc"
- _inherit = 'mailgate.thread'
+ _inherits = {'mailgate.thread': 'thread_id'}
+
_columns = {
+ 'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'id': fields.integer('ID', readonly=True),
'name': fields.char('Name', size=128, required=True),
+ 'active': fields.boolean('Active', required=False),
+ 'date_action_last': fields.datetime('Last Action', readonly=1),
+ 'date_action_next': fields.datetime('Next Action', readonly=1),
'description': fields.text('Description'),
'create_date': fields.datetime('Creation Date' , readonly=True),
'write_date': fields.datetime('Update Date' , readonly=True),
diff --git a/addons/crm_fundraising/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py
index 4650528fa72..356c3baec73 100644
--- a/addons/crm_fundraising/crm_fundraising.py
+++ b/addons/crm_fundraising/crm_fundraising.py
@@ -28,11 +28,15 @@ class crm_fundraising(osv.osv, crm.crm_case):
_name = "crm.fundraising"
_description = "Fund Raising Cases"
_order = "id desc"
- _inherit ='mailgate.thread'
+ _inherits = {'mailgate.thread': 'thread_id'}
_columns = {
+ 'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'id': fields.integer('ID'),
- 'name': fields.char('Name', size=128, required=True),
+ 'name': fields.char('Name', size=128, required=True),
+ 'active': fields.boolean('Active', required=False),
+ 'date_action_last': fields.datetime('Last Action', readonly=1),
+ 'date_action_next': fields.datetime('Next Action', readonly=1),
'description': fields.text('Description'),
'create_date': fields.datetime('Creation Date' , readonly=True),
'write_date': fields.datetime('Update Date' , readonly=True),
diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py
index 4329ef7d73b..d07d2261013 100644
--- a/addons/crm_helpdesk/crm_helpdesk.py
+++ b/addons/crm_helpdesk/crm_helpdesk.py
@@ -28,11 +28,15 @@ class crm_helpdesk(osv.osv, crm.crm_case):
_name = "crm.helpdesk"
_description = "Helpdesk Cases"
_order = "id desc"
- _inherit = 'mailgate.thread'
+ _inherits = {'mailgate.thread': 'thread_id'}
_columns = {
+ 'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'id': fields.integer('ID', readonly=True),
'name': fields.char('Name', size=128, required=True),
+ 'active': fields.boolean('Active', required=False),
+ 'date_action_last': fields.datetime('Last Action', readonly=1),
+ 'date_action_next': fields.datetime('Next Action', readonly=1),
'description': fields.text('Description'),
'create_date': fields.datetime('Creation Date' , readonly=True),
'write_date': fields.datetime('Update Date' , readonly=True),
diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py
index eac882874c7..5411dd9ff05 100644
--- a/addons/hr_recruitment/hr_recruitment.py
+++ b/addons/hr_recruitment/hr_recruitment.py
@@ -43,9 +43,11 @@ class hr_applicant(osv.osv, crm.crm_case):
_name = "hr.applicant"
_description = "Applicant Cases"
_order = "id desc"
- _inherit ='mailgate.thread'
+ _inherits = {'mailgate.thread': 'thread_id'}
_columns = {
+ 'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
+ 'name': fields.char('Name', size=128, required=True),
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the case without removing it."),
'description': fields.text('Description'),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
@@ -89,6 +91,16 @@ class hr_applicant(osv.osv, crm.crm_case):
'survey' : fields.related('job_id', 'survey_id', type='many2one', relation='survey', string='Survey'),
'response' : fields.integer("Response"),
}
+
+ _defaults = {
+ 'active': lambda *a: 1,
+ 'user_id': crm.crm_case._get_default_user,
+ 'email_from': crm.crm_case. _get_default_email,
+ 'state': lambda *a: 'draft',
+ 'section_id': crm.crm_case. _get_section,
+ 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
+ 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
+ }
def onchange_job(self,cr, uid, ids, job, context={}):
result = {}
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index b0ca2433b78..42e37124515 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -36,7 +36,7 @@ class project_issue(osv.osv, crm.crm_case):
_name = "project.issue"
_description = "Project Issue"
_order = "priority, id desc"
- _inherit = 'mailgate.thread'
+ _inherits = {'mailgate.thread': 'thread_id'}
def case_open(self, cr, uid, ids, *args):
"""
@@ -109,7 +109,10 @@ class project_issue(osv.osv, crm.crm_case):
return res
_columns = {
+ 'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'id': fields.integer('ID'),
+ 'name': fields.char('Name', size=128, required=True),
+ 'active': fields.boolean('Active', required=False),
'create_date': fields.datetime('Creation Date' , readonly=True),
'write_date': fields.datetime('Update Date' , readonly=True),
'date_deadline': fields.date('Deadline'),
@@ -164,13 +167,26 @@ class project_issue(osv.osv, crm.crm_case):
method=True, multi='day_close', type="integer", store=True),
'assigned_to' : fields.many2one('res.users', 'Assigned to'),
}
-
+
def _get_project(self, cr, uid, context):
user = self.pool.get('res.users').browse(cr,uid,uid, context=context)
if user.context_project_id:
return user.context_project_id.id
return False
+ _defaults = {
+ 'active': lambda *a: 1,
+ 'user_id': crm.crm_case._get_default_user,
+ 'partner_id': crm.crm_case._get_default_partner,
+ 'partner_address_id': crm.crm_case._get_default_partner_address,
+ 'email_from': crm.crm_case. _get_default_email,
+ 'state': lambda *a: 'draft',
+ 'section_id': crm.crm_case. _get_section,
+ 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
+ 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
+ 'project_id':_get_project,
+ }
+
def convert_issue_task(self, cr, uid, ids, context=None):
case_obj = self.pool.get('project.issue')
data_obj = self.pool.get('ir.model.data')
@@ -249,9 +265,5 @@ class project_issue(osv.osv, crm.crm_case):
return {'value':{}}
return {'value':{}}
- _defaults = {
- 'project_id':_get_project,
- }
-
project_issue()
From f30e575df8f6baecd8f413078e6a156c2d3a79c9 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Thu, 20 May 2010 15:33:05 +0530
Subject: [PATCH 128/148] [IMP]: crm, base_action_rule, mailgateway: Minor
Improvement + typo
bzr revid: rpa@tinyerp.com-20100520100305-qj9u0fltesw968nv
---
addons/base_action_rule/base_action_rule.py | 14 ++++++-------
addons/crm/crm.py | 11 -----------
addons/crm/crm_action_rule.py | 22 ++++++++++-----------
addons/mail_gateway/mail_gateway_view.xml | 4 ++--
4 files changed, 20 insertions(+), 31 deletions(-)
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index a1213dd7542..519c766fb7d 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -93,20 +93,20 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
'trg_state_to': fields.selection(_state_get, 'Button Pressed', size=16),
'act_method': fields.char('Call Object Method', size=64),
- 'act_user_id': fields.many2one('res.users', 'Set responsible to'),
- 'act_state': fields.selection(_state_get, 'Set state to', size=16),
- 'act_email_cc': fields.char('Add watchers (Cc)', size=250, help="\
+ 'act_user_id': fields.many2one('res.users', 'Set Responsible to'),
+ 'act_state': fields.selection(_state_get, 'Set State to', size=16),
+ 'act_email_cc': fields.char('Add Watchers (Cc)', size=250, help="\
These people will receive a copy of the future communication between partner \
and users by email"),
'act_remind_partner': fields.boolean('Remind Partner', help="Check \
this if you want the rule to send a reminder by email to the partner."),
- 'act_remind_user': fields.boolean('Remind responsible', help="Check \
+ 'act_remind_user': fields.boolean('Remind Responsible', help="Check \
this if you want the rule to send a reminder by email to the user."),
'act_reply_to': fields.char('Reply-To', size=64),
- 'act_remind_attach': fields.boolean('Remind with attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
- 'act_mail_to_user': fields.boolean('Mail to responsible', help="Check\
+ 'act_remind_attach': fields.boolean('Remind with Attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
+ 'act_mail_to_user': fields.boolean('Mail to Responsible', help="Check\
this if you want the rule to send an email to the responsible person."),
- 'act_mail_to_watchers': fields.boolean('Mail to watchers (CC)',
+ 'act_mail_to_watchers': fields.boolean('Mail to Watchers (CC)',
help="Check this if you want \
the rule to mark CC(mail to any other person defined in actions)."),
'act_mail_to_email': fields.char('Mail to these emails', size=128, \
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index da76a0d09b3..9410d3efabd 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -207,17 +207,6 @@ class crm_case(object):
mailgate_pool = self.pool.get('mailgate.thread')
return mailgate_pool._history(cr, uid, cases, keyword, history=history, email=email, details=details, email_from=email_from, message_id=message_id, context=context)
- def _action(self, cr, uid, cases, state_to, scrit=None, context={}):
- if not context:
- context = {}
- context['state_to'] = state_to
- rule_obj = self.pool.get('base.action.rule')
- model_obj = self.pool.get('ir.model')
- model_ids = model_obj.search(cr, uid, [('model','=',self._name)])
- rule_ids = rule_obj.search(cr, uid, [('name','=',model_ids[0])])
- return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
-
-
def case_open(self, cr, uid, ids, *args):
"""Opens Case
@param self: The object pointer
diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py
index ee5e3d357c8..3a14659672a 100644
--- a/addons/crm/crm_action_rule.py
+++ b/addons/crm/crm_action_rule.py
@@ -40,18 +40,18 @@ class base_action_rule(osv.osv):
_description = 'Action Rules'
_columns = {
- 'trg_section_id': fields.many2one('crm.case.section', 'Sales Team'),
- 'trg_max_history': fields.integer('Maximum Communication History'),
- 'trg_categ_id': fields.many2one('crm.case.categ', 'Category'),
- 'regex_history' : fields.char('Regular Expression on Case History', size=128),
- 'act_section_id': fields.many2one('crm.case.section', 'Set Team to'),
- 'act_categ_id': fields.many2one('crm.case.categ', 'Set Category to'),
- 'act_mail_to_partner': fields.boolean('Mail to partner',help="Check \
-this if you want the rule to send an email to the partner."),
+ 'trg_section_id': fields.many2one('crm.case.section', 'Sales Team'),
+ 'trg_max_history': fields.integer('Maximum Communication History'),
+ 'trg_categ_id': fields.many2one('crm.case.categ', 'Category'),
+ 'regex_history' : fields.char('Regular Expression on Case History', size=128),
+ 'act_section_id': fields.many2one('crm.case.section', 'Set Team to'),
+ 'act_categ_id': fields.many2one('crm.case.categ', 'Set Category to'),
+ 'act_mail_to_partner': fields.boolean('Mail to Partner', help="Check \
+this if you want the rule to send an email to the partner."),
}
- def email_send(self, cr, uid, obj, emails, body, emailfrom=tools.config.get('email_from',False), context={}):
+ def email_send(self, cr, uid, obj, emails, body, emailfrom=tools.config.get('email_from', False), context={}):
body = self.format_mail(obj, body)
if not emailfrom:
if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.address_id and obj.user_id.address_id.email:
@@ -64,7 +64,7 @@ this if you want the rule to send an email to the partner."),
else:
reply_to = emailfrom
if not emailfrom:
- raise osv.except_osv(_('Error!'),
+ raise osv.except_osv(_('Error!'),
_("No E-Mail ID Found for your Company address!"))
return tools.email_send(emailfrom, emails, name, body, reply_to=reply_to, openobject_id=str(obj.id))
@@ -139,7 +139,7 @@ this if you want the rule to send an email to the partner."),
@param context: A standard dictionary for contextual values """
res = super(base_action_rule, self).state_get(cr, uid, context=context)
- return res + [('escalate','Escalate')] + crm.AVAILABLE_STATES
+ return res + [('escalate', 'Escalate')] + crm.AVAILABLE_STATES
def priority_get(self, cr, uid, context={}):
diff --git a/addons/mail_gateway/mail_gateway_view.xml b/addons/mail_gateway/mail_gateway_view.xml
index d73946a842c..8b26d5ee47a 100644
--- a/addons/mail_gateway/mail_gateway_view.xml
+++ b/addons/mail_gateway/mail_gateway_view.xml
@@ -147,12 +147,12 @@
-
-
+ -->
From 6303e47b06fbf9ff7f08f73f855db97ec560cf1e Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Thu, 20 May 2010 17:38:22 +0200
Subject: [PATCH 129/148] [IMP] project: rename column user = assigned to try
to improve search view for extended options
bzr revid: nel@tinyerp.com-20100520153822-7yc7to7xxnr9r9sy
---
addons/project/report/project_report.py | 2 +-
addons/project/report/project_report_view.xml | 12 +++---------
addons/project_issue/__openerp__.py | 1 -
.../project_issue/report/project_issue_report.py | 6 ------
.../report/project_issue_report_view.xml | 14 ++------------
5 files changed, 6 insertions(+), 29 deletions(-)
diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py
index e099b4544aa..8aae859053b 100644
--- a/addons/project/report/project_report.py
+++ b/addons/project/report/project_report.py
@@ -30,7 +30,7 @@ class report_project_task_user(osv.osv):
'name': fields.char('Task Summary', size=128, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'year': fields.char('Year',size=64,required=False, readonly=True),
- 'user_id':fields.many2one('res.users', 'User', readonly=True),
+ 'user_id':fields.many2one('res.users', 'Assigned To', readonly=True),
'date_start': fields.datetime('Starting Date',readonly=True),
'no_of_days': fields.integer('#Days', size=128, readonly=True),
'description': fields.text('Description',readonly=True),
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index fefb8752108..da1aad8e393 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -89,11 +89,7 @@
domain="[('user_id','=',False)]"/>
-<<<<<<< TREE
- >>>>>> MERGE-SOURCE
string="My Task"
help="My Tasks"
domain="[('project_id','=',context.get('project_id', False)]"/>
@@ -104,21 +100,19 @@
-
-
+
-
+
-
-
+
diff --git a/addons/project_issue/__openerp__.py b/addons/project_issue/__openerp__.py
index 2bf67d47191..513bae085bd 100644
--- a/addons/project_issue/__openerp__.py
+++ b/addons/project_issue/__openerp__.py
@@ -31,7 +31,6 @@
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': [
- 'crm',
'project',
'hr_timesheet_sheet',
],
diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py
index 28223d21d9e..6bc02be3ab2 100644
--- a/addons/project_issue/report/project_issue_report.py
+++ b/addons/project_issue/report/project_issue_report.py
@@ -68,7 +68,6 @@ class project_issue_report(osv.osv):
'create_date': fields.datetime('Create Date', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue')]"),
- 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"),
'nbr': fields.integer('# of Issues', readonly=True),
'delay_close': fields.float('Avg Closing Delay', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Days to close the project issue"),
@@ -77,7 +76,6 @@ class project_issue_report(osv.osv):
'company_id' : fields.many2one('res.company', 'Company'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'project_id':fields.many2one('project.project', 'Project',readonly=True),
- 'type_id': fields.many2one('crm.case.resource.type', 'Version', domain="[('object_id.model', '=', 'project.issue')]"),
'date_closed': fields.datetime('Close Date', readonly=True),
'date_open': fields.datetime('Opened', readonly=True),
'assigned_to' : fields.many2one('res.users', 'Assigned to',readonly=True),
@@ -99,12 +97,10 @@ class project_issue_report(osv.osv):
c.user_id,
c.section_id,
c.categ_id,
- c.stage_id,
to_char(c.date_closed, 'YYYY/mm/dd') as date_closed,
u.company_id as company_id,
c.priority as priority,
c.project_id as project_id,
- c.type_id as type_id,
count(*) as nbr,
c.assigned_to,
c.partner_id,
@@ -127,12 +123,10 @@ class project_issue_report(osv.osv):
c.user_id,
c.section_id,
c.categ_id,
- c.stage_id,
c.date_closed,
u.company_id,
c.priority,
c.project_id,
- c.type_id,
date_trunc('day',c.create_date),
c.assigned_to,
c.partner_id,
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index d7672fb6f10..d725e5bd1a0 100644
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -11,8 +11,6 @@
-
-
@@ -52,14 +50,10 @@
-
-
-
-
-
-
@@ -129,12 +121,10 @@
-
-
From 8249c4b7e9796c4ac5b9da69accfe97e1b47207f Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Fri, 21 May 2010 12:24:20 +0530
Subject: [PATCH 130/148] [IMP]:project,stock:Improved SQL report with new
guidlines.
bzr revid: apa@tinyerp.com-20100521065420-31waeltufldk319i
---
addons/project/report/project_report.py | 6 ++----
addons/project/report/project_report_view.xml | 14 +++++++------
.../report/report_stock_picking_view.xml | 20 ++++++++++---------
3 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py
index e099b4544aa..c417abd4280 100644
--- a/addons/project/report/project_report.py
+++ b/addons/project/report/project_report.py
@@ -31,16 +31,15 @@ class report_project_task_user(osv.osv):
'day': fields.char('Day', size=128, readonly=True),
'year': fields.char('Year',size=64,required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
- 'date_start': fields.datetime('Starting Date',readonly=True),
+ 'date_start': fields.date('Starting Date',readonly=True),
'no_of_days': fields.integer('#Days', size=128, readonly=True),
'description': fields.text('Description',readonly=True),
- 'date_end': fields.datetime('Ending Date',readonly=True),
+ 'date_end': fields.date('Ending Date',readonly=True),
'date_deadline': fields.date('Deadline',readonly=True),
'project_id':fields.many2one('project.project', 'Project', readonly=True),
'hours_planned': fields.float('Planned Hours', readonly=True),
'hours_effective': fields.float('Effective Hours', readonly=True),
'hours_delay': fields.float('Avg. Plan.-Eff.', readonly=True),
-# 'closing_days': fields.char('Avg Closing Delay', size=64, readonly=True),
'closing_days': fields.float('Avg Closing Delay', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Days to close the task"),
@@ -102,7 +101,6 @@ class report_project_task_user(osv.osv):
t.state,
date_trunc('day',t.date_end),
to_date(to_char(t.date_deadline, 'dd-MM-YYYY'),'dd-MM-YYYY'),
- date_trunc('day',t.date_start),
t.company_id,
t.partner_id,
t.type,
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index 7990d7ab1aa..97c7778a729 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -102,19 +102,21 @@
help ="Non assigned tasks to projects"
domain="[('project_id','=',False"/>
+
-
+
+
+
+
+
-
-
+
+
-
-
-
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index da5bdba6abf..281d60336c8 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -56,13 +56,13 @@
-
-
+
+ help="Picking in last 30 days"/>
@@ -70,30 +70,32 @@
-
+
-
+
+
-
+
+
-
+
-
+
From 22017a4c24052a69df9ed4dfc0ba7140a25f2466 Mon Sep 17 00:00:00 2001
From: "ssi (Open ERP)"
Date: Fri, 21 May 2010 12:51:14 +0530
Subject: [PATCH 131/148] [IMP] marketing_campaign: added workflow xml
bzr revid: ssi@tinyerp.com-20100521072114-bwv6asz16lwmw40q
---
addons/marketing_campaign/__openerp__.py | 2 +
.../marketing_campaign_workflow.xml | 117 ++++++++++++++++++
2 files changed, 119 insertions(+)
create mode 100644 addons/marketing_campaign/marketing_campaign_workflow.xml
diff --git a/addons/marketing_campaign/__openerp__.py b/addons/marketing_campaign/__openerp__.py
index 90b7d9f07ab..3363dd87144 100755
--- a/addons/marketing_campaign/__openerp__.py
+++ b/addons/marketing_campaign/__openerp__.py
@@ -36,6 +36,8 @@
'init_xml': [],
'update_xml': [
'marketing_campaign_view.xml',
+ 'marketing_campaign_data.xml',
+ 'marketing_campaign_workflow.xml',
'report/campaign_analysis_view.xml',
],
'demo_xml': [],
diff --git a/addons/marketing_campaign/marketing_campaign_workflow.xml b/addons/marketing_campaign/marketing_campaign_workflow.xml
new file mode 100644
index 00000000000..a31515efd58
--- /dev/null
+++ b/addons/marketing_campaign/marketing_campaign_workflow.xml
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+ marketing.campaign.basic
+ marketing.campaign
+ True
+
+
+
+
+
+ True
+ draft
+
+
+
+
+ running
+ function
+ state_running_set()
+
+
+
+
+ done
+ function
+ state_done_set()
+
+
+
+
+ cancel
+ True
+ function
+ state_cancel_set()
+
+
+
+
+
+
+ state_running_set
+
+
+
+
+
+ state_done_set
+
+
+
+
+
+ state_cancel_set
+
+
+
+
+
+ marketing.campaign.segment.basic
+ marketing.campaign.segment
+ True
+
+
+
+
+
+ True
+ draft
+
+
+
+
+ running
+ function
+ state_running_set()
+
+
+
+
+ done
+ function
+ state_done_set()
+
+
+
+
+ cancel
+ True
+ function
+ state_cancel_set()
+
+
+
+
+
+
+ state_running_set
+
+
+
+
+
+ state_done_set
+
+
+
+
+
+ state_cancel_set
+
+
+
From 3e7cb952534e30fec4c560ffb899566a77ad75aa Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Fri, 21 May 2010 10:09:48 +0200
Subject: [PATCH 132/148] [IMP] project_issue: rename + add icon
bzr revid: nel@tinyerp.com-20100521080948-0oatbrtz4pfwdks0
---
addons/project/report/project_report_view.xml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index da1aad8e393..44ccc9358c6 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -52,10 +52,14 @@
-
-
From 2a94c90f2e12a25e5888d02ff201247d42bca037 Mon Sep 17 00:00:00 2001
From: "nel@tinyerp.com" <>
Date: Fri, 21 May 2010 10:10:28 +0200
Subject: [PATCH 133/148] [IMP] stock: picking report
bzr revid: nel@tinyerp.com-20100521081028-6l5o1xid6owan2y3
---
addons/stock/report/report_stock_picking.py | 24 +++--
.../report/report_stock_picking_view.xml | 97 +++++++++++--------
2 files changed, 71 insertions(+), 50 deletions(-)
diff --git a/addons/stock/report/report_stock_picking.py b/addons/stock/report/report_stock_picking.py
index 8b464a35762..b6e2a3d3373 100644
--- a/addons/stock/report/report_stock_picking.py
+++ b/addons/stock/report/report_stock_picking.py
@@ -30,16 +30,15 @@ class report_stock_picking(osv.osv):
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
- 'reference': fields.char('Reference', size=64, select=True),
'nbr': fields.integer('# of Lines', readonly=True),
'nbp': fields.integer('# of Picking', readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'product_qty': fields.float('# of Products', readonly=True),
+ 'product_uos_qty': fields.float('# of Products', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'date': fields.date('Date', readonly=True),
'avg_days_to_deliver': fields.float('Avg Days to Deliver', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Avg Days to deliver"),
- 'origin': fields.char('Origin', size=64),
'state': fields.selection([('draft', 'Draft'),('auto', 'Waiting'),('confirmed', 'Confirmed'),('assigned', 'Available'),('done', 'Done'),('cancel', 'Cancelled')], 'State'),
'type': fields.selection([('out', 'Sending Goods'), ('in', 'Getting Goods'), ('internal', 'Internal'), ('delivery', 'Delivery')], 'Shipping Type', required=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
@@ -50,7 +49,11 @@ class report_stock_picking(osv.osv):
'min_date': fields.date('Expected Date',help="Expected date for Picking. Default it takes current date"),
'order_date': fields.date('Order Date', help="Date of Order"),
'date_done': fields.date('Date Done', help="Date of completion"),
+ 'location_id': fields.many2one('stock.location', 'Source Location', help="Sets a location if you produce at a fixed location. This can be a partner location if you subcontract the manufacturing operations."),
+ 'location_dest_id': fields.many2one('stock.location', 'Dest. Location', help="Location where the system will stock the finished products."),
'max_date': fields.date('Max.Expected Date'),
+ 'product_uos': fields.many2one('product.uom', 'Product UOS'),
+ 'product_uom': fields.many2one('product.uom', 'Product UOM'),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_stock_picking')
@@ -70,12 +73,15 @@ class report_stock_picking(osv.osv):
count(sm.id) as nbr,
count(distinct sp.id) as nbp,
sum(sm.product_qty) as product_qty,
- sm.product_id,
+ sum(sm.product_uos_qty) as product_uos_qty,
+ sm.product_id as product_id,
+ sm.location_dest_id as location_dest_id,
+ sm.location_id as location_id,
sp.type,
+ sm.product_uos,
+ sm.product_uom,
sp.invoice_state,
- sp.company_id,
- sp.name as reference,
- sp.origin,
+ sp.company_id as company_id,
avg(extract('epoch' from (sp.date_done-sp.create_date)))/(3600*24) as avg_days_to_deliver,
sp.state
from stock_move as sm
@@ -83,17 +89,19 @@ class report_stock_picking(osv.osv):
group by sp.type,
sp.create_date,
sp.address_id,
- sp.name,
sm.product_id,
to_char(sp.create_date, 'YYYY'),
+ sm.location_dest_id,
+ sm.location_id,
to_char(sp.create_date, 'MM'),
to_char(sp.create_date, 'YYYY-MM-DD'),
+ sm.product_uos,
+ sm.product_uom,
date_trunc('day',sp.min_date),
date_trunc('day',sp.date),
date_trunc('day',sp.date_done),
date_trunc('day',sp.max_date),
sp.invoice_state,
- sp.origin,
sp.company_id,
sp.state
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index da5bdba6abf..6dc282e9f8b 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -15,23 +15,26 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -55,49 +58,59 @@
search
-
-
+
-
+
+ help="Picking of last 30 days"/>
+
+
-
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
@@ -109,7 +122,7 @@
tree,graph
- {'search_default_Partner':1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}
+ {'search_default_Partner':1,'search_default_product':1,'search_default_month':1,'group_by_no_leaf':1,'group_by':[]}
From b6abea96454292526d0e63cef0cd1599b427f580 Mon Sep 17 00:00:00 2001
From: "DSH (Open ERP)"
Date: Fri, 21 May 2010 15:16:08 +0530
Subject: [PATCH 134/148] [FIX][IMP] marketing campaing report view
bzr revid: dsh@tinyerp.com-20100521094608-m1n43j0dp086eds7
---
.../report/campaign_analysis.py | 16 ++++----
.../report/campaign_analysis_view.xml | 38 +++++++++++--------
2 files changed, 30 insertions(+), 24 deletions(-)
diff --git a/addons/marketing_campaign/report/campaign_analysis.py b/addons/marketing_campaign/report/campaign_analysis.py
index 6ed57efa1ad..029461dfac9 100644
--- a/addons/marketing_campaign/report/campaign_analysis.py
+++ b/addons/marketing_campaign/report/campaign_analysis.py
@@ -36,7 +36,7 @@ class campaign_analysis(osv.osv): #{{{
result = {}
for ca_obj in self.browse(cr, uid, ids, context):
wi_ids = self.pool.get('marketing.campaign.workitem').search(cr, uid,
- [('segment_id.campaign_id', '=', ca_obj.campaign_id.id)])
+ [('segment_id.campaign_id', '=', ca_obj.campaign_id.id)])
total_cost = ca_obj.activity_id.variable_cost + \
(ca_obj.campaign_id.fixed_cost / len(wi_ids))
result[ca_obj.id] = total_cost
@@ -58,14 +58,12 @@ class campaign_analysis(osv.osv): #{{{
readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True),
'country_id': fields.related('partner_id','address', 'country_id',
- type='many2one', relation='res.country',
- string='Country'),
-# 'case_id': fields.many2one('crm.lead', 'Opportunity', readonly=True),
-# 'count' : fields.integer('Count', readonly=True),
- 'total_cost': fields.function(_total_cost, string='Cost', method=True,
- type="float"),
+ type='many2one', relation='res.country',string='Country'),
+ 'total_cost' : fields.function(_total_cost, string='Cost', method=True,
+ type="float", store=True),
'revenue': fields.float('Revenue',readonly=True),
-
+# 'case_id': fields.many2one('crm.lead', 'Opportunity', readonly=True),
+# 'count' : fields.integer('Count', readonly=True),
}
def init(self, cr):
@@ -87,7 +85,7 @@ class campaign_analysis(osv.osv): #{{{
marketing_campaign_workitem wi
left join res_partner p on (p.id=wi.partner_id)
left join marketing_campaign_segment s on (s.id=wi.segment_id)
- left join marketing_campaign_activity act on (act.id= wi.activity_id),
+ left join marketing_campaign_activity act on (act.id= wi.activity_id)
group by
to_char(wi.date, 'YYYY'),to_char(wi.date, 'MM'),
s.campaign_id,wi.activity_id,wi.segment_id,wi.partner_id,revenue,
diff --git a/addons/marketing_campaign/report/campaign_analysis_view.xml b/addons/marketing_campaign/report/campaign_analysis_view.xml
index 8cf0aa9ab46..7be6fc3e500 100644
--- a/addons/marketing_campaign/report/campaign_analysis_view.xml
+++ b/addons/marketing_campaign/report/campaign_analysis_view.xml
@@ -6,19 +6,19 @@
campaign.analysis
tree
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -46,8 +46,16 @@
-
+
+
+
+
+
+
+
+
+
@@ -57,7 +65,7 @@
campaign.analysis
form
tree
- {'group_by': [], 'search_default_group_campaign': 1, 'search_default_group_segment': 1}
+ {'group_by': [], 'search_default_Campaign': 1, 'search_default_Segment': 1}
From a5a33f10d35198ca3e970e5c1dcde807ab7276ca Mon Sep 17 00:00:00 2001
From: "DSH (Open ERP)"
Date: Fri, 21 May 2010 15:23:53 +0530
Subject: [PATCH 135/148] [IMP] process segment and wkf buttons
bzr revid: dsh@tinyerp.com-20100521095353-zjvfbbm3ep7vt1r3
---
.../marketing_campaign/marketing_campaign.py | 112 +++++++++++++++++-
.../marketing_campaign_data.xml | 16 ++-
.../marketing_campaign_view.xml | 16 ++-
.../report/campaign_analysis.py | 2 +-
.../report/campaign_analysis_view.xml | 2 +-
5 files changed, 135 insertions(+), 13 deletions(-)
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 0beab1bf38d..61dc39e7b39 100755
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -53,7 +53,40 @@ class marketing_campaign(osv.osv): #{{{
'fixed_cost': fields.float('Fixed Cost'),
}
-
+
+ _defaults = {
+ 'state': lambda *a: 'draft',
+ }
+
+ def state_running_set(self, cr, uid, ids, *args):
+ campaign = self.browse(cr, uid, ids[0])
+ if not campaign.activity_ids :
+ raise osv.except_osv("Error", "There is no associate activitity for the campaign")
+ act_ids = [ act_id.id for act_id in campaign.activity_ids]
+ act_ids = self.pool.get('marketing.campaign.activity').search(cr, uid,
+ [('id', 'in', act_ids), ('start', '=', True)])
+ if not act_ids :
+ raise osv.except_osv("Error", "There is no associate activitity for the campaign")
+ segment_ids = self.pool.get('marketing.campaign.segment').search(cr, uid,
+ [('campaign_id', '=', campaign.id),
+ ('state', '=', 'draft')])
+ if not segment_ids :
+ raise osv.except_osv("Error", "There is no associate semgnet for the campaign")
+ self.write(cr, uid, ids, {'state': 'running'})
+ return True
+
+ def state_done_set(self, cr, uid, ids, *args):
+ segment_ids = self.pool.get('marketing.campaign.segment').search(cr, uid,
+ [('campaign_id', 'in', ids),
+ ('state', '=', 'running')])
+ if segment_ids :
+ raise osv.except_osv("Error", "Camapign cannot be done before all segments are done")
+ self.write(cr, uid, ids, {'state': 'done'})
+ return True
+
+ def state_cancel_set(self, cr, uid, ids, *args):
+ self.write(cr, uid, ids, {'state': 'cancelled'})
+ return True
marketing_campaign()#}}}
class marketing_campaign_segment(osv.osv): #{{{
@@ -69,8 +102,8 @@ class marketing_campaign_segment(osv.osv): #{{{
string='Object'),
'ir_filter_id': fields.many2one('ir.filters', 'Filter'),
'sync_last_date': fields.datetime('Date'),
- 'sync_mode': fields.selection([('create', 'Create'),
- ('write', 'Write')],
+ 'sync_mode': fields.selection([('create_date', 'Create'),
+ ('write_date', 'Write')],
'Mode'),
'state': fields.selection([('draft', 'Draft'),
('running', 'Running'),
@@ -80,6 +113,69 @@ class marketing_campaign_segment(osv.osv): #{{{
'date_run': fields.datetime('Running'),
'date_done': fields.datetime('Done'),
}
+
+ _defaults = {
+ 'state': lambda *a: 'draft',
+ 'sync_mode': lambda *a: 'create_date',
+ }
+
+ def state_running_set(self, cr, uid, ids, *args):
+ segment = self.browse(cr, uid, ids[0])
+ if not segment.date_run:
+ raise osv.except_osv("Error", "Segment cant be start before giving running date")
+ if segment.campaign_id.state != 'running' :
+ raise osv.except_osv("Error", "You have to start campaign first")
+ self.write(cr, uid, ids, {'state': 'running'})
+ return True
+
+ def state_done_set(self, cr, uid, ids, *args):
+ date_done = self.browse(cr, uid, ids[0]).date_done
+ if (date_done > time.strftime('%Y-%m-%d')):
+ raise osv.except_osv("Error", "Segment cannot be closed before end date")
+
+ wi_ids = self.pool.get("marketing.campaign.workitem").search(cr, uid,
+ [('state', 'in', ['inprogress', 'todo']),
+ ('segment_id', '=', ids[0])])
+ if wi_ids :
+ raise osv.except_osv("Error", "Segment cannot be done before all workitems are processed")
+ self.write(cr, uid, ids, {'state': 'done'})
+ return True
+
+ def state_cancel_set(self, cr, uid, ids, *args):
+ self.write(cr, uid, ids, {'state': 'cancelled'})
+ return True
+
+ def process_segment(self, cr, uid, context={}):
+ segment_ids = self.search(cr, uid, [('state', '=', 'running')])
+ action_date = time.strftime('%Y-%m-%d %H:%M:%S')
+ last_action_date = (datetime.now() + _intervalTypes['days'](-1) \
+ ).strftime('%Y-%m-%d %H:%M:%S')
+ for segment in self.browse(cr, uid, segment_ids):
+ act_ids = self.pool.get('marketing.campaign.activity').search(cr,
+ uid, [('start', '=', True),
+ ('campaign_id', '=', segment.campaign_id.id)])
+ if (segment.sync_last_date and \
+ segment.sync_last_date <= action_date )\
+ or not segment.sync_last_date :
+ model_obj = self.pool.get(segment.object_id.model)
+ object_ids = model_obj.search(cr, uid, [
+ (segment.sync_mode, '<=', action_date),
+ (segment.sync_mode, '>=', last_action_date)])
+ for o_ids in model_obj.read(cr, uid, object_ids) :
+ partner_id = 'partner_id' in o_ids and o_ids['partner_id'] \
+ or False
+ for act_id in act_ids:
+ wi_vals = {'segment_id': segment.id,
+ 'activity_id': act_id,
+ 'date': action_date,
+ 'partner_id': 1,
+ 'state': 'todo',
+ }
+ print self.pool.get('marketing.campaign.workitem').create(cr,
+ uid, wi_vals)
+
+ self.write(cr, uid, segment.id, {'sync_last_date':action_date})
+ return True
marketing_campaign_segment()#}}}
@@ -116,6 +212,7 @@ class marketing_campaign_activity(osv.osv): #{{{
'variable_cost': fields.float('Variable Cost'),
'revenue': fields.float('Revenue')
}
+
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
@@ -176,6 +273,9 @@ class marketing_campaign_workitem(osv.osv): #{{{
('exception', 'Exception'), ('done', 'Done'),
('cancelled', 'Cancelled')], 'State')
}
+ _defaults = {
+ 'state': lambda *a: 'draft',
+ }
def process_chain(self, cr, uid, workitem_id, context={}):
workitem = self.browse(cr, uid, workitem_id)
@@ -184,7 +284,7 @@ class marketing_campaign_workitem(osv.osv): #{{{
process_to_id = mct_obj.search(cr,uid, [('id', 'in', to_ids),
('activity_from_id','=', 'activity_id')])
for mct_id in mct_obj.browse(cr, uid, process_to_id):
- launch_date = datetime.datetime.now() + _intervalTypes[ \
+ launch_date = datetime.now() + _intervalTypes[ \
mct_id.interval_type](mct_id.interval_nbr)
workitem_vals = {'segment_id': workitem.segment_id.id,
'activity_id': mct_id.activity_to_id.id,
@@ -201,10 +301,10 @@ class marketing_campaign_workitem(osv.osv): #{{{
return True
def process_all(self, cr, uid, context={}):
- workitem_ids = self.search(cr, uid, [('type', '=', 'todo'),
+ workitem_ids = self.search(cr, uid, [('state', '=', 'todo'),
('date','<=', time.strftime('%Y-%m-%d %H:%M:%S'))])
if workitem_ids:
- self.parocess(cr, uid, workitem_ids, context)
+ self.process(cr, uid, workitem_ids, context)
marketing_campaign_workitem() #}}}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/marketing_campaign/marketing_campaign_data.xml b/addons/marketing_campaign/marketing_campaign_data.xml
index b3e18ee5b5d..81402dd73c2 100644
--- a/addons/marketing_campaign/marketing_campaign_data.xml
+++ b/addons/marketing_campaign/marketing_campaign_data.xml
@@ -6,13 +6,25 @@
Check Workitem
- 60
- minutes
+ 1
+ hours
-1
+
+
+ Check Segment
+ 1
+ days
+ -1
+
+
+
+
+
+
diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml
index abee5a1c124..a5553d7e67c 100755
--- a/addons/marketing_campaign/marketing_campaign_view.xml
+++ b/addons/marketing_campaign/marketing_campaign_view.xml
@@ -65,7 +65,12 @@
-
+
+
+
+
+
+
@@ -142,10 +147,15 @@
-
+
-
+
+
+
+
+
+
diff --git a/addons/marketing_campaign/report/campaign_analysis.py b/addons/marketing_campaign/report/campaign_analysis.py
index 029461dfac9..590a1b47bc0 100644
--- a/addons/marketing_campaign/report/campaign_analysis.py
+++ b/addons/marketing_campaign/report/campaign_analysis.py
@@ -60,7 +60,7 @@ class campaign_analysis(osv.osv): #{{{
'country_id': fields.related('partner_id','address', 'country_id',
type='many2one', relation='res.country',string='Country'),
'total_cost' : fields.function(_total_cost, string='Cost', method=True,
- type="float", store=True),
+ type="float" ),
'revenue': fields.float('Revenue',readonly=True),
# 'case_id': fields.many2one('crm.lead', 'Opportunity', readonly=True),
# 'count' : fields.integer('Count', readonly=True),
diff --git a/addons/marketing_campaign/report/campaign_analysis_view.xml b/addons/marketing_campaign/report/campaign_analysis_view.xml
index 7be6fc3e500..b66ec89ca6b 100644
--- a/addons/marketing_campaign/report/campaign_analysis_view.xml
+++ b/addons/marketing_campaign/report/campaign_analysis_view.xml
@@ -17,7 +17,7 @@
-
+
From edd8bd594b87e59f0a8f45ac9491ae0bf9c60386 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Fri, 21 May 2010 15:58:04 +0530
Subject: [PATCH 136/148] [IMP]:account,stock:improved invoice report and
solving bug in picking report when open the SQL report.
bzr revid: apa@tinyerp.com-20100521102804-0vtm3w3xqrhq5epm
---
.../report/account_invoice_report_view.xml | 73 ++++++++-----------
.../report/report_stock_picking_view.xml | 4 -
2 files changed, 30 insertions(+), 47 deletions(-)
diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml
index 160a77f6ffa..b974afdb8a3 100644
--- a/addons/account/report/account_invoice_report_view.xml
+++ b/addons/account/report/account_invoice_report_view.xml
@@ -17,7 +17,6 @@
-
@@ -57,13 +56,13 @@
-
-
+
+ help="Invoices of last 30 days"/>
+
-
-
+
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
-
-
-
+
+
-
-
-
-
-
-
+
+
-
+
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index d4116313a7e..bfcb2bf54fb 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -15,9 +15,7 @@
-
-
@@ -61,8 +59,6 @@
-
-
From 19bddf1cc737b9d209c820ef99026dde8d5c8164 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Fri, 21 May 2010 16:06:52 +0530
Subject: [PATCH 137/148] [IMP]:stock:Improved SQL report(Picking) with new
guidlines.
bzr revid: apa@tinyerp.com-20100521103652-cwhac17kd42k4nyn
---
.../report/report_stock_picking_view.xml | 40 +++++++++++++++----
1 file changed, 32 insertions(+), 8 deletions(-)
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index bfcb2bf54fb..2c9856a0c67 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -15,13 +15,20 @@
+
+
+
+
+
+
+
-
+
@@ -47,27 +54,44 @@
-
-
+
+ help="Picking in last 30 days"/>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
-
+
+
From 93281e8ad66c9ea556c009bc3591e70c76a6652a Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Fri, 21 May 2010 16:11:38 +0530
Subject: [PATCH 138/148] [IMP]:project:Improved SQL report(Task).
bzr revid: apa@tinyerp.com-20100521104138-1vdbvwgu4u8ma31m
---
addons/project/report/project_report.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py
index 1b74c7e5d7c..e6368f053d0 100644
--- a/addons/project/report/project_report.py
+++ b/addons/project/report/project_report.py
@@ -31,7 +31,7 @@ class report_project_task_user(osv.osv):
'day': fields.char('Day', size=128, readonly=True),
'year': fields.char('Year',size=64,required=False, readonly=True),
'user_id':fields.many2one('res.users', 'Assigned To', readonly=True),
- 'date_start': fields.datetime('Starting Date',readonly=True),
+ 'date_start': fields.date('Starting Date',readonly=True),
'no_of_days': fields.integer('#Days', size=128, readonly=True),
'description': fields.text('Description',readonly=True),
'date_end': fields.date('Ending Date',readonly=True),
@@ -96,6 +96,7 @@ class report_project_task_user(osv.osv):
group by
to_char(date_start, 'YYYY'),
to_char(date_start, 'MM'),
+ to_char(date_start, 'YYYY-MM-DD'),
t.priority,
t.user_id,
t.state,
From 40ddc1e38da9767dca896b2701a5f0d5bc1dc1fd Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Fri, 21 May 2010 16:56:29 +0530
Subject: [PATCH 139/148] [IMP]:stock:Picking.
bzr revid: apa@tinyerp.com-20100521112629-2o47e3sut7aquuum
---
addons/stock/report/report_stock_picking_view.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/addons/stock/report/report_stock_picking_view.xml b/addons/stock/report/report_stock_picking_view.xml
index 2c9856a0c67..62d1b06fd19 100644
--- a/addons/stock/report/report_stock_picking_view.xml
+++ b/addons/stock/report/report_stock_picking_view.xml
@@ -87,11 +87,10 @@
-
-
+
From de86586f9409cb21a8e902caa16ee3cd76732d56 Mon Sep 17 00:00:00 2001
From: apa-tiny
Date: Fri, 21 May 2010 17:56:59 +0530
Subject: [PATCH 140/148] [FIX]:name field problem in production SQL report.
bzr revid: apa@tinyerp.com-20100521122659-st8xw3nt047q9f7p
---
addons/mrp/report/mrp_production_order_view.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/mrp/report/mrp_production_order_view.xml b/addons/mrp/report/mrp_production_order_view.xml
index a97abe846de..c9c7a3d4400 100644
--- a/addons/mrp/report/mrp_production_order_view.xml
+++ b/addons/mrp/report/mrp_production_order_view.xml
@@ -21,7 +21,7 @@
-
+
@@ -48,7 +48,7 @@
-
+
@@ -89,7 +89,7 @@
-
+
@@ -102,7 +102,7 @@
{'search_default_Product': 1}
-
+
From c1e3ab087bf0df5b99f4f819425a8c480ab616c3 Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 21 May 2010 18:11:08 +0530
Subject: [PATCH 141/148] [REVERT]: crm: Reverted crm report changes applied at
revision id:apa@tinyerp.com-20100521100729-9g2963splsd9yzzx
bzr revid: rpa@tinyerp.com-20100521124108-0twgz1sj69t6brvo
---
addons/crm/report/crm_lead_report.py | 32 +---
addons/crm/report/crm_lead_report_view.xml | 181 ++++++++++++------
addons/crm/report/crm_phonecall_report.py | 17 --
.../crm/report/crm_phonecall_report_view.xml | 139 ++++++++++----
addons/crm_claim/report/crm_claim_report.py | 15 +-
.../report/crm_claim_report_view.xml | 164 ++++++++++------
.../report/crm_fundraising_report.py | 28 ++-
.../report/crm_fundraising_report_view.xml | 130 +++++++++----
.../report/hr_recruitment_report_view.xml | 4 -
.../report/project_issue_report_view.xml | 105 ++++++----
10 files changed, 512 insertions(+), 303 deletions(-)
diff --git a/addons/crm/report/crm_lead_report.py b/addons/crm/report/crm_lead_report.py
index 4b39739b1a7..2c0fa8c8fc6 100644
--- a/addons/crm/report/crm_lead_report.py
+++ b/addons/crm/report/crm_lead_report.py
@@ -21,7 +21,6 @@
from osv import fields,osv
import tools
-import crm_report
AVAILABLE_STATES = [
('draft','Draft'),
@@ -36,7 +35,7 @@ class crm_lead_report(osv.osv):
_name = "crm.lead.report"
_auto = False
_description = "CRM Lead Report"
-
+
def _get_data(self, cr, uid, ids, field_name, arg, context={}):
""" @param cr: the current row, from the database cursor,
@@ -90,7 +89,7 @@ class crm_lead_report(osv.osv):
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'create_date': fields.datetime('Create Date', readonly=True),
- 'day': fields.char('Day', size=128, readonly=True),
+ 'day': fields.char('Day', size=128, readonly=True),
'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'categ_id': fields.many2one('crm.case.categ', 'Category',\
domain="[('section_id','=',section_id),\
@@ -99,17 +98,12 @@ class crm_lead_report(osv.osv):
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]", readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
- 'company_id': fields.many2one('res.company', 'Company', readonly=True),
- 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
- 'type_id': fields.many2one('crm.case.resource.type', 'Lead Type', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.lead')]"),
- 'date_closed': fields.datetime('Closed', readonly=True),
- 'date_open': fields.datetime('Opened', readonly=True),
- 'date_deadline': fields.date('Deadline', readonly=True),
- 'opportunity_id': fields.many2one('crm.opportunity', 'Opportunity',readonly=True),
- 'country_id': fields.many2one('res.country', 'Country' , readonly=True),
- 'state_id': fields.many2one('res.country.state', 'State' , readonly=True)
+ 'company_id': fields.many2one('res.company', 'Company', readonly=True),
+ 'type':fields.selection([
+ ('lead','Lead'),
+ ('opportunity','Opportunity'),
+
+ ],'Type', help="Type is used to separate Leads and Opportunities"),
}
def init(self, cr):
@@ -138,14 +132,6 @@ class crm_lead_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
- c.priority as priority,
- c.type_id as type_id,
- c.date_closed as date_closed,
- c.date_open as date_open,
- c.opportunity_id as opportunity_id,
- c.country_id as country_id,
- c.state_id as state_id,
- c.date_deadline as date_deadline,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -153,8 +139,6 @@ class crm_lead_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id,c.stage_id,categ_id,c.partner_id,c.company_id, c.type
,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
- ,c.priority,c.type_id,c.date_closed,c.date_open
- ,c.opportunity_id,c.country_id,c.state_id,c.date_deadline
)""")
crm_lead_report()
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index c39ccdeef08..c1d64ee332c 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -22,14 +22,7 @@
-
-
-
-
-
-
-
-
+
@@ -76,55 +69,129 @@
crm.lead.report
search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ crm.lead.report.tree
+ crm.lead.report
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm/report/crm_phonecall_report.py b/addons/crm/report/crm_phonecall_report.py
index 5f7a3eb489c..c1954f8607f 100644
--- a/addons/crm/report/crm_phonecall_report.py
+++ b/addons/crm/report/crm_phonecall_report.py
@@ -21,7 +21,6 @@
from osv import fields,osv
import tools
-import crm_report
AVAILABLE_STATES = [
('draft','Draft'),
@@ -99,13 +98,6 @@ class crm_phonecall_report(osv.osv):
('object_id.model', '=', 'crm.phonecall')]"),
'partner_id': fields.many2one('res.partner', 'Partner' , readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
- 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
- 'date_closed': fields.datetime('Closed', readonly=True),
- 'opportunity_id': fields.many2one ('crm.opportunity', 'Opportunity'),
- 'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.phonecall')]"),
- 'duration': fields.float('Duration',readonly=True),
- 'date': fields.datetime('Planned Date'),
- 'partner_address_id': fields.many2one('res.partner.address', 'Contact Name', readonly=True)
}
def init(self, cr):
@@ -132,13 +124,6 @@ class crm_phonecall_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
- c.priority as priority,
- c.date_closed as date_closed,
- c.opportunity_id as opportunity_id,
- c.canal_id as canal_id,
- c.date as date,
- c.partner_address_id as partner_address_id,
- sum(c.duration) as duration,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -146,8 +131,6 @@ class crm_phonecall_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id, c.categ_id,c.partner_id,c.company_id
,to_char(c.create_date, 'YYYY-MM-DD'),c.create_date
- ,c.priority,c.date_closed,opportunity_id,canal_id,c.date
- ,partner_address_id
)""")
crm_phonecall_report()
diff --git a/addons/crm/report/crm_phonecall_report_view.xml b/addons/crm/report/crm_phonecall_report_view.xml
index 9f19007ae47..72bc4847608 100644
--- a/addons/crm/report/crm_phonecall_report_view.xml
+++ b/addons/crm/report/crm_phonecall_report_view.xml
@@ -16,18 +16,11 @@
-
-
-
-
-
-
-
@@ -70,46 +63,108 @@
-
+
crm.phonecall.report.select
crm.phonecall.report
search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm_claim/report/crm_claim_report.py b/addons/crm_claim/report/crm_claim_report.py
index b21521157c6..5be9d3c163b 100644
--- a/addons/crm_claim/report/crm_claim_report.py
+++ b/addons/crm_claim/report/crm_claim_report.py
@@ -113,12 +113,6 @@ class crm_claim_report(osv.osv):
'type_id': fields.many2one('crm.case.resource.type', 'Claim Type',\
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),
- 'date_closed': fields.datetime('Closed', readonly=True),
- 'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]"),
- 'som': fields.many2one('res.partner.som', 'State of Mind'),
- 'claim_date': fields.datetime('Date Of Claim',readonly=True),
- 'deadline_date': fields.datetime('Deadline ',readonly=True),
- 'partner_address_id': fields.many2one('res.partner.address','Contact Name',readonly=True),
}
def init(self, cr):
@@ -148,12 +142,6 @@ class crm_claim_report(osv.osv):
0.0 as perc_cancel,
c.priority as priority,
c.type_id as type_id,
- c.date_closed as date_closed,
- c.canal_id as canal_id,
- c.som as som,
- c.create_date as claim_date,
- c.date_deadline as deadline_date,
- c.partner_address_id as partner_address_id,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
@@ -161,8 +149,7 @@ class crm_claim_report(osv.osv):
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), \
c.state, c.user_id,c.section_id, c.stage_id,\
c.categ_id,c.partner_id,c.company_id,c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
- ,c.priority,c.type_id,c.date_closed,c.canal_id,c.som
- ,c.create_date,c.date_deadline,c.partner_address_id
+ ,c.priority,c.type_id,c.som
)""")
crm_claim_report()
diff --git a/addons/crm_claim/report/crm_claim_report_view.xml b/addons/crm_claim/report/crm_claim_report_view.xml
index 615ab54af83..6f906f3d21f 100644
--- a/addons/crm_claim/report/crm_claim_report_view.xml
+++ b/addons/crm_claim/report/crm_claim_report_view.xml
@@ -24,12 +24,6 @@
-
-
-
-
-
-
@@ -73,59 +67,121 @@
-
+
crm.claim.report.select
crm.claim.report
search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/crm_fundraising/report/crm_fundraising_report.py b/addons/crm_fundraising/report/crm_fundraising_report.py
index 07cee8de89b..5c19689257c 100644
--- a/addons/crm_fundraising/report/crm_fundraising_report.py
+++ b/addons/crm_fundraising/report/crm_fundraising_report.py
@@ -21,7 +21,14 @@
from osv import fields,osv
import tools
-import crm_report
+
+AVAILABLE_STATES = [
+ ('draft','Draft'),
+ ('open','Open'),
+ ('cancel', 'Cancelled'),
+ ('done', 'Closed'),
+ ('pending','Pending')
+]
class crm_fundraising_report(osv.osv):
"""CRM Fundraising Report"""
@@ -29,7 +36,7 @@ class crm_fundraising_report(osv.osv):
_name = "crm.fundraising.report"
_auto = False
_description = "CRM Fundraising Report"
-
+
def _get_data(self, cr, uid, ids, field_name, arg, context={}):
""" @param cr: the current row, from the database cursor,
@@ -83,7 +90,7 @@ class crm_fundraising_report(osv.osv):
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'create_date': fields.datetime('Create Date', readonly=True),
- 'day': fields.char('Day', size=128, readonly=True),
+ 'day': fields.char('Day', size=128, readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.fundraising')]"),
@@ -93,13 +100,6 @@ class crm_fundraising_report(osv.osv):
'delay_close': fields.float('Delay to close', digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'partner_id': fields.many2one('res.partner', 'Partner'),
'company_id': fields.many2one('res.company', 'Company'),
- 'priority': fields.selection(crm_report.AVAILABLE_PRIORITIES, 'Priority'),
- 'date_closed': fields.datetime('Closed', readonly=True),
- 'canal_id': fields.many2one('res.partner.canal','Channel',domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.fundraising')]"),
- 'som': fields.many2one('res.partner.som', 'State of Mind'),
- 'type_id': fields.many2one('crm.case.resource.type', 'Fundraising Type', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.fundraising')]"),
}
def init(self, cr):
@@ -126,11 +126,6 @@ class crm_fundraising_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
- c.priority as priority,
- c.date_closed as date_closed,
- c.canal_id as canal_id,
- c.som as som,
- c.type_id as type_id,
date_trunc('day',c.create_date) as create_date,
sum(planned_revenue) as amount_revenue,
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
@@ -140,8 +135,7 @@ class crm_fundraising_report(osv.osv):
crm_fundraising c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),\
c.state, c.user_id,c.section_id,c.categ_id,c.partner_id,c.company_id,
- c.create_date,to_char(c.create_date, 'YYYY-MM-DD'),c.priority,c.date_closed
- ,c.canal_id,c.som,c.type_id
+ c.create_date,to_char(c.create_date, 'YYYY-MM-DD')
)""")
crm_fundraising_report()
diff --git a/addons/crm_fundraising/report/crm_fundraising_report_view.xml b/addons/crm_fundraising/report/crm_fundraising_report_view.xml
index e6ae295098e..73f35ddba50 100644
--- a/addons/crm_fundraising/report/crm_fundraising_report_view.xml
+++ b/addons/crm_fundraising/report/crm_fundraising_report_view.xml
@@ -24,11 +24,6 @@
-
-
-
-
-
@@ -77,34 +72,103 @@
crm.fundraising.report
search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr_recruitment/report/hr_recruitment_report_view.xml b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
index d144efbbc0b..2315e707911 100644
--- a/addons/hr_recruitment/report/hr_recruitment_report_view.xml
+++ b/addons/hr_recruitment/report/hr_recruitment_report_view.xml
@@ -141,11 +141,7 @@
hr.recruitment.report
form
tree,graph
-<<<<<<< TREE
- {'search_default_month':1,'search_default_degree':1,'search_default_job':1,'group_by_no_leaf':1,'group_by':[]}
-=======
{'search_default_month':1,'search_default_User':1,'search_default_user_id':uid,'group_by_no_leaf':1,'group_by':[]}
->>>>>>> MERGE-SOURCE
diff --git a/addons/project_issue/report/project_issue_report_view.xml b/addons/project_issue/report/project_issue_report_view.xml
index f15d734f2ab..5729698392f 100644
--- a/addons/project_issue/report/project_issue_report_view.xml
+++ b/addons/project_issue/report/project_issue_report_view.xml
@@ -11,22 +11,23 @@
+
+
+
+
+
-
-
-
-
@@ -35,7 +36,7 @@
project.issue.report
graph
-
+
@@ -50,10 +51,14 @@
- -->
+
- -->
+
-<<<<<<< TREE
-=======
->>>>>>> MERGE-SOURCE
-
-
-
-<<<<<<< TREE
-=======
-
->>>>>>> MERGE-SOURCE
+
+
+
+
-
-
-
+
+
-
-
-<<<<<<< TREE
-=======
-
->>>>>>> MERGE-SOURCE
-
-
-
-
-<<<<<<< TREE
-=======
-
->>>>>>> MERGE-SOURCE
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 0424b0a2e6e6c46b12b22507457f2b6482e7594f Mon Sep 17 00:00:00 2001
From: "rpa (Open ERP)"
Date: Fri, 21 May 2010 18:18:08 +0530
Subject: [PATCH 142/148] [REVERT]: project_issue: Reverted project_issue
reports
bzr revid: rpa@tinyerp.com-20100521124808-ker6mbusixx74lat
---
addons/project_issue/project_issue.py | 3 ---
.../report/project_issue_report.py | 25 ++++++++-----------
2 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py
index 71f5b851e92..f67986526cd 100644
--- a/addons/project_issue/project_issue.py
+++ b/addons/project_issue/project_issue.py
@@ -142,9 +142,6 @@ class project_issue(osv.osv, crm.crm_case):
'email_cc': fields.text('Watchers Emails', size=252 , help="These people\
will receive a copy of the future" \
" communication between partner and users by email"),
- 'stage_id': fields.many2one('crm.case.stage', 'Stage', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.phonecall')]"),
'date_open': fields.datetime('Opened', readonly=True),
# Project Issue fields
'date_closed': fields.datetime('Closed', readonly=True),
diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py
index 6bc02be3ab2..16dc2eb6ae2 100644
--- a/addons/project_issue/report/project_issue_report.py
+++ b/addons/project_issue/report/project_issue_report.py
@@ -68,21 +68,19 @@ class project_issue_report(osv.osv):
'create_date': fields.datetime('Create Date', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue')]"),
+ 'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"),
'nbr': fields.integer('# of Issues', readonly=True),
'delay_close': fields.float('Avg Closing Delay', digits=(16,2), readonly=True, group_operator="avg",
- help="Number of Days to close the project issue"),
- 'delay_open': fields.float('Avg Opening Delay', digits=(16,2), readonly=True, group_operator="avg",
- help="Number of Days to open the project issue"),
+ help="Number of Days to close the project issue"),
'company_id' : fields.many2one('res.company', 'Company'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'project_id':fields.many2one('project.project', 'Project',readonly=True),
+ 'type_id': fields.many2one('crm.case.resource.type', 'Type', domain="[('object_id.model', '=', 'project.issue')]"),
'date_closed': fields.datetime('Close Date', readonly=True),
- 'date_open': fields.datetime('Opened', readonly=True),
'assigned_to' : fields.many2one('res.users', 'Assigned to',readonly=True),
'partner_id': fields.many2one('res.partner','Partner',domain="[('object_id.model', '=', 'project.issue')]"),
'canal_id': fields.many2one('res.partner.canal', 'Channel',readonly=True),
- 'task_id': fields.many2one('project.task', 'Task',domain="[('object_id.model', '=', 'project.issue')]" ),
- 'partner_address_id': fields.many2one('res.partner.address','Contact ',readonly=True),
+ 'task_id': fields.many2one('project.task', 'Task',domain="[('object_id.model', '=', 'project.issue')]" )
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'project_issue_report')
@@ -97,20 +95,19 @@ class project_issue_report(osv.osv):
c.user_id,
c.section_id,
c.categ_id,
+ c.stage_id,
to_char(c.date_closed, 'YYYY/mm/dd') as date_closed,
u.company_id as company_id,
c.priority as priority,
c.project_id as project_id,
+ c.type_id as type_id,
count(*) as nbr,
c.assigned_to,
c.partner_id,
c.canal_id,
c.task_id,
- c.partner_address_id as partner_address_id,
- c.date_open as date_open,
date_trunc('day',c.create_date) as create_date,
- avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
- avg(extract('epoch' from (c.date_open-c.create_date)))/(3600*24) as delay_open
+ avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close
from
project_issue c
left join
@@ -123,17 +120,17 @@ class project_issue_report(osv.osv):
c.user_id,
c.section_id,
c.categ_id,
+ c.stage_id,
c.date_closed,
u.company_id,
c.priority,
c.project_id,
+ c.type_id,
date_trunc('day',c.create_date),
c.assigned_to,
c.partner_id,
c.canal_id,
- c.task_id,
- c.date_open,
- c.partner_address_id
+ c.task_id
)""")
@@ -141,4 +138,4 @@ project_issue_report()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
From 0b6e1bb0506c7ea1e64335b83be7acc1fff73245 Mon Sep 17 00:00:00 2001
From: "ssi (Open ERP)"
Date: Fri, 21 May 2010 19:16:28 +0530
Subject: [PATCH 143/148] [IMP] marketing_campaign: added few constraints in
segment form and modified views
bzr revid: ssi@tinyerp.com-20100521134628-sk1g1tk4frdv234b
---
addons/marketing_campaign/marketing_campaign.py | 13 +++++++++----
.../marketing_campaign/marketing_campaign_view.xml | 2 +-
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 61dc39e7b39..3edc13090cf 100755
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -37,7 +37,7 @@ class marketing_campaign(osv.osv): #{{{
_columns = {
'name': fields.char('Name', size=64, required=True),
- 'object_id': fields.many2one('ir.model', 'Objects'),
+ 'object_id': fields.many2one('ir.model', 'Objects', required=True),
'mode':fields.selection([('test', 'Test'),
('test_realtime', 'Realtime Time'),
('manual', 'Manual'),
@@ -121,11 +121,16 @@ class marketing_campaign_segment(osv.osv): #{{{
def state_running_set(self, cr, uid, ids, *args):
segment = self.browse(cr, uid, ids[0])
+ curr_date = time.strftime('%Y-%m-%d %H:%M:%S')
if not segment.date_run:
- raise osv.except_osv("Error", "Segment cant be start before giving running date")
+ raise osv.except_osv("Error", "Segment can't be start before giving running date")
if segment.campaign_id.state != 'running' :
raise osv.except_osv("Error", "You have to start campaign first")
- self.write(cr, uid, ids, {'state': 'running'})
+ if (segment.date_run >= curr_date):
+ raise osv.except_osv("Error", "Segment cannot start before run date")
+ if not segment.sync_last_date:
+ self.write(cr, uid, ids, {'sync_last_date':curr_date})
+ self.write(cr, uid, ids, {'state': 'running','date_done': curr_date})
return True
def state_done_set(self, cr, uid, ids, *args):
@@ -195,7 +200,7 @@ class marketing_campaign_activity(osv.osv): #{{{
('paper', 'Paper'),
('action', 'Action'),
('subcampaign', 'Sub-Campaign')],
- 'Type'),
+ 'Type', required=True),
'email_template_id': fields.many2one('poweremail.templates','Email Template'),
'report_id': fields.many2one('ir.actions.report.xml', 'Reports'),
'report_directory_id': fields.many2one('document.directory', 'Directory'),
diff --git a/addons/marketing_campaign/marketing_campaign_view.xml b/addons/marketing_campaign/marketing_campaign_view.xml
index a5553d7e67c..f013f37e853 100755
--- a/addons/marketing_campaign/marketing_campaign_view.xml
+++ b/addons/marketing_campaign/marketing_campaign_view.xml
@@ -143,7 +143,7 @@
-
+
From 52443fa3ffca94927b0bc437a878f20a0ccb0228 Mon Sep 17 00:00:00 2001
From: "qdp-launchpad@tinyerp.com" <>
Date: Fri, 21 May 2010 16:44:32 +0200
Subject: [PATCH 144/148] [IMP] account: set insvisible = 1 on sequence field
of bank_statement_line object
bzr revid: qdp-launchpad@tinyerp.com-20100521144432-l39wwcl9foms58w5
---
addons/account/account_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 6c5be231657..1edb56d6044 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -351,7 +351,7 @@
-
+
From 0df147b637d86c6de56cbcd78b51c4fee5eda1c2 Mon Sep 17 00:00:00 2001
From: "qdp-launchpad@tinyerp.com" <>
Date: Fri, 21 May 2010 16:48:21 +0200
Subject: [PATCH 145/148] [ADD] account_coda
bzr revid: qdp-launchpad@tinyerp.com-20100521144821-vn6x44vvmrq31z8i
---
addons/account_coda/__init__.py | 25 ++
addons/account_coda/__openerp__.py | 39 ++
addons/account_coda/coda.py | 50 +++
addons/account_coda/coda_demo.xml | 5 +
addons/account_coda/coda_view.xml | 63 ++++
addons/account_coda/coda_wizard.xml | 13 +
addons/account_coda/i18n/account_coda.pot | 163 +++++++++
addons/account_coda/i18n/fr_BE.po | 163 +++++++++
.../account_coda/security/ir.model.access.csv | 3 +
addons/account_coda/statement_coda.txt | 10 +
addons/account_coda/wizard/__init__.py | 25 ++
addons/account_coda/wizard/coda_import.py | 339 ++++++++++++++++++
12 files changed, 898 insertions(+)
create mode 100644 addons/account_coda/__init__.py
create mode 100644 addons/account_coda/__openerp__.py
create mode 100644 addons/account_coda/coda.py
create mode 100644 addons/account_coda/coda_demo.xml
create mode 100644 addons/account_coda/coda_view.xml
create mode 100644 addons/account_coda/coda_wizard.xml
create mode 100644 addons/account_coda/i18n/account_coda.pot
create mode 100644 addons/account_coda/i18n/fr_BE.po
create mode 100644 addons/account_coda/security/ir.model.access.csv
create mode 100644 addons/account_coda/statement_coda.txt
create mode 100644 addons/account_coda/wizard/__init__.py
create mode 100644 addons/account_coda/wizard/coda_import.py
diff --git a/addons/account_coda/__init__.py b/addons/account_coda/__init__.py
new file mode 100644
index 00000000000..af866f5dc70
--- /dev/null
+++ b/addons/account_coda/__init__.py
@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import coda
+import wizard
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/account_coda/__openerp__.py b/addons/account_coda/__openerp__.py
new file mode 100644
index 00000000000..306098d137b
--- /dev/null
+++ b/addons/account_coda/__openerp__.py
@@ -0,0 +1,39 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+{
+ "name":"Account CODA - import bank statements from coda file",
+ "version":"1.0",
+ "author":"Tiny",
+ "category":"Account CODA",
+ "description":"""Module provides functionality to import
+ bank statements from coda files.
+ """,
+ "depends":["base", "account"],
+ "demo_xml":["coda_demo.xml"],
+ "init_xml":[],
+ "update_xml" : ["security/ir.model.access.csv","coda_wizard.xml","coda_view.xml"],
+ "active":False,
+ "installable":True,
+
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/account_coda/coda.py b/addons/account_coda/coda.py
new file mode 100644
index 00000000000..f37b563c245
--- /dev/null
+++ b/addons/account_coda/coda.py
@@ -0,0 +1,50 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import time
+from osv import osv,fields
+
+class account_coda(osv.osv):
+ _name = "account.coda"
+ _description = "coda for an Account"
+ _columns = {
+ 'name': fields.binary('Coda file', readonly=True),
+ 'statement_ids': fields.one2many('account.bank.statement','coda_id','Generated Bank Statement', readonly=True),
+ 'note': fields.text('Import log', readonly=True),
+ 'journal_id': fields.many2one('account.journal','Bank Journal', readonly=True,select=True),
+ 'date': fields.date('Import Date', readonly=True,select=True),
+ 'user_id': fields.many2one('res.users','User', readonly=True, select=True),
+ }
+ _defaults = {
+ 'date': lambda *a: time.strftime('%Y-%m-%d'),
+ 'user_id': lambda self,cr,uid,context: uid,
+ }
+account_coda()
+
+class account_bank_statement(osv.osv):
+ _inherit = "account.bank.statement"
+ _columns = {
+ 'coda_id':fields.many2one('account.coda','Coda'),
+ }
+account_bank_statement()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/account_coda/coda_demo.xml b/addons/account_coda/coda_demo.xml
new file mode 100644
index 00000000000..f91d34d4cbc
--- /dev/null
+++ b/addons/account_coda/coda_demo.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/addons/account_coda/coda_view.xml b/addons/account_coda/coda_view.xml
new file mode 100644
index 00000000000..3813fe40bf0
--- /dev/null
+++ b/addons/account_coda/coda_view.xml
@@ -0,0 +1,63 @@
+
+
+
+
+
+ account.coda.form
+ account.coda
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.coda.tree
+ account.coda
+ tree
+
+
+
+
+
+
+
+
+
+
+ Coda import
+ ir.actions.act_window
+ account.coda
+ form
+ tree,form
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/account_coda/coda_wizard.xml b/addons/account_coda/coda_wizard.xml
new file mode 100644
index 00000000000..ecd8eb65913
--- /dev/null
+++ b/addons/account_coda/coda_wizard.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/addons/account_coda/i18n/account_coda.pot b/addons/account_coda/i18n/account_coda.pot
new file mode 100644
index 00000000000..348fb035c0d
--- /dev/null
+++ b/addons/account_coda/i18n/account_coda.pot
@@ -0,0 +1,163 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * account_coda
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-24 13:11:29+0000\n"
+"PO-Revision-Date: 2009-11-24 13:11:29+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_coda
+#: field:account.coda,journal_id:0
+#: wizard_field:account.coda_import,init,journal_id:0
+msgid "Bank Journal"
+msgstr ""
+
+#. module: account_coda
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: account_coda
+#: wizard_field:account.coda_import,extraction,note:0
+msgid "Log"
+msgstr ""
+
+#. module: account_coda
+#: wizard_button:account.coda_import,extraction,open:0
+msgid "_Open Statement"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.module.module,shortdesc:account_coda.module_meta_information
+msgid "Account CODA"
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,name:0
+msgid "Coda file"
+msgstr ""
+
+#. module: account_coda
+#: wizard_view:account.coda_import,init:0
+msgid "Clic on 'New' to select your file :"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
+msgid "Import Coda File"
+msgstr ""
+
+#. module: account_coda
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,note:0
+msgid "Import log"
+msgstr ""
+
+#. module: account_coda
+#: wizard_field:account.coda_import,init,def_receivable:0
+msgid "Default receivable Account"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.module.module,description:account_coda.module_meta_information
+msgid "Module provides functionality to import\n"
+" bank statements from .csv file.\n"
+" Import coda file wizard is used to import bank statements."
+msgstr ""
+
+#. module: account_coda
+#: wizard_button:account.coda_import,extraction,end:0
+msgid "_Close"
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,statement_id:0
+msgid "Generated Bank Statement"
+msgstr ""
+
+#. module: account_coda
+#: view:account.coda:0
+#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
+#: model:ir.actions.act_window,name:account_coda.action_account_coda
+msgid "Coda import"
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,user_id:0
+msgid "User"
+msgstr ""
+
+#. module: account_coda
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.model,name:account_coda.model_account_coda
+msgid "coda for an Account"
+msgstr ""
+
+#. module: account_coda
+#: wizard_field:account.coda_import,init,def_payable:0
+msgid "Default Payable Account"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.ui.menu,name:account_coda.menu_account_coda
+msgid "Coda Statements"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
+msgid "Import Coda Statements"
+msgstr ""
+
+#. module: account_coda
+#: wizard_button:account.coda_import,init,extraction:0
+msgid "_Ok"
+msgstr ""
+
+#. module: account_coda
+#: wizard_view:account.coda_import,extraction:0
+#: wizard_view:account.coda_import,init:0
+msgid "Import Coda Statement"
+msgstr ""
+
+#. module: account_coda
+#: field:account.bank.statement,coda_id:0
+msgid "Coda"
+msgstr ""
+
+#. module: account_coda
+#: wizard_view:account.coda_import,extraction:0
+msgid "Results :"
+msgstr ""
+
+#. module: account_coda
+#: wizard_field:account.coda_import,init,coda:0
+msgid "Coda File"
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,date:0
+msgid "Import Date"
+msgstr ""
+
+#. module: account_coda
+#: wizard_view:account.coda_import,init:0
+msgid "Select your bank journal :"
+msgstr ""
+
diff --git a/addons/account_coda/i18n/fr_BE.po b/addons/account_coda/i18n/fr_BE.po
new file mode 100644
index 00000000000..348fb035c0d
--- /dev/null
+++ b/addons/account_coda/i18n/fr_BE.po
@@ -0,0 +1,163 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+# * account_coda
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 5.0.6\n"
+"Report-Msgid-Bugs-To: support@openerp.com\n"
+"POT-Creation-Date: 2009-11-24 13:11:29+0000\n"
+"PO-Revision-Date: 2009-11-24 13:11:29+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: account_coda
+#: field:account.coda,journal_id:0
+#: wizard_field:account.coda_import,init,journal_id:0
+msgid "Bank Journal"
+msgstr ""
+
+#. module: account_coda
+#: constraint:ir.model:0
+msgid "The Object name must start with x_ and not contain any special character !"
+msgstr ""
+
+#. module: account_coda
+#: wizard_field:account.coda_import,extraction,note:0
+msgid "Log"
+msgstr ""
+
+#. module: account_coda
+#: wizard_button:account.coda_import,extraction,open:0
+msgid "_Open Statement"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.module.module,shortdesc:account_coda.module_meta_information
+msgid "Account CODA"
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,name:0
+msgid "Coda file"
+msgstr ""
+
+#. module: account_coda
+#: wizard_view:account.coda_import,init:0
+msgid "Clic on 'New' to select your file :"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
+msgid "Import Coda File"
+msgstr ""
+
+#. module: account_coda
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,note:0
+msgid "Import log"
+msgstr ""
+
+#. module: account_coda
+#: wizard_field:account.coda_import,init,def_receivable:0
+msgid "Default receivable Account"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.module.module,description:account_coda.module_meta_information
+msgid "Module provides functionality to import\n"
+" bank statements from .csv file.\n"
+" Import coda file wizard is used to import bank statements."
+msgstr ""
+
+#. module: account_coda
+#: wizard_button:account.coda_import,extraction,end:0
+msgid "_Close"
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,statement_id:0
+msgid "Generated Bank Statement"
+msgstr ""
+
+#. module: account_coda
+#: view:account.coda:0
+#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
+#: model:ir.actions.act_window,name:account_coda.action_account_coda
+msgid "Coda import"
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,user_id:0
+msgid "User"
+msgstr ""
+
+#. module: account_coda
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.model,name:account_coda.model_account_coda
+msgid "coda for an Account"
+msgstr ""
+
+#. module: account_coda
+#: wizard_field:account.coda_import,init,def_payable:0
+msgid "Default Payable Account"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.ui.menu,name:account_coda.menu_account_coda
+msgid "Coda Statements"
+msgstr ""
+
+#. module: account_coda
+#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
+msgid "Import Coda Statements"
+msgstr ""
+
+#. module: account_coda
+#: wizard_button:account.coda_import,init,extraction:0
+msgid "_Ok"
+msgstr ""
+
+#. module: account_coda
+#: wizard_view:account.coda_import,extraction:0
+#: wizard_view:account.coda_import,init:0
+msgid "Import Coda Statement"
+msgstr ""
+
+#. module: account_coda
+#: field:account.bank.statement,coda_id:0
+msgid "Coda"
+msgstr ""
+
+#. module: account_coda
+#: wizard_view:account.coda_import,extraction:0
+msgid "Results :"
+msgstr ""
+
+#. module: account_coda
+#: wizard_field:account.coda_import,init,coda:0
+msgid "Coda File"
+msgstr ""
+
+#. module: account_coda
+#: field:account.coda,date:0
+msgid "Import Date"
+msgstr ""
+
+#. module: account_coda
+#: wizard_view:account.coda_import,init:0
+msgid "Select your bank journal :"
+msgstr ""
+
diff --git a/addons/account_coda/security/ir.model.access.csv b/addons/account_coda/security/ir.model.access.csv
new file mode 100644
index 00000000000..9c1e0a486dc
--- /dev/null
+++ b/addons/account_coda/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_account_coda","account.coda","model_account_coda","account.group_account_user",1,0,0,0
+"access_account_coda_manager","account.coda","model_account_coda","account.group_account_manager",1,1,1,1
\ No newline at end of file
diff --git a/addons/account_coda/statement_coda.txt b/addons/account_coda/statement_coda.txt
new file mode 100644
index 00000000000..44fe70220ca
--- /dev/null
+++ b/addons/account_coda/statement_coda.txt
@@ -0,0 +1,10 @@
+0000006060712505 00000CPH CODA TINY 0047747270100477472701 00000 1
+1 049126201326907 EUR0BE 0000000015632900050607TINY COMPTE COURANT ORDINAIRE 049
+2100010000 0000000001150000060607001500000INVOICE OF 2006-12-19 0606070020100
+2200010000 EUR000000001150000 100
+2300010000301915554082 PROLIBRE SARL CAROUGE GE 000
+2100020000 0000000000500000060607001500000CONTRACT PARTNER ERREUR ECART YEA 0606070030100
+2200020000RTY CONTRACT PARTNER EUR000000000500000 100
+2300020000050000000017 SEDNACOM 43 ALLEE DES FOUGERES 9522 0 HERBLAY 000
+8049126201326907 0000000017282900060607
+9 000008000000000000000000000001650000 2
diff --git a/addons/account_coda/wizard/__init__.py b/addons/account_coda/wizard/__init__.py
new file mode 100644
index 00000000000..72d3b950cf7
--- /dev/null
+++ b/addons/account_coda/wizard/__init__.py
@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import coda_import
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/account_coda/wizard/coda_import.py b/addons/account_coda/wizard/coda_import.py
new file mode 100644
index 00000000000..5e1ffa365e8
--- /dev/null
+++ b/addons/account_coda/wizard/coda_import.py
@@ -0,0 +1,339 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2009 Tiny SPRL ().
+#
+# 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 .
+#
+##############################################################################
+
+import pooler
+import time
+import datetime
+import wizard
+import netsvc
+import base64
+from osv import osv
+from tools.translate import _
+
+codawiz_form = """
+
+
+
+
+
+
+
+
+
+
+"""
+
+codawiz_fields = {
+ 'journal_id' : {
+ 'string':'Bank Journal',
+ 'type':'many2one',
+ 'relation':'account.journal',
+ 'required':True,
+
+ },
+ 'coda' : {
+ 'string':'Coda File',
+ 'type':'binary',
+ 'required':True,
+ },
+ 'def_payable' : {
+ 'string' : 'Default Payable Account',
+ 'type' : 'many2one',
+ 'relation': 'account.account',
+ 'required':True,
+ 'domain':[('type','=','payable')],
+ 'help': 'Set here the payable account that will be used, by default, if the partner is not found',
+ },
+ 'def_receivable' : {
+ 'string' : 'Default receivable Account',
+ 'type' : 'many2one',
+ 'relation': 'account.account',
+ 'required':True,
+ 'domain':[('type','=','receivable')],
+ 'help': 'Set here the receivable account that will be used, by default, if the partner is not found',
+ },
+ 'awaiting_account' : {
+ 'string' : 'Default Account for Unrecognized Movement',
+ 'type' : 'many2one',
+ 'relation': 'account.account',
+ 'required':True,
+ 'help': 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',
+
+ }
+
+}
+
+result_form = """
+
+
+
+
+"""
+
+result_fields = {
+
+ 'note' : {'string':'Log','type':'text'}
+
+}
+
+
+def _coda_parsing(self, cr, uid, data, context):
+ pool = pooler.get_pool(cr.dbname)
+ codafile = data['form']['coda']
+ journal_code = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context).code
+ def_pay_acc = data['form']['def_payable']
+ def_rec_acc = data['form']['def_receivable']
+
+ str_log = ""
+ err_log = "Errors:\n------\n"
+ nb_err=0
+ std_log=''
+ str_log1 = "Coda File is Imported : "
+ str_not=''
+ str_not1=''
+
+ bank_statements=[]
+ recordlist = base64.decodestring(codafile).split('\n')
+ recordlist.pop()
+ for line in recordlist:
+ if line[0] == '0':
+ # header data
+ bank_statement = {}
+ bank_statement["bank_statement_line"]={}
+ bank_statement_lines = {}
+ bank_statement['date'] = str2date(line[5:11])
+ bank_statement['journal_id']=data['form']['journal_id']
+ period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))])
+ bank_statement['period_id'] = period_id[0]
+ bank_statement['state']='draft'
+ elif line[0] == '1':
+ # old balance data
+ bal_start = list2float(line[43:58])
+ if line[42] == '1':
+ bal_start = - bal_start
+ bank_statement["balance_start"]= bal_start
+ bank_statement["acc_number"]=line[5:17]
+ bank_statement["acc_holder"]=line[64:90]
+ bank_statement['name'] = journal_code + ' ' + str(line[2:5])
+
+ elif line[0]=='2':
+ # movement data record 2
+ if line[1]=='1':
+ # movement data record 2.1
+ if bank_statement_lines.has_key(line[2:6]):
+ continue
+ st_line = {}
+ st_line['extra_note'] = ''
+ st_line['statement_id']=0
+ st_line['ref'] = line[2:10]
+ st_line['date'] = time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
+ st_line_amt = list2float(line[32:47])
+
+ if line[61]=='1':
+ st_line['toreconcile'] = True
+ st_line['name']=line[65:77]
+ else:
+ st_line['toreconcile'] = False
+ st_line['name']=line[62:115]
+
+ st_line['free_comm'] = st_line['name']
+ st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[47:53]),"%y/%m/%d")),
+ st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
+ st_line['partner_id']=0
+ if line[31] == '1':
+ st_line_amt = - st_line_amt
+ st_line['account_id'] = def_pay_acc
+ else:
+ st_line['account_id'] = def_rec_acc
+ st_line['amount'] = st_line_amt
+ bank_statement_lines[line[2:6]]=st_line
+ bank_statement["bank_statement_line"]=bank_statement_lines
+ elif line[1] == '2':
+ st_line_name = line[2:6]
+ bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
+
+ elif line[1] == '3':
+ # movement data record 3.1
+ st_line_name = line[2:6]
+ st_line_partner_acc = str(line[10:47]).strip()
+ cntry_number=line[10:47].strip()
+ contry_name=line[47:125].strip()
+ bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line_partner_acc)])
+ bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
+ if bank_ids:
+ bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context)
+ if line and bank.partner_id:
+ bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
+ if bank_statement_lines[st_line_name]['amount'] < 0 :
+ bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
+ else :
+ bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
+ else:
+ nb_err += 1
+ err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number,contry_name)
+ bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
+
+ bank_statement["bank_statement_line"]=bank_statement_lines
+ elif line[0]=='3':
+ if line[1] == '1':
+ st_line_name = line[2:6]
+ bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113]
+ elif line[1] == '2':
+ st_line_name = line[2:6]
+ bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115]
+ elif line[1] == '3':
+ st_line_name = line[2:6]
+ bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100]
+ elif line[0]=='8':
+ # new balance record
+ bal_end = list2float(line[42:57])
+ if line[41] == '1':
+ bal_end = - bal_end
+ bank_statement["balance_end_real"]= bal_end
+
+ elif line[0]=='9':
+ # footer record
+ bank_statements.append(bank_statement)
+ #end for
+ bkst_list=[]
+ for statement in bank_statements:
+ try:
+ bk_st_id = pool.get('account.bank.statement').create(cr,uid,{
+ 'journal_id': statement['journal_id'],
+ 'date':time.strftime('%Y-%m-%d',time.strptime(statement['date'],"%y/%m/%d")),
+ 'period_id':statement['period_id'],
+ 'balance_start': statement["balance_start"],
+ 'balance_end_real': statement["balance_end_real"],
+ 'state': 'draft',
+ 'name': statement['name'],
+ })
+ lines=statement["bank_statement_line"]
+ for value in lines:
+ line=lines[value]
+ reconcile_id = False
+ if line['toreconcile']:
+ rec_id = pool.get('account.move.line').search(cr, uid, [('name','=',line['name']),('reconcile_id','=',False),('account_id.reconcile','=',True)])
+ if rec_id:
+ reconcile_id = pool.get('account.bank.statement.reconcile').create(cr, uid, {
+ 'line_ids': [(6, 0, rec_id)]
+ }, context=context)
+ str_not1 = ''
+ if line.has_key('contry_name') and line.has_key('cntry_number'):
+ str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"],line["cntry_number"],line["free_comm"]+line['extra_note'],line["val_date"][0],line["entry_date"][0])
+ id=pool.get('account.bank.statement.line').create(cr,uid,{
+ 'name':line['name'],
+ 'date': line['date'],
+ 'amount': line['amount'],
+ 'partner_id':line['partner_id'] or 0,
+ 'account_id':line['account_id'],
+ 'statement_id': bk_st_id,
+ 'reconcile_id': reconcile_id,
+ 'note':str_not1,
+ 'ref':line['ref'],
+ })
+
+ str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"],statement["acc_holder"])
+ std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
+ %(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
+ bkst_list.append(bk_st_id)
+
+ except osv.except_osv, e:
+ cr.rollback()
+ nb_err+=1
+ err_log += '\n Application Error : ' + str(e)
+ raise # REMOVEME
+
+ except Exception, e:
+ cr.rollback()
+ nb_err+=1
+ err_log += '\n System Error : '+str(e)
+ raise # REMOVEME
+ except :
+ cr.rollback()
+ nb_err+=1
+ err_log += '\n Unknown Error'
+ raise
+ err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
+ err_log += '\nNumber of error :'+ str(nb_err) +'\n'
+
+ pool.get('account.coda').create(cr, uid,{
+ 'name':codafile,
+ 'statement_ids': [(6, 0, bkst_list,)],
+ 'note':str_log1+str_not+std_log+err_log,
+ 'journal_id':data['form']['journal_id'],
+ 'date':time.strftime("%Y-%m-%d"),
+ 'user_id':uid,
+ })
+
+ return {'note':str_log1 + std_log + err_log ,'journal_id': data['form']['journal_id'], 'coda': data['form']['coda'],'statment_ids':bkst_list}
+
+
+def str2date(date_str):
+ return time.strftime("%y/%m/%d",time.strptime(date_str,"%d%m%y"))
+
+def str2float(str):
+ try:
+ return float(str)
+ except:
+ return 0.0
+
+def list2float(lst):
+ try:
+ return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
+ except:
+ return 0.0
+
+class coda_import(wizard.interface):
+ def _action_open_window(self, cr, uid, data, context):
+ form=data['form']
+ return {
+ 'domain':"[('id','in',%s)]"%(form['statment_ids']),
+ 'name': 'Statement',
+ 'view_type': 'form',
+ 'view_mode': 'tree,form',
+ 'res_model': 'account.bank.statement',
+ 'view_id': False,
+ 'type': 'ir.actions.act_window',
+ }
+ states = {
+ 'init' : {
+ 'actions' : [],
+ 'result' : {'type' : 'form',
+ 'arch' : codawiz_form,
+ 'fields' : codawiz_fields,
+ 'state' : [('end', '_Close'),('extraction', '_Ok') ]}
+ },
+ 'extraction' : {
+ 'actions' : [_coda_parsing],
+ 'result' : {'type' : 'form',
+ 'arch' : result_form,
+ 'fields' : result_fields,
+ 'state' : [('end', '_Close'),('open', '_Open Statement')]}
+ },
+ 'open': {
+ 'actions': [],
+ 'result': {'type': 'action', 'action': _action_open_window, 'state': 'end'}
+
+ },
+
+ }
+coda_import("account.coda_import")
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
From daef48e9ab1b715dc261ad172d80d3f1559f3c39 Mon Sep 17 00:00:00 2001
From: "qdp-launchpad@tinyerp.com" <>
Date: Fri, 21 May 2010 16:49:27 +0200
Subject: [PATCH 146/148] [IMP] l10n_be: added dependancy to account_coda
module
bzr revid: qdp-launchpad@tinyerp.com-20100521144927-uc6y8boincfndg7f
---
addons/l10n_be/__openerp__.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/l10n_be/__openerp__.py b/addons/l10n_be/__openerp__.py
index 6c13990fc45..c8fdb530a45 100644
--- a/addons/l10n_be/__openerp__.py
+++ b/addons/l10n_be/__openerp__.py
@@ -45,7 +45,8 @@
'account_report',
'base_vat',
'base_iban',
- 'account_chart'
+ 'account_chart',
+ 'account_coda',
],
'init_xml': [],
'update_xml': [
From ed4bd172405cd2d05d40c51c90992b509702b348 Mon Sep 17 00:00:00 2001
From: "DSH (Open ERP)"
Date: Fri, 21 May 2010 21:20:09 +0530
Subject: [PATCH 147/148] [IMP] process functions of wi,segment
bzr revid: dsh@tinyerp.com-20100521155009-wcqadc8q8a05kdxl
---
.../marketing_campaign/marketing_campaign.py | 81 ++++++++++++++-----
1 file changed, 63 insertions(+), 18 deletions(-)
diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py
index 3edc13090cf..52733fad159 100755
--- a/addons/marketing_campaign/marketing_campaign.py
+++ b/addons/marketing_campaign/marketing_campaign.py
@@ -19,10 +19,12 @@
#
##############################################################################
import time
+import base64
from datetime import datetime
from dateutil.relativedelta import relativedelta
from osv import fields, osv
+import netsvc
_intervalTypes = {
'hours': lambda interval: relativedelta(hours=interval),
@@ -169,16 +171,16 @@ class marketing_campaign_segment(osv.osv): #{{{
for o_ids in model_obj.read(cr, uid, object_ids) :
partner_id = 'partner_id' in o_ids and o_ids['partner_id'] \
or False
- for act_id in act_ids:
- wi_vals = {'segment_id': segment.id,
- 'activity_id': act_id,
- 'date': action_date,
- 'partner_id': 1,
- 'state': 'todo',
- }
- print self.pool.get('marketing.campaign.workitem').create(cr,
- uid, wi_vals)
-
+ if partner_id:
+ for act_id in act_ids:
+ wi_vals = {'segment_id': segment.id,
+ 'activity_id': act_id,
+ 'date': action_date,
+ 'partner_id': partner_id[0],
+ 'state': 'todo',
+ }
+ self.pool.get('marketing.campaign.workitem').create(
+ cr, uid, wi_vals)
self.write(cr, uid, segment.id, {'sync_last_date':action_date})
return True
@@ -232,7 +234,26 @@ class marketing_campaign_activity(osv.osv): #{{{
return act_ids
return super(marketing_campaign_activity, self).search(cr, uid, args,
offset, limit, order, context, count)
-
+
+ def process(self, cr, uid, act_id, wi_id, context={}):
+ activity = self.browse(cr, uid, act_id)
+ workitem = self.pool.get('marketing.campaign.workitem').browse(cr, uid, wi_id)
+ if activity.type == 'paper' :
+ service = netsvc.LocalService('report.%s'%activity.report_id.report_name)
+ (report_data, format) = service.create(cr, uid, [activity.report_id.id], {}, {})
+ attach_vals = {
+ 'name': '%s_%s_%s'%(activity.report_id.report_name,
+ activity.name,workitem.partner_id.name),
+ 'datas_fname': '%s.%s'%(activity.report_id.report_name,
+ activity.report_id.report_type),
+ 'parent_id': activity.report_directory_id.id,
+ 'datas': base64.encodestring(report_data),
+ 'file_type': format
+ }
+ self.pool.get('ir.attachment').create(cr, uid, attach_vals)
+# elif activity.type == 'email' :
+
+ return True
marketing_campaign_activity()#}}}
class marketing_campaign_transition(osv.osv): #{{{
@@ -284,13 +305,15 @@ class marketing_campaign_workitem(osv.osv): #{{{
def process_chain(self, cr, uid, workitem_id, context={}):
workitem = self.browse(cr, uid, workitem_id)
- to_ids = [to_ids.id for to_ids in workitem.activity_id.to_ids]
mct_obj = self.pool.get('marketing.campaign.transition')
- process_to_id = mct_obj.search(cr,uid, [('id', 'in', to_ids),
- ('activity_from_id','=', 'activity_id')])
+ process_to_id = mct_obj.search(cr,uid, [
+ ('activity_from_id','=', workitem.activity_id.id)])
for mct_id in mct_obj.browse(cr, uid, process_to_id):
- launch_date = datetime.now() + _intervalTypes[ \
- mct_id.interval_type](mct_id.interval_nbr)
+ if mct_id.interval_type and mct_id.interval_nbr :
+ launch_date = (datetime.now() + _intervalTypes[ \
+ mct_id.interval_type](mct_id.interval_nbr) \
+ ).strftime('%Y-%m-%d %H:%M:%S')
+ launch_date = time.strftime('%Y-%m-%d %H:%M:%S')
workitem_vals = {'segment_id': workitem.segment_id.id,
'activity_id': mct_id.activity_to_id.id,
'date': launch_date,
@@ -300,9 +323,31 @@ class marketing_campaign_workitem(osv.osv): #{{{
self.create(cr, uid, workitem_vals)
def process(self, cr, uid, workitem_ids, context={}):
- #for wi in self.browse(cr, uid, workitem_ids):
- # if wi.state == 'todo'# we searched the wi which are in todo state
+ for wi in self.browse(cr, uid, workitem_ids):
+ if wi.state == 'todo' :# we searched the wi which are in todo state
#then y v keep this filter again
+ eval_context = {
+ 'pool': self.pool,
+ 'cr': cr,
+ 'uid': uid,
+ 'wi': wi,
+ 'object': wi.activity_id,
+ 'transition' : wi.activity_id.to_ids
+ }
+ val = {}
+ exec wi.activity_id.condition.replace('\r','') in \
+ eval_context, val
+ if 'action' in val and val['action']:
+ try :
+ self.pool.get('marketing.campaign.activity').process(cr,
+ uid, wi.activity_id.id, wi.id, context)
+ self.write(cr, uid, wi.id, {'state':'done'})
+ self.process_chain(cr, uid, wi.id, context)
+ except Exception,e:
+ self.write(cr, uid, wi.id, {'state':'exception'})
+ else :
+ self.write(cr, uid, wi.id, {'state':'cancelled'})
+
return True
def process_all(self, cr, uid, context={}):
From 96c656ba20a953324b1361d42182846cccde06f8 Mon Sep 17 00:00:00 2001
From: Launchpad Code Hosting
Date: Mon, 24 May 2010 04:46:27 +0100
Subject: [PATCH 148/148] Launchpad automatic translations update.
bzr revid: codehost@crowberry-20100522040043-rt8orglyuiq59yf6
bzr revid: codehost@crowberry-20100523035744-1cwp4kxjmckdc2qq
bzr revid: codehost@crowberry-20100524034627-1hab3ro34ehkd3pf
---
addons/account/i18n/eu.po | 12 +-
addons/account/i18n/fr.po | 16 +-
addons/audittrail/i18n/fr.po | 16 +-
addons/board_manufacturing/i18n/pl.po | 16 +-
addons/board_sale/i18n/pl.po | 10 +-
addons/crm/i18n/it.po | 8 +-
addons/crm/i18n/pl.po | 867 +++++++------
addons/crm/i18n/pt_BR.po | 12 +-
addons/crm_profiling/i18n/pl.po | 22 +-
addons/document_ics/i18n/fr.po | 71 +-
addons/event_project/i18n/fr.po | 14 +-
addons/hr/i18n/pl.po | 8 +-
addons/l10n_fr/i18n/fr.po | 319 ++---
addons/mrp/i18n/fr.po | 14 +-
addons/mrp/i18n/pl.po | 8 +-
addons/multi_company/i18n/fr.po | 46 +-
addons/olap/i18n/fr.po | 1402 ++++++++++++++++++++++
addons/olap_crm/i18n/fr.po | 34 +
addons/olap_extract/i18n/fr.po | 59 +
addons/olap_sale/i18n/fr.po | 34 +
addons/point_of_sale/i18n/fr.po | 26 +-
addons/project_gtd/i18n/fr.po | 16 +-
addons/sale/i18n/fr.po | 8 +-
addons/sale/i18n/pl.po | 6 +-
addons/scrum/i18n/fr.po | 82 +-
addons/smtpclient/i18n/fr.po | 871 ++++++++++++++
addons/stock/i18n/fr.po | 20 +-
addons/stock/i18n/pl.po | 6 +-
addons/stock_invoice_directly/i18n/fr.po | 8 +-
29 files changed, 3279 insertions(+), 752 deletions(-)
create mode 100644 addons/olap/i18n/fr.po
create mode 100644 addons/olap_crm/i18n/fr.po
create mode 100644 addons/olap_extract/i18n/fr.po
create mode 100644 addons/olap_sale/i18n/fr.po
create mode 100644 addons/smtpclient/i18n/fr.po
diff --git a/addons/account/i18n/eu.po b/addons/account/i18n/eu.po
index 68344247171..84652c621ae 100644
--- a/addons/account/i18n/eu.po
+++ b/addons/account/i18n/eu.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-05-17 13:10+0000\n"
-"Last-Translator: Jon A. Ortuondo (Euskotec) \n"
+"PO-Revision-Date: 2010-05-23 09:59+0000\n"
+"Last-Translator: ninaiz \n"
"Language-Team: Basque \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-05-19 05:12+0000\n"
+"X-Launchpad-Export-Date: 2010-05-24 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -236,7 +236,7 @@ msgstr ""
#: field:account.tax.template,amount:0
#: xsl:account.transfer:0
msgid "Amount"
-msgstr ""
+msgstr "Kopurua"
#. module: account
#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger
@@ -338,7 +338,7 @@ msgstr ""
#: field:account.invoice,amount_tax:0
#: field:account.move.line,account_tax_id:0
msgid "Tax"
-msgstr ""
+msgstr "Zerga"
#. module: account
#: rml:account.general.journal:0
@@ -465,7 +465,7 @@ msgstr ""
#. module: account
#: rml:account.invoice:0
msgid "Disc.(%)"
-msgstr ""
+msgstr "Desk. (%)"
#. module: account
#: rml:account.general.ledger:0
diff --git a/addons/account/i18n/fr.po b/addons/account/i18n/fr.po
index 1785d79bf38..e6bddde1647 100644
--- a/addons/account/i18n/fr.po
+++ b/addons/account/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.1\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-02-18 09:24+0000\n"
-"Last-Translator: Olivier Dony (OpenERP) \n"
+"PO-Revision-Date: 2010-05-21 17:48+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:06+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -2495,7 +2495,8 @@ msgid "Analytic Entry"
msgstr "Ecriture analytique"
#. module: account
-#: view:res.company:0 field:res.company,overdue_msg:0
+#: view:res.company:0
+#: field:res.company,overdue_msg:0
msgid "Overdue Payments Message"
msgstr "Message pour les paiements en retard"
@@ -2784,7 +2785,7 @@ msgstr "Ouvrir journal"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "KI"
-msgstr ""
+msgstr "KI"
#. module: account
#: model:ir.actions.wizard,name:account.action_account_analytic_line
@@ -3034,7 +3035,7 @@ msgstr "-"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "asgfas"
-msgstr ""
+msgstr "asgfas"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_account_tree2
@@ -6082,3 +6083,6 @@ msgid ""
msgstr ""
"Cochez cette case si l'utilisateur peut réconcilier les entrées dans ce "
"compte."
+
+#~ msgid "account.config.wizard"
+#~ msgstr "account.config.wizard"
diff --git a/addons/audittrail/i18n/fr.po b/addons/audittrail/i18n/fr.po
index 12c15bb34f4..fbe01ff7c9b 100644
--- a/addons/audittrail/i18n/fr.po
+++ b/addons/audittrail/i18n/fr.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-09-08 14:56+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2010-05-21 17:51+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:17+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: audittrail
#: model:ir.module.module,shortdesc:audittrail.module_meta_information
msgid "Audit Trail"
-msgstr ""
+msgstr "Rapport de l' audit"
#. module: audittrail
#: constraint:ir.model:0
@@ -72,7 +72,7 @@ msgstr "Ancienne valeur"
#. module: audittrail
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nom de modèle invalide pour la définition de l'action"
#. module: audittrail
#: model:ir.actions.wizard,name:audittrail.wizard_audittrail_log
@@ -143,7 +143,7 @@ msgstr "Règle AuditTrail"
#. module: audittrail
#: wizard_field:audittrail.view.log,init,to:0
msgid "Log To"
-msgstr ""
+msgstr "Connecter à"
#. module: audittrail
#: view:audittrail.log:0
@@ -158,6 +158,10 @@ msgid ""
" Subscribe Rules for read, write, create and delete on objects and check "
"logs"
msgstr ""
+"Autorise un administrateur à tracer toutes les manipulations des "
+"utilisateurs sur tous les objets du système.\n"
+" Règles d'abonnement pour la lecture, l'écriture, la création, la "
+"suppression des objets et la consultation des journaux"
#. module: audittrail
#: field:audittrail.log,timestamp:0
diff --git a/addons/board_manufacturing/i18n/pl.po b/addons/board_manufacturing/i18n/pl.po
index 26654a8a158..7f70507e0a7 100644
--- a/addons/board_manufacturing/i18n/pl.po
+++ b/addons/board_manufacturing/i18n/pl.po
@@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-21 15:58+0000\n"
-"Last-Translator: Andrzej MoST (Marcin Ostajewski) \n"
+"PO-Revision-Date: 2010-05-23 20:02+0000\n"
+"Last-Translator: Grzegorz Grzelak (Cirrus.pl) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:00+0000\n"
+"X-Launchpad-Export-Date: 2010-05-24 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_manufacturing
#: view:board.board:0
msgid "Procurement in Exception"
-msgstr ""
+msgstr "Niepoprawne nabycia"
#. module: board_manufacturing
#: view:board.board:0
@@ -34,7 +34,7 @@ msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
#. module: board_manufacturing
#: view:board.board:0
msgid "Deliveries (Out packing)"
-msgstr ""
+msgstr "Dostawy do klientów"
#. module: board_manufacturing
#: view:board.board:0
@@ -49,7 +49,7 @@ msgstr "Produkcja"
#. module: board_manufacturing
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: board_manufacturing
#: model:ir.actions.act_window,name:board_manufacturing.open_board_manufacturing
@@ -65,9 +65,9 @@ msgstr "Konsola dla produkcji"
#. module: board_manufacturing
#: view:board.board:0
msgid "Stock value variation"
-msgstr ""
+msgstr "Zmiany wartości zapasów"
#. module: board_manufacturing
#: view:board.board:0
msgid "Workcenter futur load"
-msgstr "Przyszłe obiciążenie centrum roboczego"
+msgstr "Obciążenie centrów roboczych"
diff --git a/addons/board_sale/i18n/pl.po b/addons/board_sale/i18n/pl.po
index 17a94959895..cb1e90aac00 100644
--- a/addons/board_sale/i18n/pl.po
+++ b/addons/board_sale/i18n/pl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-05-14 16:28+0000\n"
+"PO-Revision-Date: 2010-05-21 19:22+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-05-15 04:58+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_sale
@@ -40,7 +40,7 @@ msgstr "Konsola szefa sprzedaży"
#. module: board_sale
#: view:board.board:0
msgid "Cases of the month"
-msgstr "Zdarzenia miesiąca"
+msgstr "Sprawy miesiąca"
#. module: board_sale
#: constraint:ir.ui.view:0
@@ -65,9 +65,9 @@ msgstr "Sprzedaż"
#. module: board_sale
#: view:board.board:0
msgid "Cases statistics"
-msgstr "Statystyka zdarzeń"
+msgstr "Statystyka spraw"
#. module: board_sale
#: view:board.board:0
msgid "Top ten sales of the month"
-msgstr "Dziesięć najlepszych sprzedaży w miesiącu"
+msgstr "Najlepsze sprzedaże w miesiącu"
diff --git a/addons/crm/i18n/it.po b/addons/crm/i18n/it.po
index 9a00ef01bb0..00d2f7958e5 100644
--- a/addons/crm/i18n/it.po
+++ b/addons/crm/i18n/it.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-01-05 05:59+0000\n"
-"PO-Revision-Date: 2010-02-24 10:59+0000\n"
-"Last-Translator: Carlo Vettore \n"
+"PO-Revision-Date: 2010-05-21 06:51+0000\n"
+"Last-Translator: eLBati - albatos.com \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:02+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -2506,7 +2506,7 @@ msgstr ""
#. module: crm
#: model:crm.case.categ,name:crm.categ_meet1
msgid "Customer Meeting"
-msgstr "Riunione del cliente"
+msgstr "Riunione con il cliente"
#. module: crm
#: wizard_field:crm.new.send.mail,init,doc2:0
diff --git a/addons/crm/i18n/pl.po b/addons/crm/i18n/pl.po
index 285b5cc25b8..a0d430695ac 100644
--- a/addons/crm/i18n/pl.po
+++ b/addons/crm/i18n/pl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-01-05 05:59+0000\n"
-"PO-Revision-Date: 2010-05-14 20:14+0000\n"
+"PO-Revision-Date: 2010-05-21 17:59+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-05-15 04:58+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -33,6 +33,7 @@ msgstr ""
msgid ""
"Check this if you want the rule to send an email to the responsible person."
msgstr ""
+"Zaznacz, jeśli chcesz aby reguła wysłała wiadomość do osoby odpowiedzialnej."
#. module: crm
#: view:crm.meeting:0
@@ -42,12 +43,12 @@ msgstr "Tytuł"
#. module: crm
#: model:ir.model,name:crm.model_report_crm_case_section_categ2
msgid "Cases by section and category2"
-msgstr ""
+msgstr "Sprawy wg sekcji i kategorii"
#. module: crm
#: wizard_field:crm.lead.partner_create,init,close:0
msgid "Close Lead"
-msgstr "Zamknij ślad"
+msgstr "Zamknij sygnał"
#. module: crm
#: view:crm.job:0
@@ -60,12 +61,12 @@ msgstr " 7 Dni "
#. module: crm
#: help:crm.menu.config_wizard,helpdesk:0
msgid "Manages an Helpdesk service."
-msgstr ""
+msgstr "Zarządza usługą Helpdesku."
#. module: crm
#: view:crm.job:0
msgid "Pending Jobs"
-msgstr "Zadania Oczekujące"
+msgstr "Wstrzymane prace"
#. module: crm
#: field:crm.case.rule,trg_state_to:0
@@ -80,7 +81,7 @@ msgstr "Planowane koszty"
#. module: crm
#: wizard_field:crm.job.partner_create,init,close:0
msgid "Close job request"
-msgstr ""
+msgstr "Zamknij zgłoszenie pracy"
#. module: crm
#: field:crm.case.stage,name:0
@@ -95,7 +96,7 @@ msgstr "Nazwa etapu"
#: model:ir.ui.menu,name:crm.menu_crm_case_categ0-act
#: model:ir.ui.menu,name:crm.next_id_51
msgid "Cases"
-msgstr "Przypadki"
+msgstr "Sprawy"
#. module: crm
#: help:crm.segmentation,categ_id:0
@@ -114,7 +115,7 @@ msgstr "Zasoby ludzkie"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_oppor_categ_categ2
msgid "Cases by Opportunities, Category and Type"
-msgstr ""
+msgstr "Sprawy wg szans, kategorii i typów"
#. module: crm
#: help:crm.menu.config_wizard,claims:0
@@ -122,24 +123,24 @@ msgid ""
"Manages the supplier and customers claims, including your corrective or "
"preventive actions."
msgstr ""
-"Zarządza skargami dostawców i klientów, wliczając twoje działania naprawcze "
-"i prewencyjne."
+"Zarządza reklamacjami dostawców i klientów, oraz twoimi działaniami "
+"naprawczymi i prewencyjnymi."
#. module: crm
#: view:crm.fundraising:0
msgid "Amount"
-msgstr "Ilość"
+msgstr "Kwota"
#. module: crm
#: model:process.transition,note:crm.process_transition_opportunitymeeting0
msgid "Normal or phone meeting for opportunity"
-msgstr ""
+msgstr "Spotkanie albo rozmowa telefoniczna w sprawie szansy"
#. module: crm
#: model:crm.case.stage,name:crm.stage_claim2
#: model:crm.case.stage,name:crm.stage_meet1
msgid "Fixed"
-msgstr ""
+msgstr "Naprawione"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -164,13 +165,13 @@ msgstr "Kampania"
#. module: crm
#: view:crm.opportunity:0
msgid "Search Opportunities"
-msgstr "Szukaj w Okazjach"
+msgstr "Szukaj szans"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm_case_section_stage_tree
#: view:report.crm.case.section.stage:0
msgid "Cases by Section and Stage"
-msgstr "Przypadki w Sekcjach i Etapach"
+msgstr "Sprawy wg sekcji i etapów"
#. module: crm
#: wizard_field:crm.job.meeting_set,init,duration:0
@@ -198,8 +199,8 @@ msgid ""
"Section to which Case belongs to. Define Responsible user and Email account "
"for mail gateway."
msgstr ""
-"Sekcja do której należy Przypadek. Zdefiniuj odpowiedzialnego użytkownika "
-"oraz konto Email dla bramy pocztowej."
+"Sekcja do której należy Sprawa. Zdefiniuj odpowiedzialnego użytkownika oraz "
+"konto Email dla bramy pocztowej."
#. module: crm
#: view:crm.case:0
@@ -228,7 +229,7 @@ msgstr "Partner"
#: field:crm.case.stage,section_id:0
#: model:ir.model,name:crm.model_crm_case_section
msgid "Case Section"
-msgstr ""
+msgstr "Sekcja sprawy"
#. module: crm
#: view:crm.job:0
@@ -238,7 +239,7 @@ msgstr "Proponowane wynagrodzenie"
#. module: crm
#: help:crm.case.section,sequence:0
msgid "Gives the sequence order when displaying a list of case sections."
-msgstr ""
+msgstr "Ustala kolejność wyświetlania listy sekcji spraw."
#. module: crm
#: code:addons/crm/wizard/crm_job_wizard.py:0
@@ -251,12 +252,12 @@ msgstr "Rozmowa telefoniczna"
#. module: crm
#: model:ir.model,name:crm.model_report_crm_case_section_stage
msgid "Cases by section and stage"
-msgstr "Zdarzenia wg sekcji i etapów"
+msgstr "Sprawy wg sekcji i etapów"
#. module: crm
#: field:crm.case.rule,act_mail_to_email:0
msgid "Mail to these emails"
-msgstr ""
+msgstr "Wyślij wiadomości do tych adresów email."
#. module: crm
#: selection:crm.case.rule,trg_date_type:0
@@ -298,7 +299,7 @@ msgstr "Sekcje"
#: help:crm.menu.config_wizard,opportunity:0
msgid "Tracks identified business opportunities for your sales pipeline."
msgstr ""
-"Ścieżki zidentyfikowanych okazji biznesowych dla twoich kanałów sprzedaży."
+"Śledzi zidentyfikowane szanse biznesowe dla twoich kanałów sprzedaży."
#. module: crm
#: view:crm.meeting:0
@@ -313,7 +314,7 @@ msgstr "Data ostatniej akcji"
#. module: crm
#: view:crm.job:0
msgid "Appreciation"
-msgstr ""
+msgstr "Ocena"
#. module: crm
#: model:crm.case.stage,name:crm.stage_job3
@@ -335,7 +336,7 @@ msgstr "Kategorie"
#: code:addons/crm/wizard/wizard_crm_new_send_email.py:0
#, python-format
msgid "Warning!"
-msgstr ""
+msgstr "Uwaga!"
#. module: crm
#: view:crm.case:0
@@ -377,7 +378,7 @@ msgstr "Połączenie do istniejącego partnera"
#. module: crm
#: field:crm.case.rule,trg_date_range_type:0
msgid "Delay type"
-msgstr ""
+msgstr "Typ opóźnienia"
#. module: crm
#: view:crm.claim:0
@@ -397,7 +398,7 @@ msgstr "Następna rozmowa kwalifikacyjna"
#. module: crm
#: field:crm.case.rule,regex_history:0
msgid "Regular Expression on Case History"
-msgstr ""
+msgstr "Wyrażenie regularne dla historii sprawy"
#. module: crm
#: model:ir.model,name:crm.model_crm_email_add_cc
@@ -407,7 +408,7 @@ msgstr ""
#. module: crm
#: model:process.transition,name:crm.process_transition_opportunitymeeting0
msgid "Opportunity Meeting"
-msgstr ""
+msgstr "Spotkanie szansy"
#. module: crm
#: help:crm.case,canal_id:0
@@ -416,22 +417,24 @@ msgid ""
"customer. With each commercial opportunity, you can indicate the canall "
"which is this opportunity source."
msgstr ""
+"Kanały są różnymi, dostępnymi trybami komunikacji z klientem. Do każdej "
+"szansy możesz dowiązać kanał, który jest jej źródłem."
#. module: crm
#: view:crm.meeting:0
msgid "Exception Rules"
-msgstr ""
+msgstr "Reguły wyjątku"
#. module: crm
#: field:crm.menu.config_wizard,opportunity:0
#: model:ir.actions.report.xml,name:crm.crm_business_opportunities_report
msgid "Business Opportunities"
-msgstr ""
+msgstr "Szanse biznesowe"
#. module: crm
#: model:crm.case.stage,name:crm.stage_claim1
msgid "Accepted as Claim"
-msgstr ""
+msgstr "Zaakceptowano jako reklamację"
#. module: crm
#: view:crm.case.rule:0
@@ -439,6 +442,8 @@ msgid ""
"The rule use a AND operator. The case must match all non empty fields so "
"that the rule execute the action described in the 'Actions' tab."
msgstr ""
+"Reguła stosuje operator I. Sprawa musi pasować do wszystkich niepustych pól, "
+"aby została wykonana akcja zapisana w zakładce 'Akcje'."
#. module: crm
#: field:crm.case,history_line:0
@@ -488,7 +493,7 @@ msgstr "Kategoria"
#: model:ir.ui.menu,name:crm.menu_crm_case_section_categ_stage_tree
#: view:report.crm.case.section.categ.stage:0
msgid "Cases by Section, Category and Stage"
-msgstr ""
+msgstr "Sprawy wg sekcji, kategorii i etapów"
#. module: crm
#: help:crm.case.rule,act_mail_to_watchers:0
@@ -520,7 +525,7 @@ msgstr "Informacja o akcji"
#. module: crm
#: view:crm.case.rule:0
msgid "%(case_user_phone)s = Responsible phone"
-msgstr ""
+msgstr "%(case_user_phone)s = Telefon odpowiedzialnego"
#. module: crm
#: constraint:ir.model:0
@@ -543,7 +548,7 @@ msgstr "Warunki"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_categ0-act_open
msgid "Open Cases"
-msgstr "Otwarte przypadki"
+msgstr "Otwarte sprawy"
#. module: crm
#: field:crm.case.log,name:0
@@ -560,7 +565,7 @@ msgstr "Stan"
#: model:ir.actions.wizard,name:crm.wizard_partner_create_opportunity
#: model:ir.actions.wizard,name:crm.wizard_partner_create_opportunity1
msgid "Create Opportunity"
-msgstr ""
+msgstr "Utwórz szansę"
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@@ -585,7 +590,7 @@ msgstr "Drzewo spotkań"
#: view:crm.opportunity:0
#, python-format
msgid "Escalate"
-msgstr ""
+msgstr "Przekaż"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm_case_categ_meet
@@ -601,7 +606,7 @@ msgstr "Zarządzanie relacjami z klientami i dostawcami"
#: view:crm.email.add.cc:0
#: model:ir.actions.act_window,name:crm.action_view_crm_email_add_cc_wizard
msgid "Add CC"
-msgstr ""
+msgstr "Dodaj DW"
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@@ -614,12 +619,12 @@ msgstr "Czerwiec"
#. module: crm
#: field:crm.segmentation,som_interval_default:0
msgid "Default (0=None)"
-msgstr ""
+msgstr "Domyślne (0=Nic)"
#. module: crm
#: model:crm.case.stage,name:crm.stage_job7
msgid "Refused by Company"
-msgstr ""
+msgstr "Odrzucone przez firmę"
#. module: crm
#: field:crm.case,planned_revenue:0
@@ -642,17 +647,17 @@ msgstr "Październik"
#. module: crm
#: model:crm.case.stage,name:crm.stage_oppor3
msgid "Value Proposition"
-msgstr ""
+msgstr "Propozycja wartości"
#. module: crm
#: view:crm.case.rule:0
msgid "%(case_id)s = Case ID"
-msgstr ""
+msgstr "%(case_id)s = ID sprawy"
#. module: crm
#: model:crm.case.category2,name:crm.category_oppor2
msgid "New Business"
-msgstr ""
+msgstr "Nowy biznes"
#. module: crm
#: help:crm.case,email_from:0
@@ -681,7 +686,7 @@ msgstr "Opis rozmowy telefonicznej"
#. module: crm
#: view:crm.case.categ:0
msgid "Case Category"
-msgstr "Kategoria przypadku"
+msgstr "Kategoria sprawy"
#. module: crm
#: help:crm.segmentation,som_interval_default:0
@@ -696,7 +701,7 @@ msgstr ""
#. module: crm
#: model:crm.case.categ,name:crm.categ_claim3
msgid "Policy Claims"
-msgstr ""
+msgstr "Reklamacja postępowania"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -706,8 +711,8 @@ msgstr ""
msgid ""
"You must define a responsible user for this case in order to use this action!"
msgstr ""
-"Musisz zdefiniować użytkownika odpowiedzialnego za zdarzenie, aby zastosować "
-"tę akcję!"
+"Musisz zdefiniować użytkownika odpowiedzialnego za sprawę, aby zastosować tę "
+"akcję!"
#. module: crm
#: view:crm.phonecall:0
@@ -735,7 +740,7 @@ msgstr "Praca - proces zatrudnienia"
#: view:crm.lead:0
#: view:crm.opportunity:0
msgid "Related Cases"
-msgstr "Zdarzenia związane"
+msgstr "Sprawy powiązane"
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@@ -758,7 +763,7 @@ msgstr "Historia komunikacji"
#. module: crm
#: view:crm.claim:0
msgid "New Claims"
-msgstr ""
+msgstr "Nowe reklamacje"
#. module: crm
#: view:crm.meeting:0
@@ -768,23 +773,23 @@ msgstr "Formularz spotkań"
#. module: crm
#: model:crm.case.stage,name:crm.stage_oppor5
msgid "Negotiation/Review"
-msgstr ""
+msgstr "Negocjacje/Przegląd"
#. module: crm
#: code:addons/crm/wizard/crm_phonecall_wizard.py:0
#, python-format
msgid "A partner is already defined on this phonecall."
-msgstr ""
+msgstr "Partner jest już zdefiniowany dla tej rozmowy."
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_oppor_stage
msgid "Cases by Opportunities and Stage"
-msgstr "Zdarzenia wg szans i etapów"
+msgstr "Sprawy wg szans i etapów"
#. module: crm
#: view:crm.claim:0
msgid "Date of Claim"
-msgstr ""
+msgstr "Data reklamacji"
#. module: crm
#: view:crm.segmentation.line:0
@@ -820,7 +825,7 @@ msgstr ""
#. module: crm
#: model:crm.case.category2,name:crm.category_oppor1
msgid "Existing Business"
-msgstr ""
+msgstr "Istniejący biznes"
#. module: crm
#: field:crm.case,probability:0
@@ -831,7 +836,7 @@ msgstr "Prawdopodobieństwo (%)"
#. module: crm
#: model:ir.model,name:crm.model_crm_lead
msgid "Leads Cases"
-msgstr "Zdarzenia - sygnały"
+msgstr "Sprawy - sygnały"
#. module: crm
#: help:crm.case.section,reply_to:0
@@ -839,12 +844,14 @@ msgid ""
"The email address put in the 'Reply-To' of all emails sent by Open ERP about "
"cases in this section"
msgstr ""
+"Adres umieszczony w 'Reply-To' ('Odpowiedz na adres') dla wszystkich "
+"wiadomości wysłanych przez OpenERP w sprawach z tej sekcji"
#. module: crm
#: view:crm.case.rule:0
#: model:ir.model,name:crm.model_crm_case_rule
msgid "Case Rule"
-msgstr "Reguła zdarzenia"
+msgstr "Reguła sprawy"
#. module: crm
#: code:addons/crm/crm_opportunity.py:0
@@ -856,7 +863,7 @@ msgstr "Reguła zdarzenia"
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_oppor
#, python-format
msgid "Opportunity"
-msgstr ""
+msgstr "Szansa"
#. module: crm
#: view:crm.case:0
@@ -866,7 +873,7 @@ msgstr ""
#: view:crm.lead:0
#: view:crm.opportunity:0
msgid "Emails"
-msgstr ""
+msgstr "Wiadomości e-mail"
#. module: crm
#: model:crm.case.category2,name:crm.category_lead7
@@ -881,18 +888,18 @@ msgstr "Zatrzymaj proces"
#. module: crm
#: model:crm.case.categ,name:crm.categ_claim1
msgid "Factual Claims"
-msgstr ""
+msgstr "Reklamacja rzeczowa"
#. module: crm
#: view:crm.phonecall:0
msgid "Search Phonecalls"
-msgstr ""
+msgstr "Przeszukaj rozmowy"
#. module: crm
#: wizard_button:crm.lead.opportunity_set,create_partner,create:0
#: wizard_button:crm.phonecall.opportunity_set,create_partner,create:0
msgid "Continue"
-msgstr ""
+msgstr "Dalej"
#. module: crm
#: field:crm.segmentation,som_interval:0
@@ -907,13 +914,13 @@ msgstr "Wartość"
#. module: crm
#: help:caldav.crm.export,init,name:0
msgid "Save in .ics format"
-msgstr ""
+msgstr "Zapisz w formacie .ics"
#. module: crm
#: wizard_field:crm.new.send.mail,init,text:0
#: wizard_field:crm.send.mail,init,text:0
msgid "Message"
-msgstr ""
+msgstr "Wiadomość"
#. module: crm
#: help:crm.segmentation,exclusif:0
@@ -922,6 +929,9 @@ msgid ""
"criterions. If checked, remove the category from partners that doesn't match "
"segmentation criterions"
msgstr ""
+"Zaznacz to, jeśli kategoria ma być ograniczona do partnerów odpowiadających "
+"kryteriom segmentacji. Jeśli zaznaczone, to usuń kategorię z partnerów, "
+"którzy nie odpowiadają kryteriom segmentacji."
#. module: crm
#: field:crm.segmentation,exclusif:0
@@ -959,7 +969,7 @@ msgstr ""
#. module: crm
#: view:crm.case.rule:0
msgid "Conditions on States"
-msgstr ""
+msgstr "Warunki stanów"
#. module: crm
#: field:crm.case.rule,trg_date_type:0
@@ -969,12 +979,12 @@ msgstr "Data wyzwolenia"
#. module: crm
#: view:crm.case.history:0
msgid "Search Histories"
-msgstr ""
+msgstr "Przeszukuj historie"
#. module: crm
#: help:crm.case.stage,sequence:0
msgid "Gives the sequence order when displaying a list of case stages."
-msgstr ""
+msgstr "Ustala kolejność wyświetlania listy etapów spraw."
#. module: crm
#: model:crm.case.section,name:crm.section_support3
@@ -982,7 +992,7 @@ msgstr ""
#: model:ir.ui.menu,name:crm.menu_crm_case_opp
#: model:process.node,name:crm.process_node_opportunities0
msgid "Opportunities"
-msgstr ""
+msgstr "Szanse"
#. module: crm
#: help:crm.segmentation,name:0
@@ -1008,7 +1018,7 @@ msgstr "Kwota zakupów"
#. module: crm
#: view:crm.phonecall:0
msgid "Direction"
-msgstr ""
+msgstr "Kierunek"
#. module: crm
#: help:crm.case,email_cc:0
@@ -1024,12 +1034,12 @@ msgstr ""
#: selection:report.crm.case.section.categ2,month:0
#: selection:report.crm.case.section.stage,month:0
msgid "March"
-msgstr ""
+msgstr "Marzec"
#. module: crm
#: view:crm.case.rule:0
msgid "Server Action to be Triggered"
-msgstr ""
+msgstr "Akcja serwera do wykonania"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_rule-act
@@ -1041,18 +1051,18 @@ msgstr "Reguły"
#: wizard_view:crm.job.meeting_set,init:0
#: wizard_view:crm.phonecall.meeting_set,init:0
msgid "Plan Meeting"
-msgstr ""
+msgstr "Zaplanuj spotkanie"
#. module: crm
#: wizard_field:crm.new.send.mail,init,state:0
msgid "Set State to"
-msgstr ""
+msgstr "Ustaw stan na"
#. module: crm
#: code:addons/crm/wizard/wizard_crm_send_email.py:0
#, python-format
msgid "There is no mail to reply!"
-msgstr ""
+msgstr "Nie ma wiadomości do odpowiedzi"
#. module: crm
#: wizard_button:crm.job.partner_create,init,confirm:0
@@ -1062,7 +1072,7 @@ msgstr ""
#: model:ir.actions.wizard,name:crm.wizard_crm_lead_partner_create
#: model:ir.actions.wizard,name:crm.wizard_crm_phonecall_partner_create
msgid "Create Partner"
-msgstr ""
+msgstr "Utwórz partnera"
#. module: crm
#: selection:crm.segmentation.line,expr_operator:0
@@ -1072,17 +1082,17 @@ msgstr ""
#. module: crm
#: view:crm.case.rule:0
msgid "%(case_description)s = Case description"
-msgstr ""
+msgstr "%(case_description)s = Opis sprawy"
#. module: crm
#: view:crm.fundraising:0
msgid "My Funds"
-msgstr ""
+msgstr "Moje fundusze"
#. module: crm
#: field:crm.case,partner_mobile:0
msgid "Mobile"
-msgstr ""
+msgstr "Tel. komórkowy"
#. module: crm
#: field:crm.case.rule,name:0
@@ -1098,27 +1108,27 @@ msgstr "Planowane koszty"
#. module: crm
#: model:ir.model,name:crm.model_crm_case_history
msgid "Case history"
-msgstr ""
+msgstr "Historia sprawy"
#. module: crm
#: model:crm.case.categ,name:crm.categ_job2
msgid "Junior Developer"
-msgstr ""
+msgstr "Młodszy inżynier"
#. module: crm
#: view:crm.meeting:0
msgid "My Meetings"
-msgstr ""
+msgstr "Moje spotkania"
#. module: crm
#: field:crm.case.categ,name:0
msgid "Case Category Name"
-msgstr ""
+msgstr "Nazwa kategorii sprawy"
#. module: crm
#: model:crm.case.category2,name:crm.category_claim2
msgid "Preventive"
-msgstr ""
+msgstr "Prewencyjnie"
#. module: crm
#: field:crm.case.rule,act_email_cc:0
@@ -1128,7 +1138,7 @@ msgstr "Dodaj obserwatorów (DW)"
#. module: crm
#: wizard_view:caldav.crm.export,init:0
msgid "Export ICS"
-msgstr ""
+msgstr "Eksportuj ICS"
#. module: crm
#: code:addons/crm/crm_claim.py:0
@@ -1138,13 +1148,14 @@ msgstr ""
#: code:addons/crm/crm_phonecall.py:0
#, python-format
msgid "You can not assign Closed Case."
-msgstr ""
+msgstr "Nie możesz przypisać do zamkniętej sprawy"
#. module: crm
#: help:crm.case.rule,act_remind_partner:0
msgid ""
"Check this if you want the rule to send a reminder by email to the partner."
msgstr ""
+"Zaznacz, jeśli chcesz aby reguła wysyłała przypomnienie mailem do partnera."
#. module: crm
#: code:addons/crm/crm_meeting.py:0
@@ -1154,12 +1165,12 @@ msgstr ""
#: view:crm.meeting:0
#, python-format
msgid "Meetings"
-msgstr ""
+msgstr "Spotkania"
#. module: crm
#: view:crm.case.rule:0
msgid "Conditions on Case Fields"
-msgstr ""
+msgstr "Warunki na pola sprawy"
#. module: crm
#: field:crm.case,date_action_next:0
@@ -1179,27 +1190,27 @@ msgstr "Ostateczny czas ukończenia"
#: wizard_button:caldav.crm.import,init,end:0
#: wizard_button:caldav.crm.subscribe,init,end:0
msgid "_Cancel"
-msgstr ""
+msgstr "_Anuluj"
#. module: crm
#: field:crm.case,category2_id:0
msgid "Category Name"
-msgstr ""
+msgstr "Nazwa kategorii"
#. module: crm
#: view:crm.segmentation:0
msgid "Partner Segmentations"
-msgstr ""
+msgstr "Segmentacja partnera"
#. module: crm
#: view:crm.meeting:0
msgid "Recurrency Rule"
-msgstr ""
+msgstr "Reguła rekurencyjna"
#. module: crm
#: model:ir.model,name:crm.model_crm_case_categ
msgid "Category of case"
-msgstr "Kategoria przypadku"
+msgstr "Kategoria sprawy"
#. module: crm
#: field:crm.email.add.cc,subject:0
@@ -1208,12 +1219,12 @@ msgstr "Kategoria przypadku"
#: view:crm.phonecall:0
#: wizard_field:crm.send.mail,init,subject:0
msgid "Subject"
-msgstr ""
+msgstr "Temat"
#. module: crm
#: field:crm.meeting,attendees:0
msgid "Attendees"
-msgstr ""
+msgstr "Uczestnicy"
#. module: crm
#: model:ir.module.module,description:crm.module_meta_information
@@ -1243,31 +1254,50 @@ msgid ""
"The CRM module has a email gateway for the synchronisation interface\n"
"between mails and Open ERP."
msgstr ""
+"Podstawowy moduł Zarządzania Relacjami z Klientami (CRM) Open ERP\n"
+"pozwala grupie ludzi inteligentnie i efektywnie zarządzać sygnałami, "
+"szansami,\n"
+"zadaniami, problemami, zgłoszeniami, błędami, reklamacjami, kampaniami itp.\n"
+"Moduł zarządza kluczowymi dziedzinami jak komunikacja, identyfikacja, \n"
+"priorytezacja, powiązania i powiadamianie.\n"
+"\n"
+"OpenERP zapewnia, że sprawy są skutecznie obsługiwane przez \n"
+"użytkowników, klientów i dostawców. System automatycznie wysyła \n"
+"przypomnienia, przekazuje odpowiedzialność, wysyła zgłoszenia, wyzwala\n"
+"specjalne metody i wykonuje inne akcje na podstawie twoich własnych reguł.\n"
+"\n"
+"Najważniejszą cechą systemu jest, że klient nie musi wykonywać żadnych \n"
+"specjalnych czynności. Wystarczy, że wyśle wiadomość do centrum zgłoszeń.\n"
+"OpenERP podziękuje za wiadomość, przekieruje ją do odpowiednich osób i \n"
+"zapewni, że cała przyszła korespondencja trafi w odpowiednie miejsce.\n"
+"\n"
+"Moduł CRM zawiera bramę korespondencyjną do łączenia OpenERP z \n"
+"systemem pocztowym."
#. module: crm
#: model:process.transition,note:crm.process_transition_leadpartner0
msgid "Prospect is converting to business partner"
-msgstr ""
+msgstr "Partner potencjalny jest konwertowany do partnera biznesowego."
#. module: crm
#: view:crm.case.rule:0
msgid "Regex on Case Name"
-msgstr ""
+msgstr "Wyrażenie regularne dla nazwy sprawy"
#. module: crm
#: view:crm.claim:0
msgid "Pending Claims"
-msgstr ""
+msgstr "Oczekujące reklamacje"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_oppor_categ_stage
msgid "Cases by Opportunities, Category and Stage"
-msgstr ""
+msgstr "Sprawy wg szans, kategorii i etapów"
#. module: crm
#: model:crm.case.category2,name:crm.category_lead4
msgid "Print"
-msgstr ""
+msgstr "Drukuj"
#. module: crm
#: field:crm.case,som:0
@@ -1282,12 +1312,12 @@ msgstr "Stan emocji"
#: field:report.crm.case.section.categ.categ2,category2_id:0
#: field:report.crm.case.section.categ2,category2_id:0
msgid "Type"
-msgstr ""
+msgstr "Typ"
#. module: crm
#: view:crm.job:0
msgid "Candidate Refused"
-msgstr ""
+msgstr "Kandydat odrzucony"
#. module: crm
#: view:crm.segmentation:0
@@ -1317,7 +1347,7 @@ msgstr "Data utworzenia"
#: view:crm.phonecall:0
#: model:process.node,name:crm.process_node_meeting0
msgid "Meeting"
-msgstr ""
+msgstr "Spotkanie"
#. module: crm
#: view:crm.case.rule:0
@@ -1338,12 +1368,12 @@ msgstr "Przywróć do projektu"
#. module: crm
#: model:ir.model,name:crm.model_report_crm_case_section_categ_categ2
msgid "Cases by section, Category and Category2"
-msgstr ""
+msgstr "Sprawy wg sekcji, kategorii i kategorii2"
#. module: crm
#: model:crm.case.stage,name:crm.stage_oppor6
msgid "Closed Won"
-msgstr ""
+msgstr "Zamknięte z sukcesem"
#. module: crm
#: model:ir.actions.act_window,name:crm.act_crm_case_categ_crm_case_opened
@@ -1352,7 +1382,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm.act_res_partner_canal_2_crm_case_opened
#: model:ir.actions.act_window,name:crm.act_res_users_2_crm_case_opened
msgid "Open cases"
-msgstr "Otwarte praypadki"
+msgstr "Otwarte sprawy"
#. module: crm
#: field:crm.case,stage_id:0
@@ -1362,7 +1392,7 @@ msgstr "Otwarte praypadki"
#: field:report.crm.case.section.categ2,stage_id:0
#: field:report.crm.case.section.stage,stage_id:0
msgid "Stage"
-msgstr ""
+msgstr "Etap"
#. module: crm
#: constraint:ir.ui.view:0
@@ -1375,48 +1405,51 @@ msgid ""
"If the active field is set to true, it will allow you to hide the case "
"section without removing it."
msgstr ""
+"Jeśli pole aktywne jest ustawione na true (prawda), to będziesz mógł ukryć "
+"sekcję sprawy bez jej usuwania."
#. module: crm
#: model:crm.case.categ,name:crm.categ_fund2
msgid "Learning And Education"
-msgstr ""
+msgstr "Nauka i edukacja"
#. module: crm
#: wizard_view:crm.phonecall.opportunity_set,create_partner:0
#: wizard_view:crm.phonecall.partner_create,init:0
msgid "Are you sure you want to create a partner based on this phonecall ?"
msgstr ""
+"Jesteś pewien, że chcesz utworzyć partnera na podstawie tej rozmowy ?"
#. module: crm
#: view:crm.case.stage:0
#: model:ir.actions.act_window,name:crm.crm_case_stage_act
#: model:ir.ui.menu,name:crm.menu_crm_case_stage_act
msgid "Stages"
-msgstr ""
+msgstr "Etapy"
#. module: crm
#: wizard_field:crm.case.opportunity.partner_opportunity,init,planned_revenue:0
#: wizard_field:crm.lead.opportunity_set,opportunity,planned_revenue:0
#: wizard_field:crm.phonecall.opportunity_set,opportunity,planned_revenue:0
msgid "Expected Revenue"
-msgstr ""
+msgstr "Spodziewany dochód"
#. module: crm
#: view:crm.meeting:0
msgid "Meeting Date"
-msgstr ""
+msgstr "Data spotkania"
#. module: crm
#: view:crm.job:0
#: view:crm.lead:0
#: view:crm.phonecall:0
msgid "Convert to Partner"
-msgstr ""
+msgstr "Konwertuj do partnera"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_category_act_meetall3
msgid "Next Meetings"
-msgstr ""
+msgstr "Następne spotkania"
#. module: crm
#: field:crm.segmentation,partner_id:0
@@ -1427,32 +1460,32 @@ msgstr ""
#: code:addons/crm/crm.py:0
#, python-format
msgid "You can not delete this case. You should better cancel it."
-msgstr ""
+msgstr "Nie możesz usunąć tej sprawy. Powinieneś ją raczej anulować."
#. module: crm
#: wizard_button:caldav.crm.subscribe,init,open:0
msgid "_Subscribe"
-msgstr ""
+msgstr "_Subskrybuj"
#. module: crm
#: field:crm.case.rule,trg_priority_from:0
msgid "Minimum Priority"
-msgstr ""
+msgstr "Minimalny priorytet"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_meeting_generic_wizard_act
msgid "Meeting Generic Wizard"
-msgstr ""
+msgstr "Podstawowy kreator spotkań"
#. module: crm
#: model:crm.case.categ,name:crm.categ_claim2
msgid "Value Claims"
-msgstr ""
+msgstr "Reklamacje wartości"
#. module: crm
#: wizard_view:caldav.crm.subscribe,display:0
msgid "Message..."
-msgstr ""
+msgstr "Wiadomość..."
#. module: crm
#: model:ir.model,name:crm.model_crm_phonecall_assign_wizard
@@ -1462,19 +1495,19 @@ msgstr ""
#. module: crm
#: view:report.crm.case.section.categ2:0
msgid "Cases by Section and Category2"
-msgstr ""
+msgstr "Sprawy wg sekcji i kategorii2"
#. module: crm
#: code:addons/crm/crm.py:0
#, python-format
msgid "done"
-msgstr "wykonano"
+msgstr ""
#. module: crm
#: view:crm.meeting:0
#: view:crm.phonecall:0
msgid "Reminder"
-msgstr ""
+msgstr "Przypomnienie"
#. module: crm
#: help:crm.segmentation,sales_purchase_active:0
@@ -1482,28 +1515,30 @@ msgid ""
"Check if you want to use this tab as part of the segmentation rule. If not "
"checked, the criteria beneath will be ignored"
msgstr ""
+"Zaznacz, jeśli chcesz stosować tę zakładkę jako część reguły segmentacji. "
+"Jeśli nie zaznaczone, to kryteria poniżej zostaną zignorowane."
#. module: crm
#: code:addons/crm/crm.py:0
#, python-format
msgid "open"
-msgstr "otwarty"
+msgstr ""
#. module: crm
#: field:crm.case.rule,act_remind_attach:0
msgid "Remind with attachment"
-msgstr ""
+msgstr "Przpomnij z załącznikiem"
#. module: crm
#: model:crm.case.categ,name:crm.categ_lead6
#: model:crm.case.categ,name:crm.categ_oppor6
msgid "Website"
-msgstr ""
+msgstr "Strona WWW"
#. module: crm
#: field:crm.case.rule,act_remind_user:0
msgid "Remind responsible"
-msgstr ""
+msgstr "Przpomnij odpowiedzialnym"
#. module: crm
#: field:crm.segmentation,state:0
@@ -1516,23 +1551,25 @@ msgid ""
"Helps you to organise the jobs hiring process: evaluation, meetings, email "
"integration..."
msgstr ""
+"Pomaga organizować proces zatrudniania: ocena, spotkania, integracja "
+"wiadomości..."
#. module: crm
#: view:crm.fundraising:0
msgid "Funds"
-msgstr ""
+msgstr "Fundusze"
#. module: crm
#: code:addons/crm/crm.py:0
#, python-format
msgid "draft"
-msgstr "projekt"
+msgstr ""
#. module: crm
#: model:crm.case.stage,name:crm.stage_claim5
#: model:crm.case.stage,name:crm.stage_meet4
msgid "Awaiting Response"
-msgstr ""
+msgstr "Oczekuje na odpowiedź"
#. module: crm
#: field:crm.case,date:0
@@ -1546,23 +1583,23 @@ msgstr "Data"
#. module: crm
#: view:crm.job:0
msgid "Candidate Name"
-msgstr ""
+msgstr "Nazwisko kandydata"
#. module: crm
#: model:crm.case.categ,name:crm.categ_lead2
#: model:crm.case.categ,name:crm.categ_oppor2
msgid "Self Generated"
-msgstr ""
+msgstr "Samogenerowane"
#. module: crm
#: model:crm.case.stage,name:crm.stage_claim3
msgid "Won't fix"
-msgstr ""
+msgstr "Nie do naprawienia"
#. module: crm
#: model:crm.case.stage,name:crm.stage_lead4
msgid "Converted"
-msgstr ""
+msgstr "Skonwertowano"
#. module: crm
#: view:crm.case:0
@@ -1572,7 +1609,7 @@ msgstr ""
#: view:crm.lead:0
#: view:crm.opportunity:0
msgid "Reply to Last Email"
-msgstr ""
+msgstr "Odpowiedz na ostatnią wiadomość"
#. module: crm
#: view:crm.segmentation:0
@@ -1582,7 +1619,7 @@ msgstr "Opis segmentacji"
#. module: crm
#: help:crm.meeting,location:0
msgid "Gives Location of Meeting"
-msgstr ""
+msgstr "Ustala miejsce spotkania"
#. module: crm
#: view:crm.case:0
@@ -1597,17 +1634,17 @@ msgstr "Historia"
#. module: crm
#: model:ir.model,name:crm.model_crm_job
msgid "Job Cases"
-msgstr ""
+msgstr "Sprawy rekrutacji"
#. module: crm
#: view:crm.job:0
msgid "Jobs - Recruitment Tree"
-msgstr ""
+msgstr "Praca - Drzewo rekrutacji"
#. module: crm
#: field:crm.case.rule,regex_name:0
msgid "Regular Expression on Case Name"
-msgstr ""
+msgstr "Wyrażenie regularne dla nazwy sprawy"
#. module: crm
#: field:crm.case,state:0
@@ -1616,7 +1653,7 @@ msgstr ""
#: field:report.crm.case.section.categ2,state:0
#: field:report.crm.case.section.stage,state:0
msgid "State"
-msgstr ""
+msgstr "Stan"
#. module: crm
#: view:crm.case:0
@@ -1667,22 +1704,22 @@ msgstr "Anuluj"
#: code:addons/crm/crm.py:0
#, python-format
msgid "No E-Mail ID Found for your Company address!"
-msgstr ""
+msgstr "Brak ID email dla adresu twojej firmy !"
#. module: crm
#: view:crm.fundraising:0
msgid "Search Funds"
-msgstr ""
+msgstr "Przeszukaj fundusze"
#. module: crm
#: view:crm.claim:0
msgid "Type of claim"
-msgstr ""
+msgstr "Typ reklamacji"
#. module: crm
#: view:crm.case:0
msgid "Helpdesk Support Tree"
-msgstr ""
+msgstr "Drzewo wsparcia helpdesku"
#. module: crm
#: view:res.partner.events:0
@@ -1692,33 +1729,33 @@ msgstr "Ogólny opis"
#. module: crm
#: view:crm.meeting:0
msgid "Other Info"
-msgstr ""
+msgstr "Inne informacje"
#. module: crm
#: view:crm.claim:0
msgid "Claim Cost"
-msgstr ""
+msgstr "Koszt reklamacji"
#. module: crm
#: view:crm.job:0
#: view:crm.opportunity:0
msgid "Schedule a Phone Call"
-msgstr ""
+msgstr "Zaplanuj rozmowę"
#. module: crm
#: field:crm.case,ref:0
msgid "Reference"
-msgstr "Odnośnik"
+msgstr "Numer"
#. module: crm
#: field:crm.meeting,exrule:0
msgid "Exception Rule"
-msgstr ""
+msgstr "Reguła wyjątku"
#. module: crm
#: help:crm.case.rule,act_mail_to_partner:0
msgid "Check this if you want the rule to send an email to the partner."
-msgstr ""
+msgstr "Zaznacz to, jeśli chcesz aby reguła wysyłała wiadomość do partnera."
#. module: crm
#: model:crm.case.category2,name:crm.category_lead2
@@ -1733,22 +1770,22 @@ msgstr "Ustaw priorytet na"
#. module: crm
#: model:crm.case.stage,name:crm.stage_oppor2
msgid "Needs Analysis"
-msgstr ""
+msgstr "Wymaga analizy"
#. module: crm
#: view:crm.claim:0
msgid "Search Claims"
-msgstr ""
+msgstr "Przeszukaj reklamacje"
#. module: crm
#: field:crm.case.rule,act_mail_body:0
msgid "Mail body"
-msgstr ""
+msgstr "Treść wiadomości"
#. module: crm
#: help:crm.menu.config_wizard,meeting:0
msgid "Manages the calendar of meetings of the users."
-msgstr ""
+msgstr "Zarządza kalendarzem spotkań użytkownika"
#. module: crm
#: selection:crm.segmentation.line,expr_name:0
@@ -1763,7 +1800,7 @@ msgstr "Kwota sprzedaży"
#: view:crm.lead:0
#: view:crm.opportunity:0
msgid "Add a CC"
-msgstr ""
+msgstr "Dodaj DW"
#. module: crm
#: selection:crm.segmentation.line,expr_operator:0
@@ -1781,7 +1818,7 @@ msgstr "Nazwa"
#. module: crm
#: view:crm.opportunity:0
msgid "Sales Stage"
-msgstr ""
+msgstr "Etap sprzedaży"
#. module: crm
#: field:crm.meeting,alarm_id:0
@@ -1791,13 +1828,13 @@ msgstr ""
#. module: crm
#: field:crm.case.rule,act_mail_to_watchers:0
msgid "Mail to watchers (CC)"
-msgstr ""
+msgstr "Wiadomość dla obserwatorów (DW)"
#. module: crm
#: view:crm.fundraising:0
#: view:crm.meeting:0
msgid "Next Meeting"
-msgstr ""
+msgstr "Następne spotkanie"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -1806,21 +1843,23 @@ msgid ""
"No E-Mail ID Found for your Company address or missing reply address in "
"section!"
msgstr ""
+"Nie znaleziono ID email dla adresu twojej firmy lub brak adresu zwrotnego w "
+"sekcji!"
#. module: crm
#: help:crm.case.section,allow_unlink:0
msgid "Allows to delete non draft cases"
-msgstr "Pozwala usuwać przypadki inne niż projekty"
+msgstr "Pozwala usuwać sprawy inne niż w stanie projekt"
#. module: crm
#: model:crm.case.stage,name:crm.stage_oppor7
msgid "Closed Lost"
-msgstr ""
+msgstr "Zamknięte z porażką"
#. module: crm
#: field:crm.menu.config_wizard,bugs:0
msgid "Bug Tracking"
-msgstr ""
+msgstr "Obsługa błędów"
#. module: crm
#: view:crm.case:0
@@ -1844,7 +1883,7 @@ msgstr "Wysoki"
#. module: crm
#: model:process.node,note:crm.process_node_partner0
msgid "Convert to prospect to business partner"
-msgstr ""
+msgstr "Konwertuj potencjalnego do partnera biznesowego"
#. module: crm
#: view:crm.claim:0
@@ -1859,22 +1898,22 @@ msgstr ""
#. module: crm
#: model:crm.case.stage,name:crm.stage_oppor4
msgid "Proposal/Price Quote"
-msgstr ""
+msgstr "Propozycja/Oferta ceny"
#. module: crm
#: view:crm.case.rule:0
msgid "Delay After Trigger Date:"
-msgstr ""
+msgstr "Opóźnienie po dacie wyzwolenia"
#. module: crm
#: model:crm.case.category2,name:crm.category_lead5
msgid "Web"
-msgstr ""
+msgstr "WWW"
#. module: crm
#: view:crm.lead:0
msgid "Campaign Type"
-msgstr ""
+msgstr "Typ kampanii"
#. module: crm
#: view:crm.segmentation:0
@@ -1886,7 +1925,7 @@ msgstr "Obliczanie stanu emocji"
#: code:addons/crm/wizard/wizard_crm_send_email.py:0
#, python-format
msgid "Error"
-msgstr ""
+msgstr "Błąd"
#. module: crm
#: model:ir.model,name:crm.model_crm_meeting_generic_wizard
@@ -1896,12 +1935,12 @@ msgstr ""
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_history-act
msgid "Histories"
-msgstr ""
+msgstr "Historie"
#. module: crm
#: model:crm.case.category2,name:crm.category_job1
msgid "Graduate"
-msgstr ""
+msgstr "Wykształcenie"
#. module: crm
#: wizard_view:crm.job.meeting_set,init:0
@@ -1910,6 +1949,7 @@ msgid ""
"Note that you can also use the calendar view to graphically schedule your "
"next meeting."
msgstr ""
+"Zauważ, że możesz stosować kalendarz do graficznego planowania spotkań."
#. module: crm
#: view:crm.lead:0
@@ -1924,13 +1964,13 @@ msgstr ""
#. module: crm
#: view:crm.meeting:0
msgid "Attendee"
-msgstr ""
+msgstr "Uczestnik"
#. module: crm
#: code:addons/crm/crm.py:0
#, python-format
msgid "Email Fail!"
-msgstr ""
+msgstr "Błąd wiadomości"
#. module: crm
#: model:crm.case.categ,name:crm.categ_phone1
@@ -1938,12 +1978,12 @@ msgstr ""
#: model:ir.actions.act_window,name:crm.crm_case_categ_phone_incoming0
#: model:ir.ui.menu,name:crm.menu_crm_case_phone_inbound
msgid "Inbound"
-msgstr ""
+msgstr "Przychodzące"
#. module: crm
#: constraint:crm.case.section:0
msgid "Error ! You cannot create recursive sections."
-msgstr ""
+msgstr "Błąd ! Nie możesz tworzyć rekurencyjnych sekcji."
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm
@@ -1956,6 +1996,8 @@ msgid ""
" Will allow you to synchronise your Open ERP calendars with your phone, "
"outlook, Sunbird, ical, ..."
msgstr ""
+" Pozwoli ci synchronizować kalendarze OpenERP z twoim telefonem, outlook, "
+"Sunbird, ical, ..."
#. module: crm
#: view:report.crm.case.section.categ.categ2:0
@@ -1963,7 +2005,7 @@ msgstr ""
#: view:report.crm.case.section.categ2:0
#: view:report.crm.case.section.stage:0
msgid "This Year"
-msgstr ""
+msgstr "Ten rok"
#. module: crm
#: field:crm.case.rule,act_remind_partner:0
@@ -1981,7 +2023,7 @@ msgstr "Najwyższy"
#. module: crm
#: view:crm.job:0
msgid "Contract Data"
-msgstr ""
+msgstr "Data umowy"
#. module: crm
#: selection:crm.case.rule,trg_date_range_type:0
@@ -1992,11 +2034,13 @@ msgstr "Dni"
#: help:crm.menu.config_wizard,bugs:0
msgid "Used by companies to track bugs and support requests on software"
msgstr ""
+"Stosowane przez firmy do śledzenia błędów i zgłoszeń do wsparcia dla "
+"oprogramowania"
#. module: crm
#: field:crm.menu.config_wizard,document_ics:0
msgid "Shared Calendar"
-msgstr ""
+msgstr "Współdzielony kalendarz"
#. module: crm
#: field:crm.case.section,reply_to:0
@@ -2006,7 +2050,7 @@ msgstr "Odpowiedz do"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_lead_categ
msgid "Cases by Leads and Type"
-msgstr ""
+msgstr "Sprawy wg sygnałów i typów"
#. module: crm
#: selection:crm.case.rule,trg_date_range_type:0
@@ -2017,12 +2061,12 @@ msgstr "Minuty"
#: field:report.crm.case.section.categ2,amount_revenue:0
#: field:report.crm.case.section.stage,amount_revenue:0
msgid "Est.Revenue"
-msgstr ""
+msgstr "Szac. dochód"
#. module: crm
#: model:crm.case.stage,name:crm.stage_job1
msgid "Initial Jobs Demand"
-msgstr ""
+msgstr "Potrzeba stanowiska"
#. module: crm
#: field:crm.case.rule,trg_priority_to:0
@@ -2037,12 +2081,12 @@ msgstr ""
#. module: crm
#: view:crm.claim:0
msgid "Claims Info"
-msgstr ""
+msgstr "Informacja o reklamacji"
#. module: crm
#: field:crm.case.category2,name:0
msgid "Case Category2 Name"
-msgstr ""
+msgstr "Nazwa kategorii2 sprawy"
#. module: crm
#: wizard_view:crm.lead.opportunity_set,opportunity:0
@@ -2050,29 +2094,29 @@ msgstr ""
#: model:ir.actions.wizard,name:crm.wizard_crm_lead_opportunity_set
#: model:ir.actions.wizard,name:crm.wizard_crm_phonecall_opportunity_set
msgid "Convert To Opportunity"
-msgstr ""
+msgstr "Konwertuj do szansy"
#. module: crm
#: model:crm.case.stage,name:crm.stage_phone2
#: view:crm.phonecall:0
msgid "Held"
-msgstr ""
+msgstr "Odebrane"
#. module: crm
#: view:crm.case:0
msgid "Helpdesk Supports"
-msgstr ""
+msgstr "Wsparcie helpdesk"
#. module: crm
#: model:crm.case.section,name:crm.section_support4
#: model:ir.ui.menu,name:crm.menu_crm_case_fund_raise
msgid "Fund Raising"
-msgstr ""
+msgstr "Zwiększenie funduszu"
#. module: crm
#: selection:crm.new.send.mail,init,state:0
msgid "Unchanged"
-msgstr ""
+msgstr "Niezmienione"
#. module: crm
#: wizard_view:crm.job.partner_create,init:0
@@ -2081,12 +2125,12 @@ msgstr ""
#: wizard_view:crm.phonecall.opportunity_set,create_partner:0
#: wizard_view:crm.phonecall.partner_create,init:0
msgid "Convert To Partner"
-msgstr ""
+msgstr "Konwertuj do partnera"
#. module: crm
#: field:crm.case.rule,trg_state_from:0
msgid "Case State"
-msgstr "Stan przypadku"
+msgstr "Stan sprawy"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -2107,17 +2151,17 @@ msgstr "Priorytet"
#. module: crm
#: view:crm.opportunity:0
msgid "Source"
-msgstr ""
+msgstr "Źródło"
#. module: crm
#: field:crm.meeting,location:0
msgid "Location"
-msgstr ""
+msgstr "Lokalizacja"
#. module: crm
#: view:crm.fundraising:0
msgid "Payment Mode"
-msgstr ""
+msgstr "Sposób zapłaty"
#. module: crm
#: help:crm.case.rule,trg_date_range:0
@@ -2132,17 +2176,17 @@ msgstr ""
#: view:crm.job:0
#: view:crm.lead:0
msgid "Stage: "
-msgstr ""
+msgstr "Etap: "
#. module: crm
#: view:crm.case.section:0
msgid "Case section"
-msgstr "Sekcja przypadku"
+msgstr "Sekcja sprawy"
#. module: crm
#: model:process.node,note:crm.process_node_meeting0
msgid "Schedule a normal or phone meeting"
-msgstr ""
+msgstr "Zaplanuj zwykłe spotkanie albo telefoniczne"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -2163,12 +2207,12 @@ msgstr "Pola do zmiany"
#. module: crm
#: model:crm.case.category2,name:crm.category_lead1
msgid "Telesales"
-msgstr ""
+msgstr "Telesprzedaż"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm_case_history-act_main
msgid "Cases Histories"
-msgstr "Historie przypadków"
+msgstr "Historie spraw"
#. module: crm
#: field:crm.case,create_date:0
@@ -2190,7 +2234,7 @@ msgstr "Pozycja segmentacji"
#: wizard_field:crm.opportunity.reschedule_phone_call,init,deadline:0
#: view:crm.phonecall:0
msgid "Planned Date"
-msgstr ""
+msgstr "Planowana data"
#. module: crm
#: selection:crm.case.rule,trg_date_range_type:0
@@ -2203,16 +2247,17 @@ msgid ""
"Helps you to encode the result of a phone call or to plan a list of phone "
"calls to process."
msgstr ""
+"Pomaga wprowadzić rezultat rozmowy lub zaplanować rozmowy do wykonania."
#. module: crm
#: model:ir.actions.wizard,name:crm.wizard_crm_cal_import
msgid "Import ICS File"
-msgstr ""
+msgstr "Importuj plik ICS"
#. module: crm
#: view:crm.meeting:0
msgid "Attendee Detail"
-msgstr ""
+msgstr "Szczegóły uczestnika"
#. module: crm
#: model:crm.case.category2,name:crm.category_job3
@@ -2225,58 +2270,58 @@ msgstr ""
#: selection:report.crm.case.section.categ2,month:0
#: selection:report.crm.case.section.stage,month:0
msgid "July"
-msgstr ""
+msgstr "Lipiec"
#. module: crm
#: model:crm.case.stage,name:crm.stage_oppor1
msgid "Prospecting"
-msgstr ""
+msgstr "Ocenianie"
#. module: crm
#: field:crm.case,partner_name2:0
msgid "Employee Email"
-msgstr ""
+msgstr "Email pracownika"
#. module: crm
#: model:ir.model,name:crm.model_crm_meeting
msgid "Meeting Cases"
-msgstr ""
+msgstr "Sprawy spotkań"
#. module: crm
#: view:crm.job:0
msgid "Job Info"
-msgstr ""
+msgstr "Informacja o stanowisko"
#. module: crm
#: view:crm.meeting:0
msgid "Cancel Meeting"
-msgstr ""
+msgstr "Anuluj spotkanie"
#. module: crm
#: model:crm.case.section,name:crm.section_support0
msgid "Jobs"
-msgstr ""
+msgstr "Stanowiska"
#. module: crm
#: view:crm.case.rule:0
msgid "%(case_date)s = Creation date"
-msgstr ""
+msgstr "%(case_date)s = Data utworzenia"
#. module: crm
#: model:crm.case.stage,name:crm.stage_phone3
#: view:crm.phonecall:0
msgid "Not Held"
-msgstr ""
+msgstr "Nie odebrane"
#. module: crm
#: field:crm.case.rule,act_mail_to_user:0
msgid "Mail to responsible"
-msgstr ""
+msgstr "Mail do odpowiedzialnych"
#. module: crm
#: view:crm.job:0
msgid "Jobs - Recruitment Form"
-msgstr ""
+msgstr "Praca - Formularz rekrutacji"
#. module: crm
#: model:crm.case.category2,name:crm.category_claim1
@@ -2286,12 +2331,12 @@ msgstr ""
#. module: crm
#: model:ir.model,name:crm.model_crm_opportunity
msgid "Opportunity Cases"
-msgstr ""
+msgstr "Sprawy szans"
#. module: crm
#: view:crm.case:0
msgid "Support Query"
-msgstr ""
+msgstr "Zapytanie o wsparcie"
#. module: crm
#: view:crm.case.rule:0
@@ -2304,7 +2349,7 @@ msgstr "Szablon emaila do wysłania"
#: field:report.crm.case.section.categ2,month:0
#: field:report.crm.case.section.stage,month:0
msgid "Month"
-msgstr ""
+msgstr "Miesiąc"
#. module: crm
#: model:crm.case.section,name:crm.section_support2
@@ -2314,23 +2359,23 @@ msgstr ""
#: model:ir.ui.menu,name:crm.menu_crm_case_categ0_act_leads
#: model:process.node,name:crm.process_node_leads0
msgid "Leads"
-msgstr ""
+msgstr "Sygnały"
#. module: crm
#: wizard_button:crm.new.send.mail,init,send:0
#: wizard_button:crm.send.mail,init,send:0
msgid "Send Email"
-msgstr ""
+msgstr "Wyślij e-mail"
#. module: crm
#: wizard_view:crm.new.send.mail,init:0
msgid "Set case state to"
-msgstr ""
+msgstr "Ustaw stan sprawy na"
#. module: crm
#: model:crm.case.category2,name:crm.categ2_fund3
msgid "Credit Card"
-msgstr ""
+msgstr "Karta kredytowa"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -2343,7 +2388,7 @@ msgstr ""
#. module: crm
#: view:crm.job:0
msgid "Search Jobs"
-msgstr ""
+msgstr "Przeszukuj stanowiska"
#. module: crm
#: field:crm.case.history,log_id:0
@@ -2354,17 +2399,17 @@ msgstr "Log"
#: help:crm.menu.config_wizard,fund:0
msgid ""
"This may help associations in their fund raising process and tracking."
-msgstr ""
+msgstr "To może pomóc stowarzyszeniom w poszukiwaniu funduszy."
#. module: crm
#: view:crm.meeting:0
msgid "Reset to Unconfirmed"
-msgstr ""
+msgstr "Przywróć do niepotwierdzonych"
#. module: crm
#: view:crm.case:0
msgid "Helpdesk Support"
-msgstr ""
+msgstr "Wsparcie helpdesku"
#. module: crm
#: field:crm.case,email_cc:0
@@ -2382,7 +2427,7 @@ msgstr "Uwaga"
#: field:report.crm.case.section.categ2,delay_close:0
#: field:report.crm.case.section.stage,delay_close:0
msgid "Delay Close"
-msgstr ""
+msgstr "Zamknij opóźnienie"
#. module: crm
#: selection:crm.case,priority:0
@@ -2408,18 +2453,18 @@ msgstr "Zamknięty"
#. module: crm
#: view:crm.job:0
msgid "Candidate Name2"
-msgstr ""
+msgstr "Nazwa 2 kandydata"
#. module: crm
#: code:addons/crm/crm.py:0
#, python-format
msgid "cancel"
-msgstr "anuluj"
+msgstr ""
#. module: crm
#: model:crm.case.categ,name:crm.categ_meet2
msgid "Internal Meeting"
-msgstr ""
+msgstr "Spotkanie wewnętrzne"
#. module: crm
#: view:crm.case:0
@@ -2428,7 +2473,7 @@ msgstr ""
#: view:crm.lead:0
#: view:crm.opportunity:0
msgid "Events"
-msgstr ""
+msgstr "Wydarzenia"
#. module: crm
#: help:crm.menu.config_wizard,lead:0
@@ -2455,27 +2500,27 @@ msgstr ""
#. module: crm
#: model:crm.case.categ,name:crm.categ_meet1
msgid "Customer Meeting"
-msgstr ""
+msgstr "Spotkanie z klientem"
#. module: crm
#: wizard_field:crm.new.send.mail,init,doc2:0
msgid "Attachment2"
-msgstr ""
+msgstr "Załącznik2"
#. module: crm
#: wizard_field:crm.new.send.mail,init,doc3:0
msgid "Attachment3"
-msgstr ""
+msgstr "Załącznik3"
#. module: crm
#: view:crm.job:0
msgid "Degree"
-msgstr ""
+msgstr "Stopień"
#. module: crm
#: wizard_field:crm.new.send.mail,init,doc1:0
msgid "Attachment1"
-msgstr ""
+msgstr "Załącznik1"
#. module: crm
#: code:addons/crm/crm_phonecall.py:0
@@ -2486,7 +2531,7 @@ msgstr ""
#: model:ir.ui.menu,name:crm.menu_crm_case_phone
#, python-format
msgid "Phone Calls"
-msgstr ""
+msgstr "Rozmowy telefoniczne"
#. module: crm
#: help:crm.case,active:0
@@ -2494,6 +2539,8 @@ msgid ""
"If the active field is set to true, it will allow you to hide the case "
"without removing it."
msgstr ""
+"Jeśli aktywne pole jest ustawione na true (prawda), to będziesz mógł ukryć "
+"sprawę bez jej usuwania."
#. module: crm
#: model:ir.model,name:crm.model_crm_menu_config_wizard
@@ -2503,24 +2550,24 @@ msgstr ""
#. module: crm
#: view:crm.case.history:0
msgid "Case History"
-msgstr "Historia przypadku"
+msgstr "Historia sprawy"
#. module: crm
#: field:crm.case,partner_phone:0
msgid "Phone"
-msgstr ""
+msgstr "Telefon"
#. module: crm
#: model:crm.case.category2,name:crm.categ2_fund2
msgid "Cheque"
-msgstr ""
+msgstr "Czek"
#. module: crm
#: field:crm.case,active:0
#: field:crm.case.rule,active:0
#: field:crm.case.section,active:0
msgid "Active"
-msgstr "Aktywny"
+msgstr "Aktywne"
#. module: crm
#: help:crm.case.rule,act_remind_attach:0
@@ -2528,6 +2575,8 @@ msgid ""
"Check this if you want that all documents attached to the case be attached "
"to the reminder email sent."
msgstr ""
+"Zaznacz to, jeśli chcesz aby wszystkie dokumenty załączone do sprawy zostały "
+"dołączone do przypomnień."
#. module: crm
#: selection:crm.segmentation.line,operator:0
@@ -2542,12 +2591,12 @@ msgstr ""
#. module: crm
#: view:crm.job:0
msgid "Candidate Phone"
-msgstr ""
+msgstr "Telefon kandydata"
#. module: crm
#: model:ir.actions.wizard,name:crm.wizard_crm_send_mail
msgid "Send Mail"
-msgstr ""
+msgstr "Wyślij wiadomość"
#. module: crm
#: selection:crm.case.rule,trg_date_range_type:0
@@ -2564,23 +2613,25 @@ msgstr "Miesiące"
#: model:ir.actions.act_window,name:crm.action_crm_opportunity_assign_wizard
#: model:ir.actions.act_window,name:crm.action_crm_phonecall_assign_wizard
msgid "To Assign"
-msgstr ""
+msgstr "Do przypisania"
#. module: crm
#: code:addons/crm/wizard/wizard_cal_subscribe.py:0
#, python-format
msgid "Please provide Proper URL !"
-msgstr ""
+msgstr "Podaj poprawny URL !"
#. module: crm
#: model:process.node,note:crm.process_node_opportunities0
msgid "When a real project/opportunity is detected"
-msgstr ""
+msgstr "Kiedy rzeczywisty projekt/szansa została wykryta"
#. module: crm
#: wizard_view:crm.job.partner_create,init:0
msgid "Are you sure you want to create a partner based on this job request ?"
msgstr ""
+"Jesteś pewien, że chcesz utworzyć partnera na podstawie tego zgłoszenia do "
+"pracy ?"
#. module: crm
#: wizard_field:crm.lead.opportunity_set,create_partner,action:0
@@ -2597,7 +2648,7 @@ msgstr "Akcja"
#: model:ir.ui.menu,name:crm.menu_crm_case_claims
#, python-format
msgid "Claims"
-msgstr ""
+msgstr "Reklamacje"
#. module: crm
#: field:crm.segmentation,som_interval_decrease:0
@@ -2607,28 +2658,28 @@ msgstr ""
#. module: crm
#: model:ir.actions.wizard,name:crm.wizard_case_history_event
msgid "History of Events"
-msgstr ""
+msgstr "Historia wydarzeń"
#. module: crm
#: model:ir.model,name:crm.model_crm_case_category2
msgid "Category2 of case"
-msgstr ""
+msgstr "Kategoria2 sprawy"
#. module: crm
#: wizard_field:crm.new.send.mail,init,to:0
#: wizard_field:crm.send.mail,init,to:0
msgid "To"
-msgstr ""
+msgstr "Do"
#. module: crm
#: view:crm.case.rule:0
msgid "%(case_user_email)s = Responsible email"
-msgstr ""
+msgstr "%(case_user_email)s = email odpowiedzialnego"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_presale
msgid "Sales"
-msgstr ""
+msgstr "Sprzedaż"
#. module: crm
#: view:crm.case:0
@@ -2639,18 +2690,18 @@ msgstr "Ogólne"
#. module: crm
#: model:crm.case.stage,name:crm.stage_lead2
msgid "Assigned"
-msgstr ""
+msgstr "Przydzielony"
#. module: crm
#: model:crm.case.stage,name:crm.stage_lead5
msgid "Recycled"
-msgstr ""
+msgstr "Usunięty"
#. module: crm
#: model:crm.case.categ,name:crm.categ_lead8
#: model:crm.case.categ,name:crm.categ_oppor8
msgid "Other"
-msgstr ""
+msgstr "Inne"
#. module: crm
#: view:crm.case:0
@@ -2660,17 +2711,17 @@ msgstr ""
#: selection:crm.new.send.mail,init,state:0
#: view:crm.opportunity:0
msgid "Done"
-msgstr ""
+msgstr "Wykonano"
#. module: crm
#: field:crm.segmentation,som_interval_max:0
msgid "Max Interval"
-msgstr "Maks. interwału"
+msgstr "Maks. interwał"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_category_act_oppor11
msgid "All Opportunities"
-msgstr ""
+msgstr "Wszystkie sprawy"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -2704,17 +2755,17 @@ msgstr ""
#: code:addons/crm/wizard/crm_phonecall_wizard.py:0
#, python-format
msgid "A partner is already existing with the same name."
-msgstr ""
+msgstr "Istnieje już partner z tą samą nazwą"
#. module: crm
#: model:ir.model,name:crm.model_crm_phonecall
msgid "Phonecall Cases"
-msgstr ""
+msgstr "Sprawy telefoniczne"
#. module: crm
#: help:crm.case.rule,sequence:0
msgid "Gives the sequence order when displaying a list of case rules."
-msgstr ""
+msgstr "Ustala kolejność wyświetlania listy reguł spraw"
#. module: crm
#: field:crm.menu.config_wizard,helpdesk:0
@@ -2741,23 +2792,23 @@ msgstr "Odpowiedzialny"
#: model:crm.case.stage,name:crm.stage_claim4
#: model:crm.case.stage,name:crm.stage_meet3
msgid "Invalid"
-msgstr ""
+msgstr "Niepoprawny"
#. module: crm
#: wizard_button:crm.job.meeting_set,init,order:0
#: wizard_button:crm.phonecall.meeting_set,init,order:0
msgid "Set Meeting"
-msgstr ""
+msgstr "Ustal spotkanie"
#. module: crm
#: field:crm.menu.config_wizard,meeting:0
msgid "Calendar of Meetings"
-msgstr ""
+msgstr "Kalendarz spotkań"
#. module: crm
#: view:crm.case:0
msgid "Cases By Stage and Estimates"
-msgstr ""
+msgstr "Sprawy wg etapów i szacunków"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -2766,6 +2817,8 @@ msgid ""
"You can not escalate this case.\n"
"You are already at the top level."
msgstr ""
+"Nie możesz przekazać tej sprawy.\n"
+"Jesteś na najwyższym poziomie."
#. module: crm
#: view:crm.lead:0
@@ -2775,7 +2828,7 @@ msgstr "Nazwa sygnału"
#. module: crm
#: view:crm.claim:0
msgid "Claim/Action Description"
-msgstr ""
+msgstr "Reklamacja/Opis akcji"
#. module: crm
#: field:crm.case.rule,trg_max_history:0
@@ -2797,17 +2850,17 @@ msgstr ""
#. module: crm
#: model:crm.case.stage,name:crm.stage_job6
msgid "Refused by Employee"
-msgstr ""
+msgstr "Odmowa pracownika"
#. module: crm
#: field:crm.case,partner_name:0
msgid "Employee's Name"
-msgstr ""
+msgstr "Nazwisko pracownika"
#. module: crm
#: model:crm.case.stage,name:crm.stage_job2
msgid "First Interview"
-msgstr ""
+msgstr "Pierwsza rozmowa"
#. module: crm
#: view:report.crm.case.section.categ.categ2:0
@@ -2815,17 +2868,17 @@ msgstr ""
#: view:report.crm.case.section.categ2:0
#: view:report.crm.case.section.stage:0
msgid "This Month"
-msgstr ""
+msgstr "Bieżący miesiąc"
#. module: crm
#: view:crm.job:0
msgid "Availability (weeks)"
-msgstr ""
+msgstr "Dostępność (tygodnie)"
#. module: crm
#: view:crm.opportunity:0
msgid "Opportunities Tree"
-msgstr ""
+msgstr "Drzewo szans"
#. module: crm
#: help:crm.case,state:0
@@ -2838,16 +2891,23 @@ msgid ""
" \n"
"If the case needs to be reviewed then the state is set to 'Pending'."
msgstr ""
+"Stan jest ustawiony na 'Projekt', gdy sprawa jest tworzona. "
+" \n"
+"Jeśli sprawa jest w toku, to stan jest ustawiony na 'Otwarte'. "
+" \n"
+"Kiedy sprawa jest zakończona, stan jest 'Wykonano'. "
+" \n"
+"Jeśli sprawa wymaga interwencji, to stan jest 'Oczekiwanie'."
#. module: crm
#: view:crm.job:0
msgid "Open Jobs"
-msgstr ""
+msgstr "Otwarte stanowiska"
#. module: crm
#: selection:crm.email.add.cc,name:0
msgid "Email Address"
-msgstr ""
+msgstr "Adres email"
#. module: crm
#: help:crm.segmentation,som_interval_max:0
@@ -2855,16 +2915,18 @@ msgid ""
"The computation is made on all events that occured during this interval, the "
"past X periods."
msgstr ""
+"Obliczenia są wykonywane na wszystkich zdarzeniach, które wystąpiły w "
+"trakcie tego interwału, w ostatnich X okresach."
#. module: crm
#: field:crm.case,case_id:0
msgid "Related Case"
-msgstr ""
+msgstr "Sprawa związana"
#. module: crm
#: field:crm.case.rule,server_action_id:0
msgid "Server Action"
-msgstr ""
+msgstr "Akcja serwera"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_categ_claim0
@@ -2874,33 +2936,33 @@ msgstr "Wszystkie reklamacje"
#. module: crm
#: field:crm.case.log,user_id:0
msgid "User Responsible"
-msgstr ""
+msgstr "Użytkownik odpowiedzialny"
#. module: crm
#: code:addons/crm/wizard/wizard_crm_new_send_email.py:0
#, python-format
msgid "Email not sent !"
-msgstr ""
+msgstr "Wiadomość nie wysłana !"
#. module: crm
#: wizard_field:crm.phonecall.partner_create,init,close:0
msgid "Close Phonecall"
-msgstr ""
+msgstr "Zamknij rozmowę"
#. module: crm
#: field:crm.case,email_last:0
msgid "Latest E-Mail"
-msgstr ""
+msgstr "Ostatni email"
#. module: crm
#: view:crm.case.rule:0
msgid "Regex on Communication History"
-msgstr ""
+msgstr "Wyrażenia reg. dla historii komunikacji"
#. module: crm
#: model:crm.case.category2,name:crm.categ2_fund4
msgid "Demand Draft"
-msgstr ""
+msgstr "Wymagaj projektu"
#. module: crm
#: field:crm.case,id:0
@@ -2910,18 +2972,18 @@ msgstr ""
#. module: crm
#: field:crm.case,log_ids:0
msgid "Logs History"
-msgstr ""
+msgstr "Zapisuje historię"
#. module: crm
#: wizard_field:crm.lead.opportunity_set,opportunity,name:0
#: wizard_field:crm.phonecall.opportunity_set,opportunity,name:0
msgid "Opportunity Summary"
-msgstr ""
+msgstr "Podsumowanie szans"
#. module: crm
#: view:crm.case:0
msgid "Search Case"
-msgstr ""
+msgstr "Przeszukaj sprawę"
#. module: crm
#: view:crm.segmentation:0
@@ -2931,13 +2993,13 @@ msgstr "Kontynuuj proces"
#. module: crm
#: view:crm.case.history:0
msgid "Case Description"
-msgstr "Opis przypadku"
+msgstr "Opis sprawy"
#. module: crm
#: wizard_field:crm.job.reschedule_phone_call,init,user_id:0
#: wizard_field:crm.opportunity.reschedule_phone_call,init,user_id:0
msgid "Assign To"
-msgstr ""
+msgstr "Przypisz do"
#. module: crm
#: field:crm.case,date_action_last:0
@@ -2947,27 +3009,27 @@ msgstr "Ostatnia akcja"
#. module: crm
#: field:crm.case,duration:0
msgid "Duration"
-msgstr ""
+msgstr "Czas trwania"
#. module: crm
#: model:ir.model,name:crm.model_report_crm_case_section_categ_stage
msgid "Cases by section, Category and stage"
-msgstr ""
+msgstr "Sprawy wg sekcji, kategorii i etapu"
#. module: crm
#: view:crm.job:0
msgid "Candidate Hired"
-msgstr ""
+msgstr "Kandydat zatrudniony"
#. module: crm
#: field:crm.menu.config_wizard,jobs:0
msgid "Jobs Hiring Process"
-msgstr ""
+msgstr "Proces zatrudniania"
#. module: crm
#: model:ir.ui.menu,name:crm.next_id_52
msgid "All Cases"
-msgstr "Wszystkie przypadki"
+msgstr "Wszystkie sprawy"
#. module: crm
#: code:addons/crm/wizard/crm_lead_wizard.py:0
@@ -2986,7 +3048,7 @@ msgstr "Źródło sygnału"
#: field:report.crm.case.section.categ2,nbr:0
#: field:report.crm.case.section.stage,nbr:0
msgid "# of Cases"
-msgstr ""
+msgstr "# spraw"
#. module: crm
#: selection:crm.meeting,class:0
@@ -2996,7 +3058,7 @@ msgstr ""
#. module: crm
#: wizard_view:caldav.crm.subscribe,init:0
msgid "Provide path for Remote Calendar"
-msgstr ""
+msgstr "Wprowadź ścieżkę dla zdalnego kalendarza"
#. module: crm
#: view:crm.segmentation:0
@@ -3007,28 +3069,28 @@ msgstr "Segmentacja"
#. module: crm
#: view:crm.fundraising:0
msgid "Funds Form"
-msgstr ""
+msgstr "Formularz funduszy"
#. module: crm
#: view:crm.meeting:0
msgid "Search Meetings"
-msgstr ""
+msgstr "Przeszukuj spotkania"
#. module: crm
#: selection:crm.lead.opportunity_set,create_partner,action:0
#: selection:crm.phonecall.opportunity_set,create_partner,action:0
msgid "Create a new partner"
-msgstr ""
+msgstr "Utwórz nowego partnera"
#. module: crm
#: field:crm.case,company_id:0
msgid "Company"
-msgstr ""
+msgstr "Firma"
#. module: crm
#: model:crm.case.stage,name:crm.stage_lead3
msgid "In Process"
-msgstr ""
+msgstr "W toku"
#. module: crm
#: selection:crm.segmentation,state:0
@@ -3038,24 +3100,24 @@ msgstr "Uruchomione"
#. module: crm
#: view:crm.case.rule:0
msgid "%(case_user)s = Responsible name"
-msgstr ""
+msgstr "%(case_user)s = Nazwa odpowiedzialnego"
#. module: crm
#: wizard_field:crm.job.reschedule_phone_call,init,note:0
#: wizard_field:crm.opportunity.reschedule_phone_call,init,note:0
msgid "Goals"
-msgstr ""
+msgstr "Cele"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm_case_section_categ_tree
#: view:report.crm.case.section.categ2:0
msgid "Cases by Section and Type"
-msgstr ""
+msgstr "Sprawy wg sekcji i typu"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_aftersale
msgid "After-Sale Services"
-msgstr ""
+msgstr "Obsługa posprzedażna"
#. module: crm
#: wizard_button:caldav.crm.export,init,end:0
@@ -3068,12 +3130,12 @@ msgstr ""
#. module: crm
#: wizard_field:caldav.crm.export,init,name:0
msgid "File name"
-msgstr ""
+msgstr "Nazwa pliku"
#. module: crm
#: view:crm.lead:0
msgid "Search Leads"
-msgstr "Szukaj sygnału"
+msgstr "Przeszukuj sygnały"
#. module: crm
#: help:crm.case.rule,active:0
@@ -3081,6 +3143,8 @@ msgid ""
"If the active field is set to true, it will allow you to hide the case rule "
"without removing it."
msgstr ""
+"Jeśli aktywne pole jest ustawione na true (prawda), to będziesz mógł ukryć "
+"regułę sprawy bez jej usuwania."
#. module: crm
#: code:addons/crm/crm.py:0
@@ -3098,7 +3162,7 @@ msgstr ""
#: model:ir.actions.act_window,name:crm.crm_case_categ0_act_job
#: model:ir.ui.menu,name:crm.menu_crm_case_categ0_act_job
msgid "All Jobs Requests"
-msgstr ""
+msgstr "Wszystkie zgłoszenia na stanowisko"
#. module: crm
#: selection:crm.case,state:0
@@ -3110,7 +3174,7 @@ msgstr ""
#: selection:report.crm.case.section.categ2,state:0
#: selection:report.crm.case.section.stage,state:0
msgid "Cancelled"
-msgstr ""
+msgstr "Anulowano"
#. module: crm
#: view:crm.job:0
@@ -3127,27 +3191,27 @@ msgstr ""
#. module: crm
#: view:crm.phonecall:0
msgid "Relevant"
-msgstr ""
+msgstr "Odpowiedni"
#. module: crm
#: wizard_field:crm.case.opportunity.partner_opportunity,init,name:0
msgid "Opportunity Name"
-msgstr ""
+msgstr "Nazwa szansy"
#. module: crm
#: field:crm.meeting,rrule:0
msgid "Recurrent Rule"
-msgstr ""
+msgstr "Reguła rekurencyjna"
#. module: crm
#: wizard_view:caldav.crm.import,init:0
msgid "Import ICS"
-msgstr ""
+msgstr "Importuj ICS"
#. module: crm
#: view:crm.phonecall:0
msgid "Call Summary"
-msgstr ""
+msgstr "Podsumowanie rozmowy"
#. module: crm
#: field:crm.segmentation.line,expr_operator:0
@@ -3157,17 +3221,17 @@ msgstr "Operator"
#. module: crm
#: model:ir.model,name:crm.model_crm_case_log
msgid "Case Communication History"
-msgstr "Historia komunikacji przypadku"
+msgstr "Historia komunikacji sprawy"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_oppor_categ
msgid "Cases by Opportunities and Type"
-msgstr ""
+msgstr "Sprawy wg szans i typów"
#. module: crm
#: view:crm.case.rule:0
msgid "%(case_subject)s = Case subject"
-msgstr ""
+msgstr "%(case_subject)s = Temat sprawy"
#. module: crm
#: field:crm.case,section_id:0
@@ -3201,12 +3265,12 @@ msgstr ""
#: code:addons/crm/wizard/crm_job_wizard.py:0
#, python-format
msgid "A partner is already defined on this job request."
-msgstr ""
+msgstr "Dla tego zgłoszenia do pracy partner jest juz zdefiniowany."
#. module: crm
#: model:crm.case.stage,name:crm.stage_lead1
msgid "New"
-msgstr ""
+msgstr "Nowe"
#. module: crm
#: field:crm.case,description:0
@@ -3235,27 +3299,27 @@ msgstr ""
#. module: crm
#: model:ir.model,name:crm.model_crm_claim
msgid "Claim Cases"
-msgstr ""
+msgstr "Sprawy reklamacji"
#. module: crm
#: view:crm.case.rule:0
msgid "E-Mail Reminders (includes the content of the case)"
-msgstr ""
+msgstr "Przypomnienie email (zawiera sprawę)"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_lead_stage
msgid "Cases by Leads and Stage"
-msgstr "Zdarzenia wg sygnałów i etapów"
+msgstr "Sprawy wg sygnałów i etapów"
#. module: crm
#: field:crm.meeting,exdate:0
msgid "Exception Date/Times"
-msgstr ""
+msgstr "Daty/Czasy wyjątków"
#. module: crm
#: view:crm.meeting.generic_wizard:0
msgid "Generic Wizard"
-msgstr ""
+msgstr "Podstawowy kreator"
#. module: crm
#: model:process.transition,note:crm.process_transition_leadopportunity0
@@ -3265,7 +3329,7 @@ msgstr "Tworzenie szansy z sygnału"
#. module: crm
#: model:ir.ui.menu,name:crm.next_id_64
msgid "Reporting"
-msgstr ""
+msgstr "Raportowanie"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -3286,17 +3350,17 @@ msgstr ""
#: selection:report.crm.case.section.stage,state:0
#, python-format
msgid "Pending"
-msgstr "Oczekuje"
+msgstr "Oczekiwanie"
#. module: crm
#: model:process.transition,name:crm.process_transition_leadopportunity0
msgid "Prospect Opportunity"
-msgstr ""
+msgstr "Potencjalna szansa"
#. module: crm
#: view:crm.job:0
msgid "Expected Salary"
-msgstr ""
+msgstr "Oczekiwane wynagrodzenie"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_crm_configuration
@@ -3306,28 +3370,28 @@ msgstr "Konfiguracja"
#. module: crm
#: model:ir.actions.wizard,name:crm.wizard_crm_new_send_mail
msgid "Send New Mail"
-msgstr ""
+msgstr "Wyślij nową wiadomość"
#. module: crm
#: constraint:ir.cron:0
msgid "Invalid arguments"
-msgstr ""
+msgstr "Niepoprawne argumenty"
#. module: crm
#: field:crm.meeting,transparent:0
msgid "Trensparent"
-msgstr ""
+msgstr "Przezroczysty"
#. module: crm
#: view:crm.case:0
msgid "My Cases"
-msgstr ""
+msgstr "Moje sprawy"
#. module: crm
#: model:crm.case.categ,name:crm.categ_lead7
#: model:crm.case.categ,name:crm.categ_oppor7
msgid "Word of mouth"
-msgstr ""
+msgstr "Ustna wiadomość"
#. module: crm
#: view:crm.lead:0
@@ -3338,32 +3402,32 @@ msgstr "Temat sygnału"
#: view:crm.lead:0
#: view:crm.phonecall:0
msgid "Convert to Opportunity"
-msgstr ""
+msgstr "Konwertuj do szansy"
#. module: crm
#: model:crm.case.stage,name:crm.stage_phone1
msgid "Planned"
-msgstr ""
+msgstr "Planowane"
#. module: crm
#: model:crm.case.category2,name:crm.category_meet3
msgid "Customer Office"
-msgstr ""
+msgstr "Biuro klienta"
#. module: crm
#: view:crm.job:0
msgid "Candidate Email"
-msgstr ""
+msgstr "Email kandydata"
#. module: crm
#: view:crm.opportunity:0
msgid "Sales Stage: "
-msgstr ""
+msgstr "Etap sprzedaży: "
#. module: crm
#: view:crm.claim:0
msgid "Type of Action"
-msgstr ""
+msgstr "Typ akcji"
#. module: crm
#: field:crm.case.rule,act_user_id:0
@@ -3373,7 +3437,7 @@ msgstr "Ustaw odpowiedzialnego na"
#. module: crm
#: view:crm.job:0
msgid "Meeting With Candidates"
-msgstr ""
+msgstr "Spotkanie z kandydatami"
#. module: crm
#: help:crm.segmentation,som_interval:0
@@ -3384,6 +3448,11 @@ msgid ""
"has decreased because he probably bought goods to another supplier. Use this "
"functionality for recurring businesses."
msgstr ""
+"Okres jest średnią (w dniach) pomiędzy dwiema sprzedażami lub dwoma zakupami "
+"dla tej segmentacji. To jest stosowane głównie do wykrycia, czy partner nie "
+"kupował u nas zbyt długo, co może oznaczać, że jego stan emocji obniżył się, "
+"ponieważ prawdopodobnie dokonał zakupów u innego dostawcy. Stosuj te "
+"funkcjonalność do biznesów powtarzalnych."
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@@ -3391,27 +3460,27 @@ msgstr ""
#: selection:report.crm.case.section.categ2,month:0
#: selection:report.crm.case.section.stage,month:0
msgid "December"
-msgstr ""
+msgstr "Grudzień"
#. module: crm
#: view:report.crm.case.section.categ.categ2:0
msgid "Search Cases by User"
-msgstr ""
+msgstr "Przeszukuj sprawy wg użytkownika"
#. module: crm
#: view:crm.case.rule:0
msgid "Condition on Communication History"
-msgstr ""
+msgstr "Warunki dla historii komunikacji"
#. module: crm
#: field:crm.case.rule,act_mail_to_partner:0
msgid "Mail to partner"
-msgstr ""
+msgstr "Mail do partnera"
#. module: crm
#: view:crm.fundraising:0
msgid "Funds Tree"
-msgstr ""
+msgstr "Drzewo funduszy"
#. module: crm
#: field:crm.case.rule,act_method:0
@@ -3421,7 +3490,7 @@ msgstr ""
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_category_act_fund_all1
msgid "All Funds"
-msgstr ""
+msgstr "Wszystkie fundusze"
#. module: crm
#: field:crm.case.section,calendar:0
@@ -3433,7 +3502,7 @@ msgstr "Kalendarz"
#. module: crm
#: model:crm.case.categ,name:crm.categ_job1
msgid "Salesman"
-msgstr ""
+msgstr "Sprzedawca"
#. module: crm
#: model:crm.case.section,name:crm.section_support_help
@@ -3455,12 +3524,12 @@ msgstr ""
#: model:ir.actions.wizard,name:crm.wizard_crm_job_meeting_set
#: model:ir.actions.wizard,name:crm.wizard_crm_phonecall_meeting_set
msgid "Schedule Meeting"
-msgstr ""
+msgstr "Zaplanuj spotkanie"
#. module: crm
#: model:crm.case.categ,name:crm.categ_fund4
msgid "Arts And Culture"
-msgstr ""
+msgstr "Kultura i sztuka"
#. module: crm
#: model:crm.case.categ,name:crm.categ_phone2
@@ -3468,18 +3537,18 @@ msgstr ""
#: model:ir.actions.act_window,name:crm.crm_case_categ_phone_outgoing0
#: model:ir.ui.menu,name:crm.menu_crm_case_phone_outbound
msgid "Outbound"
-msgstr ""
+msgstr "Ruch wychodzący"
#. module: crm
#: code:addons/crm/crm.py:0
#, python-format
msgid "Historize"
-msgstr ""
+msgstr "Zapisz do historii"
#. module: crm
#: view:crm.meeting:0
msgid "Confirmed"
-msgstr ""
+msgstr "Potwierdzone"
#. module: crm
#: selection:crm.segmentation,state:0
@@ -3491,7 +3560,7 @@ msgstr "Nie uruchomiony"
#: wizard_field:crm.lead.opportunity_set,opportunity,probability:0
#: wizard_field:crm.phonecall.opportunity_set,opportunity,probability:0
msgid "Success Probability"
-msgstr ""
+msgstr "Prawdopodobieństwo sukcesu"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -3511,7 +3580,7 @@ msgstr "Projekt"
#. module: crm
#: field:crm.case.rule,trg_date_range:0
msgid "Delay after trigger date"
-msgstr ""
+msgstr "Opóźnienie po dacie wyzwolenia"
#. module: crm
#: view:crm.lead:0
@@ -3537,7 +3606,7 @@ msgstr "Normalny"
#: code:addons/crm/wizard/wizard_crm_send_email.py:0
#, python-format
msgid "You must put a Partner eMail to use this action!"
-msgstr ""
+msgstr "Musisz podac email pertnera, aby zastosować tę akcję!"
#. module: crm
#: wizard_view:crm.job.partner_create,init:0
@@ -3546,17 +3615,17 @@ msgstr ""
#: wizard_view:crm.phonecall.opportunity_set,create_partner:0
#: wizard_view:crm.phonecall.partner_create,init:0
msgid "You may have to verify that this partner does not exist already."
-msgstr ""
+msgstr "Powinieneś sprawdzić, czy ten partner już istnieje."
#. module: crm
#: view:crm.job:0
msgid "Qualication"
-msgstr ""
+msgstr "Kwalifikacje"
#. module: crm
#: view:crm.meeting:0
msgid "Change RRule"
-msgstr ""
+msgstr "Zmień regułę"
#. module: crm
#: selection:crm.email.add.cc,name:0
@@ -3566,14 +3635,14 @@ msgstr ""
#: field:report.crm.case.section.categ2,user_id:0
#: field:report.crm.case.section.stage,user_id:0
msgid "User"
-msgstr ""
+msgstr "Użytkownik"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_lead_categ_categ2
#: model:ir.ui.menu,name:crm.menu_crm_case_section_categ_categ2_tree
#: view:report.crm.case.section.categ.categ2:0
msgid "Cases by Section, Category and Type"
-msgstr ""
+msgstr "Sprawy wg sekcji, kategorii i typu"
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@@ -3581,7 +3650,7 @@ msgstr ""
#: selection:report.crm.case.section.categ2,month:0
#: selection:report.crm.case.section.stage,month:0
msgid "November"
-msgstr ""
+msgstr "Listopad"
#. module: crm
#: model:crm.case.category2,name:crm.category_job2
@@ -3602,14 +3671,14 @@ msgstr "Sekcja nadrzędna"
#: model:ir.actions.wizard,name:crm.wizard_crm_job_reschedule_phone_call
#: model:ir.actions.wizard,name:crm.wizard_crm_opportunity_reschedule_phone_call
msgid "Schedule Phone Call"
-msgstr ""
+msgstr "Zaplanuj rozmowę telefoniczną"
#. module: crm
#: code:addons/crm/crm.py:0
#, python-format
msgid ""
"Can not send mail with empty body,you should have description in the body"
-msgstr ""
+msgstr "Nie można wysłać wiadomości z pustą treścią."
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@@ -3617,12 +3686,12 @@ msgstr ""
#: selection:report.crm.case.section.categ2,month:0
#: selection:report.crm.case.section.stage,month:0
msgid "January"
-msgstr ""
+msgstr "Styczeń"
#. module: crm
#: model:process.process,name:crm.process_process_contractprocess0
msgid "Contract"
-msgstr ""
+msgstr "Umowa"
#. module: crm
#: field:crm.case.section,child_ids:0
@@ -3637,7 +3706,7 @@ msgstr "Planowany dochód"
#. module: crm
#: model:crm.case.categ,name:crm.categ_fund3
msgid "Healthcare"
-msgstr ""
+msgstr "Służba zdrowia"
#. module: crm
#: view:crm.case:0
@@ -3651,7 +3720,7 @@ msgstr ""
#: view:crm.phonecall:0
#: view:crm.phonecall.assign_wizard:0
msgid "Assign"
-msgstr ""
+msgstr "Przydziel"
#. module: crm
#: field:crm.case,partner_address_id:0
@@ -3661,17 +3730,17 @@ msgstr "Kontakt do partnera"
#. module: crm
#: model:crm.case.category2,name:crm.category_meet1
msgid "Office"
-msgstr ""
+msgstr "Biuro"
#. module: crm
#: model:ir.model,name:crm.model_crm_fundraising
msgid "Fund Raising Cases"
-msgstr ""
+msgstr "Sprawy podwyższania funduszy"
#. module: crm
#: model:ir.model,name:crm.model_crm_case_stage
msgid "Stage of case"
-msgstr ""
+msgstr "Etap sprawy"
#. module: crm
#: view:crm.case:0
@@ -3700,49 +3769,49 @@ msgstr ""
#. module: crm
#: view:crm.case.rule:0
msgid "Conditions on Case Partner"
-msgstr ""
+msgstr "Warunki na partnera sprawy"
#. module: crm
#: field:crm.case.section,code:0
msgid "Section Code"
-msgstr ""
+msgstr "Kod sekcji"
#. module: crm
#: wizard_field:crm.job.meeting_set,init,date:0
#: wizard_field:crm.phonecall.meeting_set,init,date:0
msgid "Meeting date"
-msgstr ""
+msgstr "Data spotkania"
#. module: crm
#: selection:crm.meeting,class:0
msgid "CONFIDENTIAL"
-msgstr ""
+msgstr "POUFNE"
#. module: crm
#: help:crm.case.rule,act_mail_body:0
msgid "Content of mail"
-msgstr ""
+msgstr "Treść wiaodmości"
#. module: crm
#: model:crm.case.stage,name:crm.stage_meet2
msgid "Not fixed"
-msgstr ""
+msgstr "Nie ustalone"
#. module: crm
#: model:crm.case.categ,name:crm.categ_lead3
#: model:crm.case.categ,name:crm.categ_oppor3
msgid "Employee"
-msgstr ""
+msgstr "Pracownik"
#. module: crm
#: field:crm.case,email_from:0
msgid "Partner Email"
-msgstr ""
+msgstr "Email partnera"
#. module: crm
#: view:crm.case.rule:0
msgid "% = The '%' Character"
-msgstr ""
+msgstr "% = Znak '%'"
#. module: crm
#: view:crm.case:0
@@ -3763,18 +3832,20 @@ msgstr "Opis"
#: selection:report.crm.case.section.categ2,month:0
#: selection:report.crm.case.section.stage,month:0
msgid "May"
-msgstr ""
+msgstr "Maj"
#. module: crm
#: view:crm.job:0
msgid "Internal Notes"
-msgstr ""
+msgstr "Wiadomości wewnętrzne"
#. module: crm
#: help:crm.case.rule,act_remind_user:0
msgid ""
"Check this if you want the rule to send a reminder by email to the user."
msgstr ""
+"Zaznacz to, jeśli chcesz aby reguła wysłała przypomnienie mailem do "
+"użytkownika."
#. module: crm
#: view:crm.case:0
@@ -3786,7 +3857,7 @@ msgstr ""
#: view:crm.opportunity:0
#: wizard_field:crm.send.mail,init,cc:0
msgid "CC"
-msgstr ""
+msgstr "DW"
#. module: crm
#: field:crm.segmentation.line,operator:0
@@ -3796,7 +3867,7 @@ msgstr "Obowiązkowe / Opcjonalne"
#. module: crm
#: wizard_button:caldav.crm.import,init,open:0
msgid "_Import"
-msgstr ""
+msgstr "_Importuj"
#. module: crm
#: code:addons/crm/crm.py:0
@@ -3813,7 +3884,7 @@ msgstr ""
#: model:res.request.link,name:crm.req_link_case
#, python-format
msgid "Case"
-msgstr "Przypadek"
+msgstr "Sprawa"
#. module: crm
#: selection:crm.case,priority:0
@@ -3829,19 +3900,19 @@ msgstr "Najniższy"
#: selection:report.crm.case.section.categ2,month:0
#: selection:report.crm.case.section.stage,month:0
msgid "February"
-msgstr ""
+msgstr "Luty"
#. module: crm
#: view:crm.phonecall:0
#: model:ir.actions.act_window,name:crm.crm_case_categ_meet_case
#: model:ir.actions.act_window,name:crm.crm_case_categ_meet_create_partner
msgid "Schedule a Meeting"
-msgstr ""
+msgstr "Zaplanuj spotkanie"
#. module: crm
#: view:crm.case.rule:0
msgid "Conditions on Priority Range"
-msgstr ""
+msgstr "Warunki na zakres priorytetu"
#. module: crm
#: help:crm.segmentation,som_interval_decrease:0
@@ -3849,17 +3920,19 @@ msgid ""
"If the partner has not purchased (or buied) during a period, decrease the "
"state of mind by this factor. It's a multiplication"
msgstr ""
+"Jeśli partner nie zakupił nic przez ten okres, to zmniejsz jego stan emocji "
+"o ten współczynnik. To jest dzielenie."
#. module: crm
#: wizard_view:crm.new.send.mail,init:0
#: wizard_view:crm.send.mail,init:0
msgid "Mass Mailing"
-msgstr ""
+msgstr "Poczta masowa"
#. module: crm
#: view:crm.case.rule:0
msgid "E-Mail Actions"
-msgstr ""
+msgstr "Akcje email"
#. module: crm
#: field:report.crm.case.section.categ.categ2,name:0
@@ -3867,22 +3940,22 @@ msgstr ""
#: field:report.crm.case.section.categ2,name:0
#: field:report.crm.case.section.stage,name:0
msgid "Year"
-msgstr ""
+msgstr "Rok"
#. module: crm
#: model:crm.case.category2,name:crm.categ2_fund1
msgid "Cash"
-msgstr ""
+msgstr "Gotówka"
#. module: crm
#: view:crm.fundraising:0
msgid "Funds by Categories"
-msgstr ""
+msgstr "Fundusze wg kategorii"
#. module: crm
#: model:process.node,note:crm.process_node_leads0
msgid "Very first contact with new prospect"
-msgstr ""
+msgstr "Pierwszy kontakt z tą okazją"
#. module: crm
#: selection:report.crm.case.section.categ.categ2,month:0
@@ -3890,42 +3963,42 @@ msgstr ""
#: selection:report.crm.case.section.categ2,month:0
#: selection:report.crm.case.section.stage,month:0
msgid "April"
-msgstr ""
+msgstr "Kwiecień"
#. module: crm
#: model:crm.case.stage,name:crm.stage_meet5
msgid "Future"
-msgstr ""
+msgstr "Przyszłe"
#. module: crm
#: wizard_field:caldav.crm.export,init,file_path:0
msgid "Save ICS file"
-msgstr ""
+msgstr "Zapisz plik ICS"
#. module: crm
#: wizard_field:caldav.crm.subscribe,init,url_path:0
msgid "Provide path for remote calendar"
-msgstr ""
+msgstr "Wprowadź ścieżkę dla zdalnego kalendarza"
#. module: crm
#: view:crm.case.log:0
msgid "Case logs"
-msgstr ""
+msgstr "Log sprawy"
#. module: crm
#: view:crm.case.rule:0
msgid "Conditions on Timing"
-msgstr ""
+msgstr "Warunki na czas"
#. module: crm
#: model:ir.model,name:crm.model_crm_helpdesk
msgid "Helpdesk Cases"
-msgstr ""
+msgstr "Sprawy helpdesku"
#. module: crm
#: model:ir.actions.wizard,name:crm.wizard_crm_cal_export
msgid "Export ICS File"
-msgstr ""
+msgstr "Eksportuj plik ICS"
#. module: crm
#: field:crm.case.rule,sequence:0
@@ -3938,38 +4011,38 @@ msgstr "Numeracja"
#: wizard_view:caldav.crm.import,init:0
#: wizard_field:caldav.crm.import,init,file_path:0
msgid "Select ICS file"
-msgstr ""
+msgstr "Wybierz plik ICS"
#. module: crm
#: wizard_view:caldav.crm.import,display:0
msgid "Import Message"
-msgstr ""
+msgstr "Importuj wiadomość"
#. module: crm
#: field:crm.segmentation.line,expr_name:0
msgid "Control Variable"
-msgstr ""
+msgstr "Zmienna kontrolna"
#. module: crm
#: model:ir.actions.act_window,name:crm.crm_case_section_act_tree
#: model:ir.ui.menu,name:crm.menu_crm_case_section_act_tree
msgid "Cases by section"
-msgstr "Przypadki wg sekcji"
+msgstr "Sprawy wg sekcji"
#. module: crm
#: view:crm.job:0
msgid "New Jobs"
-msgstr ""
+msgstr "Nowe stanowiska"
#. module: crm
#: field:crm.menu.config_wizard,fund:0
msgid "Fund Raising Operations"
-msgstr ""
+msgstr "Operacje zwiększania funduszy"
#. module: crm
#: model:crm.case.category2,name:crm.category_lead8
msgid "Newsletter"
-msgstr ""
+msgstr "Biuletyn"
#~ msgid "My "
#~ msgstr "Moje "
diff --git a/addons/crm/i18n/pt_BR.po b/addons/crm/i18n/pt_BR.po
index 22ee8947778..d848e510234 100644
--- a/addons/crm/i18n/pt_BR.po
+++ b/addons/crm/i18n/pt_BR.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2010-01-05 05:59+0000\n"
-"PO-Revision-Date: 2010-02-02 17:06+0000\n"
-"Last-Translator: pedrobom \n"
+"PO-Revision-Date: 2010-05-22 04:53+0000\n"
+"Last-Translator: Guilherme Santos \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:02+0000\n"
+"X-Launchpad-Export-Date: 2010-05-23 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -111,7 +111,7 @@ msgstr ""
#. module: crm
#: model:ir.ui.menu,name:crm.menu_hr
msgid "Human Resources"
-msgstr ""
+msgstr "Recursos Humanos"
#. module: crm
#: model:ir.ui.menu,name:crm.menu_action_report_crm_case_oppor_categ_categ2
@@ -229,7 +229,7 @@ msgstr "Seção de caso"
#. module: crm
#: view:crm.job:0
msgid "Proposed Salary"
-msgstr "Salário proposto"
+msgstr "Salário Proposto"
#. module: crm
#: help:crm.case.section,sequence:0
@@ -272,7 +272,7 @@ msgstr "Palavras-chave especiais a serem utilizadas no corpo"
#: view:crm.lead:0
#: view:crm.opportunity:0
msgid "Send New Email"
-msgstr "Envia Novo Email"
+msgstr "Enviar Novo Email"
#. module: crm
#: view:crm.case.history:0
diff --git a/addons/crm_profiling/i18n/pl.po b/addons/crm_profiling/i18n/pl.po
index 5c30fe31019..b032c9d7c32 100644
--- a/addons/crm_profiling/i18n/pl.po
+++ b/addons/crm_profiling/i18n/pl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2008-12-10 00:48+0000\n"
-"Last-Translator: Andrzej MoST (Marcin Ostajewski) \n"
+"PO-Revision-Date: 2010-05-21 20:20+0000\n"
+"Last-Translator: Grzegorz Grzelak (Cirrus.pl) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:17+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm_profiling
@@ -49,7 +49,7 @@ msgstr ""
#. module: crm_profiling
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: crm_profiling
#: field:crm_profiling.answer,name:0
@@ -70,7 +70,7 @@ msgstr "Opis"
#. module: crm_profiling
#: field:crm.segmentation,answer_no:0
msgid "Excluded Answers"
-msgstr ""
+msgstr "Wyłączone odpowiedzi"
#. module: crm_profiling
#: view:crm_profiling.answer:0
@@ -111,12 +111,12 @@ msgstr "Kwestionariusz"
#. module: crm_profiling
#: constraint:crm.segmentation:0
msgid "Error ! You can not create recursive profiles."
-msgstr ""
+msgstr "Błąd ! Nie możesz tworzyć profilów rekurencyjnych."
#. module: crm_profiling
#: field:crm.segmentation,profiling_active:0
msgid "Use The Profiling Rules"
-msgstr ""
+msgstr "Stosuj reguły profili"
#. module: crm_profiling
#: view:crm_profiling.question:0
@@ -127,7 +127,7 @@ msgstr "Dostępne odpowiedzi"
#. module: crm_profiling
#: field:crm.segmentation,answer_yes:0
msgid "Included Answers"
-msgstr ""
+msgstr "Włączone odpowiedzi"
#. module: crm_profiling
#: help:crm.segmentation,profiling_active:0
@@ -147,7 +147,7 @@ msgstr "Pytania"
#. module: crm_profiling
#: field:crm.segmentation,parent_id:0
msgid "Parent Profile"
-msgstr ""
+msgstr "Profil nadrzędny"
#. module: crm_profiling
#: wizard_button:open_questionnaire,init,end:0
@@ -158,12 +158,12 @@ msgstr "Anuluj"
#. module: crm_profiling
#: view:crm.segmentation:0
msgid "Partner Segmentations"
-msgstr ""
+msgstr "Segmentacja partnera"
#. module: crm_profiling
#: model:ir.actions.wizard,name:crm_profiling.wizard_open_questionnaire
msgid "Using a questionnaire"
-msgstr "Uzywanie kwestionariusza"
+msgstr "Używanie kwestionariusza"
#. module: crm_profiling
#: wizard_button:open_questionnaire,open,compute:0
diff --git a/addons/document_ics/i18n/fr.po b/addons/document_ics/i18n/fr.po
index 829e71f8bb1..79a9107259d 100644
--- a/addons/document_ics/i18n/fr.po
+++ b/addons/document_ics/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-09 17:33+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2010-05-21 20:29+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:18+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: document_ics
@@ -37,17 +37,17 @@ msgstr "Erreur ! Vous ne pouvez pas créer de Répertoires récursivement."
#. module: document_ics
#: field:document.ics.crm.wizard,jobs:0
msgid "Jobs Hiring Process"
-msgstr ""
+msgstr "Procédure de recrutement"
#. module: document_ics
#: view:document.ics.crm.wizard:0
msgid "Configure Calendars for CRM Sections"
-msgstr ""
+msgstr "Configure les calendriers pour les sections de la CRM"
#. module: document_ics
#: field:document.ics.crm.wizard,helpdesk:0
msgid "Helpdesk"
-msgstr ""
+msgstr "Support"
#. module: document_ics
#: field:document.directory.ics.fields,field_id:0
@@ -57,7 +57,7 @@ msgstr "Champ Open ERP"
#. module: document_ics
#: view:document.ics.crm.wizard:0
msgid "Next"
-msgstr ""
+msgstr "Suivant"
#. module: document_ics
#: field:document.directory.ics.fields,content_id:0
@@ -67,7 +67,7 @@ msgstr "Contenu"
#. module: document_ics
#: field:document.ics.crm.wizard,meeting:0
msgid "Calendar of Meetings"
-msgstr ""
+msgstr "Calendrier des Rendez Vous"
#. module: document_ics
#: model:crm.case.section,name:document_ics.section_meeting
@@ -82,12 +82,14 @@ msgstr "url"
#. module: document_ics
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nom de modèle invalide pour la définition de l'action"
#. module: document_ics
#: help:document.ics.crm.wizard,bugs:0
msgid "Used by companies to track bugs and support requests on softwares"
msgstr ""
+"Utilisé par les sociétés pour suivre des anomalies et des demandes de "
+"supports sur les logiciels"
#. module: document_ics
#: model:ir.actions.todo,note:document_ics.config_wizard_step_case_section_menu
@@ -95,6 +97,8 @@ msgid ""
"This Configuration step use to create Calendars in document for all Case "
"Sections"
msgstr ""
+"Cette étape de configuration est utilisé pour créer un calendrier dans la "
+"GED pour toutes les sections"
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
@@ -107,6 +111,8 @@ msgid ""
"Help you to organise the jobs hiring process: evaluation, meetings, email "
"integration..."
msgstr ""
+"Aide à organiser le processus d'embauche: évaluation, rendez vous, gestion "
+"des emails"
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
@@ -116,28 +122,30 @@ msgstr "description"
#. module: document_ics
#: model:ir.actions.act_window,name:document_ics.action_view_document_ics_config_directories
msgid "Configure Calendars for Sections "
-msgstr ""
+msgstr "Configurer les Calendriers pour ces Sections "
#. module: document_ics
#: help:document.ics.crm.wizard,opportunity:0
msgid "Tracks identified business opportunities for your sales pipeline."
-msgstr ""
+msgstr "Suivi des occasions identifiées d'affaires pour vos canaux de vente."
#. module: document_ics
#: help:document.ics.crm.wizard,fund:0
msgid ""
"This may help associations in their fund raising process and tracking."
msgstr ""
+"Ceci peut aider les associations dans leur procédure de collecte de fonds et "
+"de suivi."
#. module: document_ics
#: help:document.ics.crm.wizard,helpdesk:0
msgid "Manages an Helpdesk service."
-msgstr ""
+msgstr "Diriger un service d'assistance"
#. module: document_ics
#: field:document.ics.crm.wizard,fund:0
msgid "Fund Raising Operations"
-msgstr ""
+msgstr "Opérations de levée de fonds"
#. module: document_ics
#: field:document.directory.content,ics_object_id:0
@@ -147,12 +155,12 @@ msgstr "Objet"
#. module: document_ics
#: constraint:crm.case.section:0
msgid "Error ! You cannot create recursive sections."
-msgstr ""
+msgstr "Erreur ! Vous ne pouvez pas créer de sections récursives."
#. module: document_ics
#: model:ir.module.module,shortdesc:document_ics.module_meta_information
msgid "Support for iCal based on Document Management System"
-msgstr ""
+msgstr "Support iCal basé sur la gestion documentaire"
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
@@ -173,6 +181,7 @@ msgstr "Valeur ICS"
#: model:ir.module.module,description:document_ics.module_meta_information
msgid "Allows to synchronise calendars with others applications."
msgstr ""
+"Autorise la syncrhonisation des calendriers avec les autres applications."
#. module: document_ics
#: constraint:ir.ui.view:0
@@ -189,12 +198,12 @@ msgstr ""
#. module: document_ics
#: field:document.ics.crm.wizard,name:0
msgid "Name"
-msgstr ""
+msgstr "Nom"
#. module: document_ics
#: help:document.ics.crm.wizard,meeting:0
msgid "Manages the calendar of meetings of the users."
-msgstr ""
+msgstr "Gère le calendrier des rendez-vous des utilisateurs"
#. module: document_ics
#: field:document.directory.content,ics_domain:0
@@ -207,6 +216,8 @@ msgid ""
"Manages the supplier and customers claims, including your corrective or "
"preventive actions."
msgstr ""
+"Gérér les réclamations fournisseurs et clients, incluant vos actions "
+"correctives ou préventives."
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
@@ -221,17 +232,17 @@ msgstr "Correspondance ICS"
#. module: document_ics
#: view:crm.case:0
msgid "Duration(In Hour)"
-msgstr ""
+msgstr "Durée (en heure)"
#. module: document_ics
#: field:document.ics.crm.wizard,document_ics:0
msgid "Shared Calendar"
-msgstr ""
+msgstr "Calendrier partagé"
#. module: document_ics
#: field:document.ics.crm.wizard,claims:0
msgid "Claims"
-msgstr ""
+msgstr "Réclamations"
#. module: document_ics
#: help:document.ics.crm.wizard,phonecall:0
@@ -239,6 +250,8 @@ msgid ""
"Help you to encode the result of a phone call or to planify a list of phone "
"calls to process."
msgstr ""
+"Aide à encoder le résultat d'une conversation téléphonique ou à plannifier "
+"une liste"
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
@@ -248,12 +261,12 @@ msgstr "dtstart"
#. module: document_ics
#: field:document.ics.crm.wizard,phonecall:0
msgid "Phone Calls"
-msgstr ""
+msgstr "Appels téléphoniques"
#. module: document_ics
#: field:document.ics.crm.wizard,bugs:0
msgid "Bug Tracking"
-msgstr ""
+msgstr "Suivi des Bugs"
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
@@ -263,12 +276,12 @@ msgstr "catégories"
#. module: document_ics
#: field:document.ics.crm.wizard,lead:0
msgid "Prospect"
-msgstr ""
+msgstr "Prospect"
#. module: document_ics
#: view:document.ics.crm.wizard:0
msgid "Create Pre-Configured Calendars"
-msgstr ""
+msgstr "Création de calendriers pré-configurer"
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
@@ -278,7 +291,7 @@ msgstr "créé"
#. module: document_ics
#: field:crm.case,code:0
msgid "Calendar Code"
-msgstr ""
+msgstr "Code Calendrier"
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
@@ -288,7 +301,7 @@ msgstr "résumé"
#. module: document_ics
#: model:ir.model,name:document_ics.model_document_ics_crm_wizard
msgid "document.ics.crm.wizard"
-msgstr ""
+msgstr "document.ics.crm.wizard"
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
@@ -308,14 +321,14 @@ msgstr "Correspondance des champs"
#. module: document_ics
#: view:document.ics.crm.wizard:0
msgid "Cancel"
-msgstr ""
+msgstr "Annuler"
#. module: document_ics
#: field:document.ics.crm.wizard,opportunity:0
msgid "Business Opportunities"
-msgstr ""
+msgstr "Opportunités d'affaire"
#. module: document_ics
#: selection:document.directory.ics.fields,name:0
msgid "dtstamp"
-msgstr ""
+msgstr "dtstamp"
diff --git a/addons/event_project/i18n/fr.po b/addons/event_project/i18n/fr.po
index 356357e877b..1e87919bf74 100644
--- a/addons/event_project/i18n/fr.po
+++ b/addons/event_project/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-09-08 16:09+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2010-05-21 21:05+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:18+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: event_project
@@ -24,7 +24,7 @@ msgstr "XML non valide pour l'architecture de la vue"
#. module: event_project
#: model:ir.actions.wizard,name:event_project.wizard_event_task
msgid "Tasks"
-msgstr ""
+msgstr "Tâches"
#. module: event_project
#: wizard_button:event.project,init,done:0
@@ -39,6 +39,10 @@ msgid ""
" This module allow you to create retro planning for managing your "
"events.\n"
msgstr ""
+"Organisation et gestion des évènements.\n"
+"\n"
+" Ce module vous autorise à créer un rétro-planning pour gérer vos "
+"évènements.\n"
#. module: event_project
#: view:event.event:0
@@ -48,7 +52,7 @@ msgstr "Tâches Restantes"
#. module: event_project
#: model:ir.module.module,shortdesc:event_project.module_meta_information
msgid "Event - Project"
-msgstr ""
+msgstr "Évènement - Projet"
#. module: event_project
#: field:event.event,project_id:0
diff --git a/addons/hr/i18n/pl.po b/addons/hr/i18n/pl.po
index 11884c53d2f..35ec30cc260 100644
--- a/addons/hr/i18n/pl.po
+++ b/addons/hr/i18n/pl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-05-12 20:04+0000\n"
+"PO-Revision-Date: 2010-05-21 19:41+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-05-13 04:36+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr
@@ -42,7 +42,7 @@ msgstr ""
#: model:ir.module.module,shortdesc:hr.module_meta_information
#: model:ir.ui.menu,name:hr.menu_hr_root
msgid "Human Resources"
-msgstr "Zasoby ludzkie"
+msgstr "Zasoby kadrowe"
#. module: hr
#: selection:hr.timesheet,dayofweek:0
@@ -263,7 +263,7 @@ msgstr ""
#. module: hr
#: field:hr.employee,user_id:0
msgid "Related User"
-msgstr ""
+msgstr "Powiązany użytkownik"
#. module: hr
#: field:hr.employee,category_id:0
diff --git a/addons/l10n_fr/i18n/fr.po b/addons/l10n_fr/i18n/fr.po
index f70b913fd88..1e9727d4785 100644
--- a/addons/l10n_fr/i18n/fr.po
+++ b/addons/l10n_fr/i18n/fr.po
@@ -7,34 +7,34 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-07-27 16:34+0000\n"
-"Last-Translator: Christian Draux - reseaucerta.org \n"
+"PO-Revision-Date: 2010-05-21 17:47+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:04+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Redevances de crédit-bail immobilier"
-msgstr ""
+msgstr "Redevances de crédit-bail immobilier"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "période du"
-msgstr ""
+msgstr "période du"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Autres réserves"
-msgstr ""
+msgstr "Autres réserves"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "ACTIF IMMOBILISÉ"
-msgstr ""
+msgstr "ACTIF IMMOBILISÉ"
#. module: l10n_fr
#: model:ir.actions.todo,note:l10n_fr.config_call_account_template_fr_pcg
@@ -58,23 +58,23 @@ msgstr ""
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Capital [dont versé...]"
-msgstr ""
+msgstr "Capital [dont versé...]"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Réserves statutaires ou contractuelles"
-msgstr ""
+msgstr "Réserves statutaires ou contractuelles"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "nstallations techniques,matériel et outillage"
-msgstr ""
+msgstr "installations techniques,matériel et outillage"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
#: rml:l10n.fr.cdr:0
msgid "TOTAL III"
-msgstr ""
+msgstr "TOTAL III"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_asset
@@ -89,12 +89,12 @@ msgstr "Produits"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Charges sociales"
-msgstr ""
+msgstr "Charges sociales"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "PRODUITS EXCEPTIONNELS"
-msgstr ""
+msgstr "PRODUITS EXCEPTIONNELS"
#. module: l10n_fr
#: wizard_view:l10n.fr.bilan.report,init:0
@@ -104,18 +104,18 @@ msgstr "Sélectionner l'année"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Différences négatives de change"
-msgstr ""
+msgstr "Différences négatives de change"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Autres charges"
-msgstr ""
+msgstr "Autres charges"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
#: rml:l10n.fr.cdr:0
msgid "Tenue de Compte :"
-msgstr ""
+msgstr "Tenue de Compte :"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_payable
@@ -125,72 +125,72 @@ msgstr "À payer"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "( IV )"
-msgstr ""
+msgstr "( IV )"
#. module: l10n_fr
#: model:account.fiscal.position.template,name:l10n_fr.fiscal_position_template_4
msgid "Hors Euro"
-msgstr ""
+msgstr "Hors Euro"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Fonds commercial"
-msgstr ""
+msgstr "Fonds commercial"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "isponibilités"
-msgstr ""
+msgstr "Disponibilités"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "+ IV+ V+ VI"
-msgstr ""
+msgstr "+ IV+ V+ VI"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "De participation"
-msgstr ""
+msgstr "De participation"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "TOTAL IV"
-msgstr ""
+msgstr "TOTAL IV"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "D"
-msgstr ""
+msgstr "D"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "PROVISIONS"
-msgstr ""
+msgstr "PROVISIONS"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "vances et acomptes"
-msgstr ""
+msgstr "Avances et acomptes"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Autres dettes"
-msgstr ""
+msgstr "Autres dettes"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "articipations"
-msgstr ""
+msgstr "Participations"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "atières premières et autres approvisionnements"
-msgstr ""
+msgstr "Matières premières et autres approvisionnements"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "P"
-msgstr ""
+msgstr "P"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_stocks
@@ -200,17 +200,17 @@ msgstr "Actif circulant"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "T"
-msgstr ""
+msgstr "T"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Dettes fournisseurs et comptes rattachés"
-msgstr ""
+msgstr "Dettes fournisseurs et comptes rattachés"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Provisions pour charges"
-msgstr ""
+msgstr "Provisions pour charges"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_dettes
@@ -225,12 +225,12 @@ msgstr "Sélectionner une période"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "RÉSERVES"
-msgstr ""
+msgstr "RÉSERVES"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "TOTAL GÉNÉRAL (I + II + III + IV)"
-msgstr ""
+msgstr "TOTAL GÉNÉRAL (I + II + III + IV)"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_tax
@@ -240,74 +240,74 @@ msgstr "Taxe"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Dotations aux amortissements, aux dépréciations et aux provisions"
-msgstr ""
+msgstr "Dotations aux amortissements, aux dépréciations et aux provisions"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Achats de matières premières et autres approvisionnements"
-msgstr ""
+msgstr "Achats de matières premières et autres approvisionnements"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Avances et acomptes reçus sur commandes en cours"
-msgstr ""
+msgstr "Avances et acomptes reçus sur commandes en cours"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Quotes-parts de résultat sur opérations faites en commun (II)"
-msgstr ""
+msgstr "Quotes-parts de résultat sur opérations faites en commun (II)"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "VALEURS MOBILIÈRES DE PLACEMENT"
-msgstr ""
+msgstr "VALEURS MOBILIÈRES DE PLACEMENT"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
#: rml:l10n.fr.cdr:0
msgid "TOTAL I"
-msgstr ""
+msgstr "TOTAL I"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Autres intérêts et produits assimilés"
-msgstr ""
+msgstr "Autres intérêts et produits assimilés"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Dettes sur immobilisations et comptes rattachés"
-msgstr ""
+msgstr "Dettes sur immobilisations et comptes rattachés"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Créances clients et comptes rattachés"
-msgstr ""
+msgstr "Créances clients et comptes rattachés"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Report à nouveau"
-msgstr ""
+msgstr "Report à nouveau"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "IMMOBILISATIONS INCORPORELLES"
-msgstr ""
+msgstr "IMMOBILISATIONS INCORPORELLES"
#. module: l10n_fr
#: model:account.fiscal.position.template,name:l10n_fr.fiscal_position_template_1
#: model:account.fiscal.position.template,name:l10n_fr.fiscal_position_template_5
msgid "France"
-msgstr ""
+msgstr "France"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "rêts"
-msgstr ""
+msgstr "Prêts"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Sous-total A - Montant net du chiffre d'affaires"
-msgstr ""
+msgstr "Sous-total A - Montant net du chiffre d'affaires"
#. module: l10n_fr
#: wizard_button:l10n.fr.bilan.report,init,report:0
@@ -318,32 +318,32 @@ msgstr "Imprimer"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Amortissements et dépréciations"
-msgstr ""
+msgstr "Amortissements et dépréciations"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Net"
-msgstr ""
+msgstr "Net"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "TOTAL I ( A + B )"
-msgstr ""
+msgstr "TOTAL I ( A + B )"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "itres immobilisés de l'activité de portefeuille"
-msgstr ""
+msgstr "Titres immobilisés de l'activité de portefeuille"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "( VI )"
-msgstr ""
+msgstr "( VI )"
#. module: l10n_fr
#: constraint:account.account.template:0
msgid "Error ! You can not create recursive account templates."
-msgstr ""
+msgstr "Erreur ! Vous ne pouvez pas créer de modèles de compte récursifs"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_provision
@@ -353,7 +353,7 @@ msgstr "Provisions"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Variation des stocks"
-msgstr ""
+msgstr "Variation des stocks"
#. module: l10n_fr
#: model:ir.actions.report.xml,name:l10n_fr.l10n_fr_pcg_bilan
@@ -365,22 +365,22 @@ msgstr "Bilan"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Emprunts obligataires convertibles"
-msgstr ""
+msgstr "Emprunts obligataires convertibles"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "TOTAL ACTIF ("
-msgstr ""
+msgstr "TOTAL ACTIF ("
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "CHARGES ( hors taxes )"
-msgstr ""
+msgstr "CHARGES ( hors taxes )"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Produits nets sur cessions de valeurs mobilières de placement"
-msgstr ""
+msgstr "Produits nets sur cessions de valeurs mobilières de placement"
#. module: l10n_fr
#: field:l10n.fr.line,report_id:0
@@ -400,27 +400,27 @@ msgstr "Engagements"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Avances et acomptes"
-msgstr ""
+msgstr "Avances et acomptes"
#. module: l10n_fr
#: model:account.fiscal.position.template,name:l10n_fr.fiscal_position_template_7
msgid "TVA sur les encaissements"
-msgstr ""
+msgstr "TVA sur les encaissements"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Sous-total B"
-msgstr ""
+msgstr "Sous-total B"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "C"
-msgstr ""
+msgstr "C"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "M"
-msgstr ""
+msgstr "M"
#. module: l10n_fr
#: model:ir.module.module,description:l10n_fr.module_meta_information
@@ -433,17 +433,17 @@ msgstr ""
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Concessions, brevets, licences,..., droits et valeurs similaires"
-msgstr ""
+msgstr "Concessions, brevets, licences,..., droits et valeurs similaires"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Instruments de trésorerie"
-msgstr ""
+msgstr "Instruments de trésorerie"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Écarts de conversion passif"
-msgstr ""
+msgstr "Écarts de conversion passif"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_expense
@@ -453,37 +453,37 @@ msgstr "Charges"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "ACTIF"
-msgstr ""
+msgstr "ACTIF"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "DETTES"
-msgstr ""
+msgstr "DETTES"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Sur immobilisations : dotations aux amortissements"
-msgstr ""
+msgstr "Sur immobilisations : dotations aux amortissements"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "mmobilisations corporelles en cours"
-msgstr ""
+msgstr "Immobilisations corporelles en cours"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Autres"
-msgstr ""
+msgstr "Autres"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Dotation aux amortissements et aux dépréciations"
-msgstr ""
+msgstr "Dotation aux amortissements et aux dépréciations"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "PRODUITS D'EXPLOITATION"
-msgstr ""
+msgstr "PRODUITS D'EXPLOITATION"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
@@ -491,136 +491,138 @@ msgid ""
"Reprises sur provisions, dépréciations (et amortissements) et transferts de "
"charges"
msgstr ""
+"Reprises sur provisions, dépréciations (et amortissements) et transferts de "
+"charges"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "PRODUITS - CHARGES"
-msgstr ""
+msgstr "PRODUITS - CHARGES"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "RÉSULTAT DE L'EXERCICE [bénéfice ou perte]"
-msgstr ""
+msgstr "RÉSULTAT DE L'EXERCICE [bénéfice ou perte]"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Impôts, taxes et versements assimilés"
-msgstr ""
+msgstr "Impôts, taxes et versements assimilés"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "roduits intermédiaires et finis"
-msgstr ""
+msgstr "Produits intermédiaires et finis"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "utres"
-msgstr ""
+msgstr "Autres"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Avances et acomptes versés sur commandes"
-msgstr ""
+msgstr "Avances et acomptes versés sur commandes"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "onstructions"
-msgstr ""
+msgstr "Constructions"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Reprises sur provisions, dépréciations et transferts de charges"
-msgstr ""
+msgstr "Reprises sur provisions, dépréciations et transferts de charges"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "réances rattachées à des participations"
-msgstr ""
+msgstr "Créances rattachées à des participations"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Dotations aux provisions"
-msgstr ""
+msgstr "Dotations aux provisions"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "vous sur votre structure juridique et son fonctionnement comptable."
-msgstr ""
+msgstr "vous sur votre structure juridique et son fonctionnement comptable."
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Sur opérations en capital"
-msgstr ""
+msgstr "Sur opérations en capital"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Charges constatés d'avance"
-msgstr ""
+msgstr "Charges constatés d'avance"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "TOTAL II"
-msgstr ""
+msgstr "TOTAL II"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "CAPITAUX PROPRES"
-msgstr ""
+msgstr "CAPITAUX PROPRES"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Frais d'établissement"
-msgstr ""
+msgstr "Frais d'établissement"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Charges à répartir sur plusieurs exercices"
-msgstr ""
+msgstr "Charges à répartir sur plusieurs exercices"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Subventions d'exploitation"
-msgstr ""
+msgstr "Subventions d'exploitation"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Provisions réglementées"
-msgstr ""
+msgstr "Provisions réglementées"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "PRODUITS (hors taxes)"
-msgstr ""
+msgstr "PRODUITS (hors taxes)"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Écart d'équivalence"
-msgstr ""
+msgstr "Écart d'équivalence"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Primes d'émission, de fusion, d'apport"
-msgstr ""
+msgstr "Primes d'émission, de fusion, d'apport"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "utres titres immobilisés"
-msgstr ""
+msgstr "Autres titres immobilisés"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Réserves réglementées"
-msgstr ""
+msgstr "Réserves réglementées"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "CHARGES D'EXPLOITATION"
-msgstr ""
+msgstr "CHARGES D'EXPLOITATION"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "I + II + III + IV + V"
-msgstr ""
+msgstr "I + II + III + IV + V"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
@@ -629,11 +631,14 @@ msgid ""
"120 ou 129 (Résultat de l'exercice précédant) dans un compte de report à "
"nouveau (compte 110 ou 119) ou dans le compte 108. Renseignez"
msgstr ""
+"Attention, pour que votre bilan soit correct, vous devez solder les comptes "
+"120 ou 129 (Résultat de l'exercice précédant) dans un compte de report à "
+"nouveau (compte 110 ou 119) ou dans le compte 108. Renseignez"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Vente de marchandises"
-msgstr ""
+msgstr "Vente de marchandises"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
@@ -678,7 +683,7 @@ msgstr ""
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "apital souscrit - non appelé"
-msgstr ""
+msgstr "Capital souscrit - non appelé"
#. module: l10n_fr
#: model:ir.model,name:l10n_fr.model_l10n_fr_report
@@ -688,27 +693,27 @@ msgstr "Rapport pour l10n_fr"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Compte de résultat"
-msgstr ""
+msgstr "Compte de résultat"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "CRÉANCES"
-msgstr ""
+msgstr "CRÉANCES"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Sur opérations de gestion"
-msgstr ""
+msgstr "Sur opérations de gestion"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Redevances de crédit-bail mobilier"
-msgstr ""
+msgstr "Redevances de crédit-bail mobilier"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Primes de remboursement des emprunts"
-msgstr ""
+msgstr "Primes de remboursement des emprunts"
#. module: l10n_fr
#: field:l10n.fr.report,code:0
@@ -718,27 +723,27 @@ msgstr "Code"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Autres produits"
-msgstr ""
+msgstr "Autres produits"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Participation des salariés aux résultats"
-msgstr ""
+msgstr "Participation des salariés aux résultats"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Subventions d'investissement"
-msgstr ""
+msgstr "Subventions d'investissement"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "STOCK EN COURS"
-msgstr ""
+msgstr "STOCK EN COURS"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Autres achats et charges externes"
-msgstr ""
+msgstr "Autres achats et charges externes"
#. module: l10n_fr
#: wizard_field:l10n.fr.bilan.report,init,fiscalyear:0
@@ -749,17 +754,17 @@ msgstr "Année fiscale"
#. module: l10n_fr
#: model:account.fiscal.position.template,name:l10n_fr.fiscal_position_template_3
msgid "DOM-TOM"
-msgstr ""
+msgstr "DOM-TOM"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Intérêts et charges assimilées"
-msgstr ""
+msgstr "Intérêts et charges assimilées"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Immobilisations incorporelles en cours"
-msgstr ""
+msgstr "Immobilisations incorporelles en cours"
#. module: l10n_fr
#: wizard_button:l10n.fr.bilan.report,init,end:0
@@ -771,17 +776,17 @@ msgstr "Annuler"
#: rml:l10n.fr.bilan:0
#: rml:l10n.fr.cdr:0
msgid "au"
-msgstr ""
+msgstr "au"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Production immobilisée"
-msgstr ""
+msgstr "Production immobilisée"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Sur actif circulant : dotations aux dépréciations"
-msgstr ""
+msgstr "Sur actif circulant : dotations aux dépréciations"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_receivable
@@ -791,13 +796,13 @@ msgstr "Recevable"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Capital souscrit - appelé , non versé"
-msgstr ""
+msgstr "Capital souscrit - appelé , non versé"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
#: rml:l10n.fr.cdr:0
msgid "( V )"
-msgstr ""
+msgstr "( V )"
#. module: l10n_fr
#: constraint:ir.model:0
@@ -815,17 +820,17 @@ msgstr "Définition"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Différences positives de change"
-msgstr ""
+msgstr "Différences positives de change"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "errains"
-msgstr ""
+msgstr "Terrains"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Brut"
-msgstr ""
+msgstr "Brut"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_immobilisations
@@ -835,23 +840,23 @@ msgstr "Immobilisations"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "PASSIF"
-msgstr ""
+msgstr "PASSIF"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Écarts de réévaluation"
-msgstr ""
+msgstr "Écarts de réévaluation"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Production stockée"
-msgstr ""
+msgstr "Production stockée"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
#: rml:l10n.fr.cdr:0
msgid "Imprimé le :"
-msgstr ""
+msgstr "Imprimé le :"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_equity
@@ -861,38 +866,38 @@ msgstr "Capitaux propres"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Impôts sur les bénéfices"
-msgstr ""
+msgstr "Impôts sur les bénéfices"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "TOTAL DES PRODUITS ( I + II + III + IV )"
-msgstr ""
+msgstr "TOTAL DES PRODUITS ( I + II + III + IV )"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Salaires et traitements"
-msgstr ""
+msgstr "Salaires et traitements"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
#: rml:l10n.fr.cdr:0
msgid ")"
-msgstr ""
+msgstr ")"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Provisions pour risques"
-msgstr ""
+msgstr "Provisions pour risques"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "n-cours de production [biens et services]"
-msgstr ""
+msgstr "En-cours de production [biens et services]"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Sur immobilisations : dotations aux dépréciations"
-msgstr ""
+msgstr "Sur immobilisations : dotations aux dépréciations"
#. module: l10n_fr
#: field:l10n.fr.line,code:0
@@ -902,7 +907,7 @@ msgstr "Nom de la variable"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "TOTAL CHARGES ( I + II + III"
-msgstr ""
+msgstr "TOTAL CHARGES ( I + II + III"
#. module: l10n_fr
#: model:ir.actions.report.xml,name:l10n_fr.l10n_fr_pcg_cdr
@@ -918,17 +923,17 @@ msgstr "Lignes de rapport pour l10n_fr"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "A"
-msgstr ""
+msgstr "A"
#. module: l10n_fr
#: model:account.fiscal.position.template,name:l10n_fr.fiscal_position_template_2
msgid "Zone Euro"
-msgstr ""
+msgstr "Zone Euro"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "E"
-msgstr ""
+msgstr "E"
#. module: l10n_fr
#: field:l10n.fr.line,name:0
@@ -939,7 +944,7 @@ msgstr "Nom"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "I"
-msgstr ""
+msgstr "I"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_stock
@@ -964,27 +969,27 @@ msgstr "Comptes spéciaux"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Emprunts et dettes financières diverses"
-msgstr ""
+msgstr "Emprunts et dettes financières diverses"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Produits constatés d'avance"
-msgstr ""
+msgstr "Produits constatés d'avance"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Charges nettes sur cessions de valeurs mobilières de placement"
-msgstr ""
+msgstr "Charges nettes sur cessions de valeurs mobilières de placement"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "archandises"
-msgstr ""
+msgstr "Marchandises"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Emprunts et dettes auprès des établissements de crédit"
-msgstr ""
+msgstr "Emprunts et dettes auprès des établissements de crédit"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_view
@@ -994,47 +999,47 @@ msgstr "Vue"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "CHARGES FINANCIÈRES"
-msgstr ""
+msgstr "CHARGES FINANCIÈRES"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Quotes-parts de résultat sur opérations faites en commun ( II )"
-msgstr ""
+msgstr "Quotes-parts de résultat sur opérations faites en commun ( II )"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "IMMOBILISATIONS CORPORELLES"
-msgstr ""
+msgstr "IMMOBILISATIONS CORPORELLES"
#. module: l10n_fr
#: model:account.fiscal.position.template,name:l10n_fr.fiscal_position_template_6
msgid "TVA sur le débits"
-msgstr ""
+msgstr "TVA sur le débits"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "Achat de marchandises"
-msgstr ""
+msgstr "Achat de marchandises"
#. module: l10n_fr
#: model:ir.module.module,shortdesc:l10n_fr.module_meta_information
msgid "France - Plan Comptable Général"
-msgstr ""
+msgstr "France - Plan Comptable Général"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Écarts de conversion actif"
-msgstr ""
+msgstr "Écarts de conversion actif"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Autres emprunts obligataires"
-msgstr ""
+msgstr "Autres emprunts obligataires"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Réserve légale"
-msgstr ""
+msgstr "Réserve légale"
#. module: l10n_fr
#: model:account.account.type,name:l10n_fr.account_type_cloture
@@ -1044,14 +1049,14 @@ msgstr "Cloture"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "IMMOBILISATIONS FINANCIÉRES"
-msgstr ""
+msgstr "IMMOBILISATIONS FINANCIÉRES"
#. module: l10n_fr
#: rml:l10n.fr.cdr:0
msgid "CHARGES EXCEPTIONNELLES"
-msgstr ""
+msgstr "CHARGES EXCEPTIONNELLES"
#. module: l10n_fr
#: rml:l10n.fr.bilan:0
msgid "Dettes fiscales et sociales"
-msgstr ""
+msgstr "Dettes fiscales et sociales"
diff --git a/addons/mrp/i18n/fr.po b/addons/mrp/i18n/fr.po
index 34e0d2ef7aa..5db458c1c57 100644
--- a/addons/mrp/i18n/fr.po
+++ b/addons/mrp/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.1\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-03-30 14:06+0000\n"
-"Last-Translator: TeMPO \n"
+"PO-Revision-Date: 2010-05-21 21:09+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 03:57+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp
@@ -388,7 +388,7 @@ msgstr "Processus des Approvisionnements"
#. module: mrp
#: field:mrp.production,date_planned_date:0
msgid "Scheduled Date"
-msgstr ""
+msgstr "Date planifiée"
#. module: mrp
#: selection:mrp.procurement,priority:0
@@ -1179,7 +1179,7 @@ msgstr "Approvisionnement"
#. module: mrp
#: model:ir.actions.wizard,name:mrp.product_procurement_wizard
msgid "Procurement Request"
-msgstr ""
+msgstr "Demande d'approvisionnement"
#. module: mrp
#: model:ir.actions.wizard,name:mrp.wizard_price
@@ -1680,7 +1680,7 @@ msgstr "Arrondi de produit"
#. module: mrp
#: field:mrp.production.workcenter.line,name:0
msgid "Work Order"
-msgstr ""
+msgstr "Ordre de fabrication"
#. module: mrp
#: view:mrp.production:0
@@ -1995,7 +1995,7 @@ msgstr ""
#. module: mrp
#: field:mrp.production,date_planned_end:0
msgid "Scheduled End"
-msgstr ""
+msgstr "Planification terminée"
#. module: mrp
#: selection:mrp.bom,method:0
diff --git a/addons/mrp/i18n/pl.po b/addons/mrp/i18n/pl.po
index 59e69651b19..130d6a803dc 100644
--- a/addons/mrp/i18n/pl.po
+++ b/addons/mrp/i18n/pl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 07:35+0000\n"
-"Last-Translator: Piotr Strębski \n"
+"PO-Revision-Date: 2010-05-21 08:19+0000\n"
+"Last-Translator: Grzegorz Grzelak (Cirrus.pl) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 03:58+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp
@@ -105,7 +105,7 @@ msgstr "Konfiguracja"
#. module: mrp
#: field:mrp.production,name:0
msgid "Reference"
-msgstr "Odnośnik"
+msgstr "Numer"
#. module: mrp
#: view:mrp.production:0
diff --git a/addons/multi_company/i18n/fr.po b/addons/multi_company/i18n/fr.po
index 0f63c32dd30..535e5a56cf0 100644
--- a/addons/multi_company/i18n/fr.po
+++ b/addons/multi_company/i18n/fr.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-12-08 11:46+0000\n"
-"PO-Revision-Date: 2010-05-20 14:21+0000\n"
+"PO-Revision-Date: 2010-05-21 10:24+0000\n"
"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: French \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-05-21 03:38+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
@@ -87,27 +87,27 @@ msgstr ""
#. module: multi_company
#: field:multi_company.default,company_id:0
msgid "Main Company"
-msgstr ""
+msgstr "Société Principale"
#. module: multi_company
#: view:multi_company.default:0
msgid "Condition"
-msgstr ""
+msgstr "Condition"
#. module: multi_company
#: help:multi_company.default,company_dest_id:0
msgid "Company to store the current record"
-msgstr ""
+msgstr "Société physique ou sera stocké cet enregistrement"
#. module: multi_company
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
-msgstr ""
+msgstr "XML non valide pour l'architecture de la vue !"
#. module: multi_company
#: field:multi_company.default,name:0
msgid "Name"
-msgstr ""
+msgstr "Nom"
#. module: multi_company
#: constraint:product.template:0
@@ -117,80 +117,80 @@ msgstr ""
#. module: multi_company
#: model:product.category,name:multi_company.Odoo1
msgid "Odoo Offers"
-msgstr ""
+msgstr "Offre Odoo"
#. module: multi_company
#: constraint:res.company:0
msgid "Error! You can not create recursive companies."
-msgstr ""
+msgstr "Erreur ! Vous ne pouvez pas créer de sociétés récursives"
#. module: multi_company
#: help:multi_company.default,name:0
msgid "Name it to easily find a record"
-msgstr ""
+msgstr "Nommer le facilement pour trouver l'enregistrement"
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_custom_multicompany
msgid "Multi company"
-msgstr ""
+msgstr "Multi société"
#. module: multi_company
#: model:ir.model,name:multi_company.model_multi_company_default
msgid "multi_company.default"
-msgstr ""
+msgstr "multi_company.default"
#. module: multi_company
#: help:multi_company.default,company_id:0
msgid "Company where the user is connected"
-msgstr ""
+msgstr "Société ou l'utilisateur sera connecté"
#. module: multi_company
#: model:ir.actions.act_window,name:multi_company.action_inventory_form
msgid "Default Company per Object"
-msgstr ""
+msgstr "Société par défaut par objet"
#. module: multi_company
#: field:multi_company.default,expression:0
msgid "Expression"
-msgstr ""
+msgstr "Expression"
#. module: multi_company
#: model:product.template,name:multi_company.product_product_odoo1_product_template
msgid "Odoo Offer"
-msgstr ""
+msgstr "Offre Odoo"
#. module: multi_company
#: field:multi_company.default,sequence:0
msgid "Sequence"
-msgstr ""
+msgstr "Séquence"
#. module: multi_company
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
-msgstr ""
+msgstr "Erreur ! Vous ne pouvez pas créer de catégories récursives"
#. module: multi_company
#: constraint:product.product:0
msgid "Error: Invalid ean code"
-msgstr ""
+msgstr "Erreur: code EAN non valide"
#. module: multi_company
#: help:multi_company.default,expression:0
msgid "Expression, must be True to match"
-msgstr ""
+msgstr "Expression, doit être Vrai pour correspondre"
#. module: multi_company
#: model:ir.ui.menu,name:multi_company.menu_action_inventory_form
msgid "Default company per Object"
-msgstr ""
+msgstr "Société par défaut par Objet"
#. module: multi_company
#: code:addons/multi_company/multi_company.py:0
#, python-format
msgid " (copy)"
-msgstr ""
+msgstr " (copie)"
#. module: multi_company
#: view:multi_company.default:0
msgid "Matching"
-msgstr ""
+msgstr "Correspondance"
diff --git a/addons/olap/i18n/fr.po b/addons/olap/i18n/fr.po
new file mode 100644
index 00000000000..e9c187a4eda
--- /dev/null
+++ b/addons/olap/i18n/fr.po
@@ -0,0 +1,1402 @@
+# French translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-26 05:24+0000\n"
+"PO-Revision-Date: 2010-05-21 14:51+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: olap
+#: view:olap.database.columns:0
+#: view:olap.database.tables:0
+msgid "Hide"
+msgstr "Masquer"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_saved_query_form
+#: model:ir.ui.menu,name:olap.menu_action_olap_saved_query_form
+#: view:olap.saved.query:0
+msgid "Olap Saved Query"
+msgstr ""
+
+#. module: olap
+#: field:olap.query.logs,time:0
+#: field:olap.saved.query,time:0
+msgid "Time"
+msgstr "Temps"
+
+#. module: olap
+#: view:bi.auto.configure.wizard:0
+msgid "Auto Configure Structure"
+msgstr ""
+
+#. module: olap
+#: view:olap.fact.database:0
+msgid "Olap fact database"
+msgstr ""
+
+#. module: olap
+#: help:olap.measure,value_sql:0
+msgid ""
+"You can provide valid sql expression. Make sure it have function with fully "
+"qualified column name like (sum,avg ...)(tablename.columnname (+,- ...) "
+"tablename.columnname)"
+msgstr ""
+
+#. module: olap
+#: field:olap.cube.table,schema_id:0
+msgid "Schema id"
+msgstr ""
+
+#. module: olap
+#: field:olap.schema,database_id:0
+msgid "Database Connection"
+msgstr "Connexion à une base de données"
+
+#. module: olap
+#: selection:olap.fact.database,type:0
+msgid "MySQL"
+msgstr "MySQL"
+
+#. module: olap
+#: field:olap.fact.database,db_password:0
+msgid "Database password"
+msgstr "Mot de passe de la base de données"
+
+#. module: olap
+#: view:olap.database.tables:0
+msgid "Olap database tables"
+msgstr ""
+
+#. module: olap
+#: view:olap.fact.database:0
+msgid "Connection url"
+msgstr "URL de connexion"
+
+#. module: olap
+#: view:olap.application.table:0
+msgid "Olap Application Table"
+msgstr ""
+
+#. module: olap
+#: field:olap.parameters.config.wizard,host_name:0
+msgid "Server Name"
+msgstr "Nom du serveur"
+
+#. module: olap
+#: help:olap.fact.database,db_password:0
+msgid "Password for the login."
+msgstr "Mot de passe pour le login"
+
+#. module: olap
+#: field:olap.application.field,application_id:0
+#: field:olap.application.table,application_id:0
+msgid "Application Id"
+msgstr "ID de l'application"
+
+#. module: olap
+#: model:ir.actions.todo,note:olap.config_auto_directory
+msgid "This wizard will configure the URL of the web client"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_view_olap_fact_database_form
+#: model:ir.ui.menu,name:olap.menu_bi_conf_fact
+msgid "Fact Databases"
+msgstr ""
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_browser_url
+msgid "Cube Browser"
+msgstr "Explorer le Cube"
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_action_olap_dimension_form
+msgid "Olap Dimension"
+msgstr "Dimension du cube Olap"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_database_columns
+msgid "Olap Database Columns"
+msgstr ""
+
+#. module: olap
+#: view:olap.parameters.config.wizard:0
+msgid "BI Web Client."
+msgstr ""
+
+#. module: olap
+#: help:olap.fact.database,db_port:0
+msgid " Port to be used in connection"
+msgstr " Port utilisé par la connexion"
+
+#. module: olap
+#: field:olap.database.columns,primary_key:0
+msgid "Primary Key"
+msgstr "Clé primaire"
+
+#. module: olap
+#: field:olap.database.columns,table_id:0
+msgid "Table Id"
+msgstr "ID de la table"
+
+#. module: olap
+#: view:olap.parameters.config.wizard:0
+msgid "This wizard will automatically configure the web client for BI."
+msgstr "Cet assistant configurera automatiquement le client Web pour la BI"
+
+#. module: olap
+#: field:olap.fact.database,type:0
+msgid "Database type"
+msgstr "Type de base de données"
+
+#. module: olap
+#: wizard_view:olap.query_builder,back:0
+#: wizard_view:olap.query_builder,init:0
+msgid "Cube Fetcher"
+msgstr ""
+
+#. module: olap
+#: wizard_view:olap.load.table,info:0
+#: wizard_view:olap.load.table,ok:0
+msgid "Your database structure has been correctly loaded"
+msgstr ""
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_parameters_config_wizard
+msgid "Olap Server Parameters"
+msgstr "Paramètres du serveur Olap"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_cube_table_form
+msgid "Olap Cube Tables"
+msgstr ""
+
+#. module: olap
+#: field:olap.measure,formatstring:0
+msgid "Format string"
+msgstr "Foramtage de chaîne"
+
+#. module: olap
+#: wizard_button:olap.query_builder,exec,exec:0
+#: wizard_button:olap.query_builder,ok,exec:0
+msgid "Execute"
+msgstr "Exécuter"
+
+#. module: olap
+#: wizard_button:olap.application.configuration,configure,end:0
+#: wizard_button:olap.fact.database.test_connection,init,end:0
+#: wizard_button:olap.load.table,info,end:0
+#: wizard_button:olap.query.logs.clear,info,end:0
+#: wizard_button:olap.query.logs.clear,ok,end:0
+#: view:olap.warehouse.wizard:0
+msgid "Ok"
+msgstr "Ok"
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_bi_conf_known_application
+msgid "Known Application"
+msgstr "Application connue"
+
+#. module: olap
+#: wizard_field:olap.query_builder,exec,level:0
+#: wizard_field:olap.query_builder,ok,level:0
+msgid "Level"
+msgstr "Niveau"
+
+#. module: olap
+#: field:olap.level,column_id_name:0
+#: field:olap.measure,value_column_id_name:0
+msgid "Column ID"
+msgstr "ID de la colonne"
+
+#. module: olap
+#: view:bi.load.db.wizard:0
+msgid ""
+"We will load the complete structure of the database by introspection, so "
+"that you will be able to work on it, and specify a better structure "
+"according to your reporting needs."
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_view_olap_application_form
+msgid "Olap Applicatiion"
+msgstr "Application Olap"
+
+#. module: olap
+#: field:olap.saved.query,name:0
+msgid "Query Name"
+msgstr "Nom de la requête"
+
+#. module: olap
+#: wizard_field:olap.query_builder,exec,mdx_query:0
+#: wizard_field:olap.query_builder,ok,mdx_query:0
+msgid "MDX Query"
+msgstr "Requête MDX"
+
+#. module: olap
+#: model:ir.model,name:olap.model_bi_auto_configure_wizard
+msgid "bi.auto.configure.wizard"
+msgstr "bi.auto.configure.wizard"
+
+#. module: olap
+#: field:olap.hierarchy,primary_key:0
+msgid "Primary key"
+msgstr "Clé primaire"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.act_bi_auto_configure
+msgid "Auto Configuration"
+msgstr "Configuration automatique"
+
+#. module: olap
+#: field:olap.schema,note:0
+msgid "Schema description"
+msgstr "Description du schéma"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.act_bi_load_db_wizard
+msgid "Load database Structure"
+msgstr "Chargement de la structure de base de données"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_level
+#: view:olap.level:0
+msgid "Olap level"
+msgstr "Niveau Olap"
+
+#. module: olap
+#: selection:olap.measure,formatstring:0
+msgid "None (0000.00)"
+msgstr "Aucun (0000.00)"
+
+#. module: olap
+#: field:olap.fact.database,db_host:0
+msgid "Database host"
+msgstr "Nom d'hôte de la base de données"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_fact_database
+msgid "Olap Fact Database"
+msgstr ""
+
+#. module: olap
+#: view:bi.auto.configure.wizard:0
+msgid "Auto Congifuring Tables"
+msgstr "Configuration automatique des tables"
+
+#. module: olap
+#: field:olap.application,name:0
+msgid "Application name"
+msgstr "Nom de l'application"
+
+#. module: olap
+#: field:olap.cube.table,column_link_id:0
+msgid "Relational Column"
+msgstr "Colonne relationnelle"
+
+#. module: olap
+#: field:olap.level,type:0
+msgid "Level class"
+msgstr ""
+
+#. module: olap
+#: field:olap.cube,name:0
+msgid "Cube name"
+msgstr "Nom du cube"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_view_olap_application_table_form
+msgid "Olap Applicatiion Table"
+msgstr ""
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_saved_query
+msgid "olap.saved.query"
+msgstr "olap.saved.query"
+
+#. module: olap
+#: field:olap.level,column_name:0
+msgid "Columns Name"
+msgstr "Nom des colonnes"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_hierarchy_form
+msgid "Olap Hierarchies"
+msgstr "Hiérarchies Olap"
+
+#. module: olap
+#: field:olap.schema,ready:0
+msgid "Ready"
+msgstr "Prêt"
+
+#. module: olap
+#: selection:olap.measure,measure_type:0
+#: field:olap.measure,value_column:0
+msgid "Fact Table Column"
+msgstr ""
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_view_olap_database_tables_form
+#: field:olap.application,table_ids:0
+#: view:olap.fact.database:0
+#: field:olap.fact.database,table_ids:0
+msgid "Tables"
+msgstr "Tables"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_application
+msgid "Olap application"
+msgstr "Application Olap"
+
+#. module: olap
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Nom de modèle invalide pour la définition de l'action"
+
+#. module: olap
+#: selection:olap.schema,state:0
+msgid "Schema is ready to use"
+msgstr "Le schéma est prêt a être utilisé"
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_designer_url
+msgid "Cube Designer"
+msgstr "Cube Designer"
+
+#. module: olap
+#: field:olap.fact.database,db_login:0
+msgid "Database login"
+msgstr "Connexion à la base de données"
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_view_olap_application_table_form
+msgid "Application Table"
+msgstr ""
+
+#. module: olap
+#: wizard_view:olap.query.logs.clear,info:0
+#: wizard_view:olap.query.logs.clear,ok:0
+msgid "Logs Cleared successfully"
+msgstr "Les fichiers journaux ont été effacés avec succès"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_schema
+#: model:ir.ui.menu,name:olap.menu_action_olap_schema_form
+#: view:olap.schema:0
+msgid "Olap Schema"
+msgstr "Schéma Olap"
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_view_olap_application_form
+msgid "Application"
+msgstr "Application"
+
+#. module: olap
+#: wizard_field:olap.query_builder,exec,mdx_query_output:0
+#: wizard_field:olap.query_builder,ok,mdx_query_output:0
+msgid "MDX Query Output"
+msgstr "Requête MDX en sortie"
+
+#. module: olap
+#: field:olap.hierarchy,primary_key_table:0
+msgid "Primary key table"
+msgstr "Table de la clé primaire"
+
+#. module: olap
+#: help:olap.measure,table_name:0
+msgid ""
+"The name of the table on which the column is defined. If False, take the "
+"table from the cube."
+msgstr ""
+
+#. module: olap
+#: view:olap.warehouse.wizard:0
+msgid "Warehouse"
+msgstr "Entrepôt"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_dimension_form
+msgid "Olap Dimensions"
+msgstr "Dimensions Olap"
+
+#. module: olap
+#: field:olap.query.logs,user_id:0
+msgid "Tiny ERP User"
+msgstr "Utilisateur Tiny ERP"
+
+#. module: olap
+#: model:ir.actions.wizard,name:olap.bi_application_configuration
+msgid "Configure from Application"
+msgstr ""
+
+#. module: olap
+#: field:olap.fact.database,db_port:0
+msgid "Database port"
+msgstr "Port de connexion à la base"
+
+#. module: olap
+#: help:olap.parameters.config.wizard,host_port:0
+msgid ""
+"Put the port for the server. Put 8080 if its not clear."
+msgstr ""
+"Mettre le port du server. Mettre 8080 if ce n'est pas clair pour vous"
+
+#. module: olap
+#: selection:olap.schema,state:0
+msgid "The Structure is Loaded"
+msgstr "La structure est chargée"
+
+#. module: olap
+#: field:olap.dimension,cube_id:0
+#: field:olap.measure,cube_id:0
+#: field:olap.query.logs,cube_id:0
+#: field:olap.saved.query,cube_id:0
+msgid "Cube"
+msgstr "Cube"
+
+#. module: olap
+#: field:olap.cube.table,available_table_ids:0
+msgid "Available Tables"
+msgstr "Tables disponibles"
+
+#. module: olap
+#: view:olap.schema:0
+msgid "Configure Manually"
+msgstr "Coonfigurer manuellement"
+
+#. module: olap
+#: field:olap.database.columns,related_to:0
+msgid "Related To"
+msgstr "Lié à"
+
+#. module: olap
+#: view:olap.database.columns:0
+#: view:olap.database.tables:0
+msgid "Olap database columns"
+msgstr "Colonne Olap dans la base de données"
+
+#. module: olap
+#: field:olap.cube.table.line,field_id:0
+msgid "Link Field"
+msgstr "Lien du champ"
+
+#. module: olap
+#: view:olap.schema:0
+msgid "Mark as Configured"
+msgstr ""
+
+#. module: olap
+#: view:olap.application.field:0
+msgid "Olap Application Field"
+msgstr ""
+
+#. module: olap
+#: selection:olap.measure,formatstring:0
+msgid "Comma Seperator (0,000)"
+msgstr "Séparateur décimal (0,000)"
+
+#. module: olap
+#: field:olap.measure,agregator:0
+msgid "Agregator"
+msgstr "Agregateur"
+
+#. module: olap
+#: wizard_view:olap.application.configuration,configure:0
+msgid "Your database structure (Open ERP) has been sucessfully configured."
+msgstr ""
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_bi_configuration
+msgid "Configuration"
+msgstr "Configuration"
+
+#. module: olap
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML non valide pour l'architecture de la vue !"
+
+#. module: olap
+#: help:olap.parameters.config.wizard,host_name:0
+msgid ""
+"Put here the server address or IP Put localhost if its not "
+"clear."
+msgstr ""
+
+#. module: olap
+#: view:olap.database.tables:0
+msgid "Database tables"
+msgstr ""
+
+#. module: olap
+#: view:olap.schema:0
+msgid "Reload Structure"
+msgstr "Recharger la structure"
+
+#. module: olap
+#: wizard_view:olap.application.configuration,init:0
+msgid "This will Auto Configure Application"
+msgstr ""
+
+#. module: olap
+#: view:bi.load.db.wizard:0
+msgid "Load Data Structure"
+msgstr "Charger la structure de données"
+
+#. module: olap
+#: view:bi.auto.configure.wizard:0
+#: view:bi.load.db.wizard:0
+#: wizard_button:olap.application.configuration,init,end:0
+#: wizard_button:olap.load.table,init,end:0
+#: view:olap.parameters.config.wizard:0
+#: wizard_button:olap.query.logs.clear,init,end:0
+#: wizard_button:olap.query_builder,exec,end:0
+#: wizard_button:olap.query_builder,ok,end:0
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: olap
+#: view:bi.load.db.wizard:0
+msgid ""
+"After having loaded the structure, you will be able to hide/show or rename "
+"tables and columns to simplify end-users interface. The following database "
+"will be loaded:"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_level_form
+#: model:ir.ui.menu,name:olap.menu_action_olap_level_form
+#: view:olap.level:0
+msgid "Olap Level"
+msgstr "Niveau Olap"
+
+#. module: olap
+#: field:olap.fact.database,loaded:0
+msgid "Loaded"
+msgstr "Chargé"
+
+#. module: olap
+#: help:olap.fact.database,db_name:0
+msgid "Name of the database to be used for analysis."
+msgstr "Nom de la base de données pour l'analyse."
+
+#. module: olap
+#: help:olap.fact.database,db_login:0
+msgid "Login for the database name specified."
+msgstr ""
+
+#. module: olap
+#: field:olap.hierarchy,dimension_id:0
+#: wizard_field:olap.query_builder,exec,dimension:0
+#: wizard_field:olap.query_builder,ok,dimension:0
+msgid "Dimension"
+msgstr "Dimension"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_application_table
+msgid "Olap application table"
+msgstr ""
+
+#. module: olap
+#: wizard_view:olap.load.table,init:0
+msgid ""
+"We will load the complete structure of the database by introspection, "
+"so that you will be able to work on it, and specify a better structure "
+"according to your reporting needs."
+msgstr ""
+
+#. module: olap
+#: field:olap.saved.query,axis_keys:0
+msgid "Axis Keys"
+msgstr "Axe clé"
+
+#. module: olap
+#: field:olap.cube,query_log:0
+msgid "Query Logging"
+msgstr "Enregistrer les requêtes"
+
+#. module: olap
+#: field:olap.measure,measure_type:0
+msgid "Measure Type"
+msgstr "Type de mesure"
+
+#. module: olap
+#: field:olap.database.tables,fact_database_id:0
+msgid "Database Id"
+msgstr "ID de la base de données"
+
+#. module: olap
+#: help:olap.fact.database,db_host:0
+msgid "Give hostname to make connection to the database."
+msgstr ""
+
+#. module: olap
+#: field:olap.level,hierarchy_id:0
+msgid "Hierarchy"
+msgstr "Hiérarchie"
+
+#. module: olap
+#: selection:olap.schema,state:0
+msgid "The Structure is Configured."
+msgstr "La structure est configurée"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_schema_form
+msgid "Olap Schemas"
+msgstr "Schéma Olap"
+
+#. module: olap
+#: field:olap.cube,table_id:0
+msgid "Fact table"
+msgstr ""
+
+#. module: olap
+#: view:bi.auto.configure.wizard:0
+msgid ""
+"This will Auto Configure Application. This will help to increase the "
+"readability of the tables and columns by giving it meaningful and easy to "
+"comprehend name. You can hides particular data and columns by reconfiguring "
+"the structure option."
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_view_olap_application_field_form
+msgid "Olap Applicatiion Field"
+msgstr ""
+
+#. module: olap
+#: field:olap.query.logs,query:0
+#: field:olap.saved.query,query:0
+#: view:olap.warehouse.wizard:0
+#: field:olap.warehouse.wizard,query:0
+msgid "Query"
+msgstr "Requête"
+
+#. module: olap
+#: view:olap.schema:0
+msgid "Auto Application Configuration"
+msgstr ""
+
+#. module: olap
+#: selection:olap.measure,formatstring:0
+msgid "Postfix Default Currency(0000.00 EUR)"
+msgstr ""
+
+#. module: olap
+#: field:bi.load.db.wizard,db_name:0
+#: wizard_field:olap.load.table,init,db_name:0
+msgid "Database Name"
+msgstr ""
+
+#. module: olap
+#: field:olap.cube,measure_ids:0
+msgid "Measures"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.wizard,name:olap.bi_conf_cube_query_builder
+#: wizard_view:olap.query_builder,exec:0
+#: wizard_view:olap.query_builder,ok:0
+msgid "Query Builder"
+msgstr ""
+
+#. module: olap
+#: field:olap.cube,dimension_ids:0
+msgid "Dimensions"
+msgstr ""
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_cube
+#: view:olap.cube:0
+msgid "Olap cube"
+msgstr "Cube Olap"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_warehouse
+#: model:ir.model,name:olap.model_olap_warehouse_wizard
+#: model:ir.ui.menu,name:olap.menu_bi_warehouse
+msgid "Olap Warehouse"
+msgstr "Entrepôt Olap"
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_view_olap_application_field_form
+msgid "Application Field"
+msgstr "Champ d'application"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_dimension
+#: view:olap.dimension:0
+msgid "Olap dimension"
+msgstr "Dimension Olap"
+
+#. module: olap
+#: field:olap.application.field,name:0
+msgid "Application field name"
+msgstr "Nom du champ de l'application"
+
+#. module: olap
+#: view:olap.fact.database:0
+msgid "Connection parameters"
+msgstr "Paramètres de connexion"
+
+#. module: olap
+#: field:bi.auto.configure.wizard,name:0
+#: field:bi.load.db.wizard,fact_table:0
+#: wizard_field:olap.load.table,init,fact_table:0
+msgid "Fact Name"
+msgstr ""
+
+#. module: olap
+#: view:olap.database.columns:0
+msgid "Database columns"
+msgstr "Colonnes de la base de données"
+
+#. module: olap
+#: field:olap.application.table,table_name:0
+#: field:olap.cube.table,name:0
+#: field:olap.level,table_name:0
+#: field:olap.measure,table_name:0
+msgid "Table name"
+msgstr "Nom de la table"
+
+#. module: olap
+#: help:olap.measure,measure_type:0
+msgid "Select between auto column or sql expression for the measures"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.wizard,name:olap.bi_load_column
+msgid "Open Columns"
+msgstr "Colonnes ouvertes"
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_view_olap_database_columns_form
+#: field:olap.database.tables,columns:0
+msgid "Columns"
+msgstr "Colonnes"
+
+#. module: olap
+#: model:ir.actions.wizard,name:olap.bi_test_connection
+#: view:olap.fact.database:0
+msgid "Test Connection"
+msgstr "Test de connexion"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_measure_form
+#: model:ir.ui.menu,name:olap.menu_action_olap_measure_form
+msgid "Olap Measures"
+msgstr "Mesures Olap"
+
+#. module: olap
+#: wizard_button:olap.application.configuration,init,configure:0
+#: view:olap.parameters.config.wizard:0
+msgid "Configure"
+msgstr ""
+
+#. module: olap
+#: wizard_view:olap.load.table,init:0
+msgid ""
+"After having loaded the structure, you will be able to hide/show or "
+"rename tables and columns to simplify end-users interface. The following "
+"database will be loaded:"
+msgstr ""
+
+#. module: olap
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"Le nom de l'objet doit commencer par x_ et ne doit pas contenir de "
+"caractères spéciaux !"
+
+#. module: olap
+#: wizard_field:olap.query_builder,exec,hierarchy:0
+#: wizard_field:olap.query_builder,ok,hierarchy:0
+msgid "Hiearchy"
+msgstr "Hiérarchie"
+
+#. module: olap
+#: selection:olap.measure,measure_type:0
+#: field:olap.measure,value_sql:0
+msgid "SQL Expression"
+msgstr "Expression SQL"
+
+#. module: olap
+#: model:ir.actions.wizard,name:olap.bi_menu_olap_load_table
+msgid "Load Tables"
+msgstr "Chargements des tables"
+
+#. module: olap
+#: field:olap.hierarchy,level_ids:0
+msgid "Levels"
+msgstr "Niveaux"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_application_field
+msgid "Olap application field"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_view_olap_database_columns_form
+msgid "Database Columns"
+msgstr "Colonnes de base de données"
+
+#. module: olap
+#: field:olap.database.columns,active:0
+#: field:olap.database.tables,active:0
+msgid "Active"
+msgstr "Actif"
+
+#. module: olap
+#: selection:olap.measure,datatype:0
+msgid "Integer"
+msgstr "Entier"
+
+#. module: olap
+#: wizard_view:olap.application.configuration,init:0
+msgid " Auto Configure "
+msgstr ""
+
+#. module: olap
+#: selection:olap.measure,agregator:0
+msgid "Sum"
+msgstr "Somme"
+
+#. module: olap
+#: wizard_field:olap.query.logs.clear,init,user_name:0
+#: field:olap.saved.query,user_id:0
+msgid "User"
+msgstr "Utilisateur"
+
+#. module: olap
+#: field:olap.query.logs,count:0
+msgid "Count"
+msgstr "Compter"
+
+#. module: olap
+#: field:olap.database.tables,name:0
+msgid "End-User Name"
+msgstr ""
+
+#. module: olap
+#: selection:olap.measure,formatstring:0
+msgid "Postfix Default Currency with comma seperator (0,000.00 EUR)"
+msgstr ""
+
+#. module: olap
+#: field:olap.measure,datatype:0
+msgid "Datatype"
+msgstr "Type de données"
+
+#. module: olap
+#: wizard_button:olap.query_builder,back,ok:0
+#: wizard_button:olap.query_builder,init,ok:0
+msgid "Fetch Data"
+msgstr "Récupérer les données"
+
+#. module: olap
+#: selection:olap.measure,formatstring:0
+msgid "Prefix Default Currency with comma seperator (EUR 0,000.00)"
+msgstr ""
+
+#. module: olap
+#: wizard_view:olap.load.table,info:0
+#: wizard_view:olap.load.table,ok:0
+#: wizard_view:olap.query.logs.clear,info:0
+#: wizard_view:olap.query.logs.clear,ok:0
+msgid "Load Data"
+msgstr "Charger les données"
+
+#. module: olap
+#: field:olap.cube,query_ids:0
+msgid "Queries"
+msgstr "Requêtes"
+
+#. module: olap
+#: selection:olap.fact.database,type:0
+msgid "Oracle"
+msgstr "Oracle"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_cube_form
+#: model:ir.ui.menu,name:olap.menu_action_olap_cube_form
+#: model:ir.ui.menu,name:olap.menu_bi_conf_cubes
+msgid "Olap Cubes"
+msgstr "Cubes Olap"
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_action_olap_cube_table_form
+msgid "Olap Cubes Table"
+msgstr "Tables des Cubes Olap"
+
+#. module: olap
+#: field:olap.measure,name:0
+msgid "Measure name"
+msgstr "Nom de la mesure"
+
+#. module: olap
+#: selection:olap.fact.database,connection_type:0
+msgid "Socket"
+msgstr ""
+
+#. module: olap
+#: field:olap.fact.database,connection_type:0
+msgid "Connection type"
+msgstr "Type de connexion"
+
+#. module: olap
+#: selection:olap.measure,agregator:0
+msgid "count"
+msgstr "nombre"
+
+#. module: olap
+#: field:olap.fact.database,db_name:0
+msgid "Database name"
+msgstr "Nom de la base de données"
+
+#. module: olap
+#: field:olap.database.columns,type:0
+msgid "Type"
+msgstr "Type"
+
+#. module: olap
+#: view:olap.database.columns:0
+#: view:olap.database.tables:0
+msgid "Show"
+msgstr "Montrer"
+
+#. module: olap
+#: wizard_button:olap.query_builder,exec,back:0
+#: wizard_button:olap.query_builder,ok,back:0
+msgid "Change cube"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_view_olap_database_tables_form
+#: view:olap.cube.table:0
+#: field:olap.cube.table,line_ids:0
+msgid "Database Tables"
+msgstr ""
+
+#. module: olap
+#: help:olap.level,table_name:0
+msgid ""
+"The name of the table on which the column is defined. If False, take the "
+"table from the hierarchy."
+msgstr ""
+
+#. module: olap
+#: selection:olap.schema,state:0
+msgid "Nothing has been Configured"
+msgstr ""
+
+#. module: olap
+#: field:olap.dimension,name:0
+msgid "Dimension name"
+msgstr ""
+
+#. module: olap
+#: wizard_button:olap.load.table,ok,end:0
+msgid "Continue and Configure Structure"
+msgstr ""
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_measure
+#: view:olap.measure:0
+msgid "Olap measure"
+msgstr ""
+
+#. module: olap
+#: help:olap.cube,table_id:0
+msgid "Table(s) for cube."
+msgstr "Table(s) pour le cube"
+
+#. module: olap
+#: wizard_field:olap.query_builder,exec,measure:0
+#: wizard_field:olap.query_builder,ok,measure:0
+msgid "Measure"
+msgstr ""
+
+#. module: olap
+#: field:olap.database.columns,column_db_name:0
+msgid "Column DBName"
+msgstr ""
+
+#. module: olap
+#: selection:olap.schema,state:0
+msgid "We Can Start building Cube"
+msgstr ""
+
+#. module: olap
+#: field:olap.cube.table.line,table_id:0
+msgid "Database Table"
+msgstr ""
+
+#. module: olap
+#: field:olap.schema,name:0
+msgid "Schema name"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_query_logs_my_form
+#: model:ir.ui.menu,name:olap.menu_action_olap_query_logs_my_form
+#: view:olap.query.logs:0
+msgid "My Logs"
+msgstr "Mes journaux"
+
+#. module: olap
+#: view:olap.fact.database:0
+msgid "Information"
+msgstr "Information"
+
+#. module: olap
+#: wizard_field:olap.query_builder,back,cube_schema:0
+#: wizard_field:olap.query_builder,init,cube_schema:0
+msgid "Select Cube"
+msgstr "Sélectionner le Cube"
+
+#. module: olap
+#: field:olap.hierarchy,table_id:0
+msgid "Fact table(s)"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.url,name:olap.menu_url_cube_designer
+msgid "name_menu_url_cube_designer"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_config_bi_parameters
+msgid "Parameters Configuration"
+msgstr ""
+
+#. module: olap
+#: view:olap.schema:0
+msgid "Connect to Database"
+msgstr "Connexion à la base de données"
+
+#. module: olap
+#: selection:olap.schema,state:0
+msgid "Database Connected"
+msgstr "Connecté à la base de données"
+
+#. module: olap
+#: field:olap.application.field,table_name:0
+#: field:olap.application.table,name:0
+msgid "Application table name"
+msgstr ""
+
+#. module: olap
+#: help:olap.hierarchy,table_id:0
+msgid "Table(s) to make hierarchy on the cube."
+msgstr ""
+
+#. module: olap
+#: view:olap.fact.database:0
+msgid "General information"
+msgstr "Informations générales"
+
+#. module: olap
+#: field:olap.application,query:0
+msgid "Application Query"
+msgstr ""
+
+#. module: olap
+#: help:olap.cube,query_log:0
+msgid "Enabling this will log all the queries in the browser"
+msgstr ""
+
+#. module: olap
+#: field:olap.saved.query,mdx_id:0
+msgid "Module"
+msgstr "Module"
+
+#. module: olap
+#: field:olap.application.field,is_hidden:0
+#: field:olap.application.table,is_hidden:0
+#: field:olap.database.columns,hide:0
+#: field:olap.database.tables,hide:0
+msgid "Hidden"
+msgstr "Masquer"
+
+#. module: olap
+#: field:olap.dimension,hierarchy_ids:0
+msgid "Hierarchies"
+msgstr "Hiérarchies"
+
+#. module: olap
+#: field:olap.query.logs,result_size:0
+msgid "Result Size"
+msgstr ""
+
+#. module: olap
+#: view:olap.application:0
+msgid "Olap Application"
+msgstr ""
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_database_tables
+msgid "Olap Database Tables"
+msgstr ""
+
+#. module: olap
+#: selection:olap.measure,formatstring:0
+msgid "Prefix Default Currency (EUR 0000.00)"
+msgstr ""
+
+#. module: olap
+#: view:olap.cube.table:0
+msgid "Olap cube_table"
+msgstr ""
+
+#. module: olap
+#: view:olap.parameters.config.wizard:0
+msgid "Parameters Configure"
+msgstr "Configurer les paramètres"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_hierarchy
+#: view:olap.hierarchy:0
+msgid "Olap hierarchy"
+msgstr "Hiérarchie Olap"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_cube_table
+#: model:ir.model,name:olap.model_olap_cube_table_line
+msgid "Olap cube table"
+msgstr ""
+
+#. module: olap
+#: field:olap.application.field,field_name:0
+msgid "Field name"
+msgstr "Nom du champ"
+
+#. module: olap
+#: model:ir.model,name:olap.model_olap_query_logs
+msgid "Olap query logs"
+msgstr ""
+
+#. module: olap
+#: field:olap.fact.database,name:0
+msgid "Fact name"
+msgstr ""
+
+#. module: olap
+#: help:olap.measure,formatstring:0
+msgid " Let you specify how the measure to be displayed in cube browser"
+msgstr ""
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_bi_server_parameters
+msgid "Server Parameters"
+msgstr "Paramètres serveur"
+
+#. module: olap
+#: wizard_view:olap.load.table,init:0
+#: wizard_button:olap.load.table,init,ok:0
+#: view:olap.schema:0
+msgid "Load Database Structure"
+msgstr "Charger la structure de la base de données"
+
+#. module: olap
+#: field:olap.level,name:0
+msgid "Level name"
+msgstr "Nom du niveau"
+
+#. module: olap
+#: field:olap.cube,schema_id:0
+#: field:olap.query.logs,schema_id:0
+#: field:olap.saved.query,schema_id:0
+msgid "Schema"
+msgstr "Schéma"
+
+#. module: olap
+#: field:olap.fact.database,connection_url:0
+#: field:olap.schema,app_detect:0
+msgid "Connection URL"
+msgstr "URL de connexion"
+
+#. module: olap
+#: field:olap.schema,cube_ids:0
+msgid "Cubes"
+msgstr "Cubes"
+
+#. module: olap
+#: view:olap.schema:0
+msgid "ReConfigure Structure"
+msgstr ""
+
+#. module: olap
+#: field:olap.application,field_ids:0
+msgid "Fields"
+msgstr "Champs"
+
+#. module: olap
+#: selection:olap.measure,agregator:0
+msgid "Average"
+msgstr "Moyenne"
+
+#. module: olap
+#: view:bi.load.db.wizard:0
+msgid "Load Database Tables"
+msgstr ""
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_action_olap_hierarchy_form
+msgid "Olap Hierarchy"
+msgstr ""
+
+#. module: olap
+#: field:olap.cube.table.line,cube_table_id:0
+msgid "Cube Table"
+msgstr ""
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_bi
+msgid "Businesss Intelligence"
+msgstr ""
+
+#. module: olap
+#: model:ir.model,name:olap.model_bi_load_db_wizard
+msgid "bi.load.db.wizard"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.url,name:olap.menu_url_cube_browser
+msgid "name_menu_url_cube_browser"
+msgstr ""
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_view_olap_fact_database_form
+msgid "Databases"
+msgstr "Bases de données"
+
+#. module: olap
+#: field:olap.hierarchy,name:0
+msgid "Hierarchy name"
+msgstr ""
+
+#. module: olap
+#: model:ir.module.module,description:olap.module_meta_information
+msgid ""
+"\n"
+" Base module to manage Olap schemas. Cube designer.\n"
+" "
+msgstr ""
+
+#. module: olap
+#: view:olap.cube.table:0
+msgid "Joined Tables"
+msgstr "Tables jointes"
+
+#. module: olap
+#: field:olap.schema,loaded:0
+msgid "Loading Datastructure"
+msgstr ""
+
+#. module: olap
+#: view:olap.cube.table:0
+msgid "Joined Table"
+msgstr "Tables jointes"
+
+#. module: olap
+#: selection:olap.fact.database,type:0
+msgid "PostgreSQL"
+msgstr "PostgreSQL"
+
+#. module: olap
+#: wizard_view:olap.query.logs.clear,init:0
+msgid " To Load Data"
+msgstr ""
+
+#. module: olap
+#: field:olap.hierarchy,sequence:0
+#: field:olap.level,sequence:0
+msgid "Sequence"
+msgstr "Séquence"
+
+#. module: olap
+#: model:ir.ui.menu,name:olap.menu_bi_conf_tools
+msgid "Tools"
+msgstr "Outils"
+
+#. module: olap
+#: field:olap.schema,state:0
+msgid "Schema State"
+msgstr ""
+
+#. module: olap
+#: selection:olap.measure,datatype:0
+msgid "Float"
+msgstr "Décimal"
+
+#. module: olap
+#: model:ir.actions.act_window,name:olap.action_olap_query_logs_form
+#: model:ir.ui.menu,name:olap.menu_action_olap_query_logs_form
+#: view:olap.query.logs:0
+msgid "All Logs"
+msgstr ""
+
+#. module: olap
+#: selection:olap.fact.database,connection_type:0
+#: field:olap.parameters.config.wizard,host_port:0
+msgid "Port"
+msgstr "Port"
+
+#. module: olap
+#: view:olap.fact.database:0
+msgid "Fact database"
+msgstr ""
+
+#. module: olap
+#: model:ir.module.module,shortdesc:olap.module_meta_information
+msgid "olap"
+msgstr "olap"
+
+#. module: olap
+#: field:olap.database.columns,name:0
+msgid "Column Name"
+msgstr "Nom de colonne"
+
+#. module: olap
+#: field:olap.database.tables,table_db_name:0
+msgid "Table Name"
+msgstr "Nom de la table"
+
+#. module: olap
+#: wizard_view:olap.application.configuration,configure:0
+msgid "Auto Configure"
+msgstr "Configuration auto"
+
+#. module: olap
+#: field:olap.schema,configure:0
+msgid "Configuring Datastructure"
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.wizard,name:olap.bi_load_configuration_table
+msgid "Open Configuration"
+msgstr ""
+
+#. module: olap
+#: view:olap.schema:0
+msgid "Configure Automatically "
+msgstr ""
+
+#. module: olap
+#: model:ir.actions.wizard,name:olap.bi_clear_logs
+#: model:ir.ui.menu,name:olap.menu_bi_clear_logs
+#: wizard_button:olap.query.logs.clear,init,ok:0
+msgid "Clear Logs"
+msgstr "Effacer les journaux"
diff --git a/addons/olap_crm/i18n/fr.po b/addons/olap_crm/i18n/fr.po
new file mode 100644
index 00000000000..034219dcdcd
--- /dev/null
+++ b/addons/olap_crm/i18n/fr.po
@@ -0,0 +1,34 @@
+# French translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-26 05:29+0000\n"
+"PO-Revision-Date: 2010-05-21 14:53+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: olap_crm
+#: model:ir.module.module,description:olap_crm.module_meta_information
+msgid ""
+"\n"
+" Sale module will load the data in olap tables\n"
+" "
+msgstr ""
+"\n"
+" Module de vente qui chargera les données dans les tables olap\n"
+" "
+
+#. module: olap_crm
+#: model:ir.module.module,shortdesc:olap_crm.module_meta_information
+msgid "olap_crm"
+msgstr "olap_crm"
diff --git a/addons/olap_extract/i18n/fr.po b/addons/olap_extract/i18n/fr.po
new file mode 100644
index 00000000000..ec38bffe470
--- /dev/null
+++ b/addons/olap_extract/i18n/fr.po
@@ -0,0 +1,59 @@
+# French translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-26 05:29+0000\n"
+"PO-Revision-Date: 2010-05-21 14:54+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: olap_extract
+#: model:ir.module.module,shortdesc:olap_extract.module_meta_information
+msgid "olap_extract"
+msgstr "olap_extract"
+
+#. module: olap_extract
+#: wizard_button:olap.extract.schema,init,ok:0
+msgid "OK"
+msgstr "OK"
+
+#. module: olap_extract
+#: model:ir.actions.wizard,name:olap_extract.bi_olap_extract_schema
+msgid "Olap Extract"
+msgstr "Extraction Olap"
+
+#. module: olap_extract
+#: model:ir.module.module,description:olap_extract.module_meta_information
+msgid ""
+"\n"
+" Extracts the schema structure.\n"
+" "
+msgstr ""
+"\n"
+" Extraire la structure du schéma.\n"
+" "
+
+#. module: olap_extract
+#: wizard_field:olap.extract.schema,init,module_name:0
+msgid "Module Name"
+msgstr "Nom du module"
+
+#. module: olap_extract
+#: wizard_button:olap.extract.schema,init,end:0
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: olap_extract
+#: wizard_view:olap.extract.schema,init:0
+msgid "New Module Name"
+msgstr "Nouveau nom de module"
diff --git a/addons/olap_sale/i18n/fr.po b/addons/olap_sale/i18n/fr.po
new file mode 100644
index 00000000000..2a4e7c47c93
--- /dev/null
+++ b/addons/olap_sale/i18n/fr.po
@@ -0,0 +1,34 @@
+# French translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-26 05:29+0000\n"
+"PO-Revision-Date: 2010-05-21 15:14+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: olap_sale
+#: model:ir.module.module,description:olap_sale.module_meta_information
+msgid ""
+"\n"
+" Sale module will load the data in olap tables\n"
+" "
+msgstr ""
+"\n"
+" Module de ventes qui chargera les données dans les tables olap\n"
+" "
+
+#. module: olap_sale
+#: model:ir.module.module,shortdesc:olap_sale.module_meta_information
+msgid "olap_sale"
+msgstr "olap_sale"
diff --git a/addons/point_of_sale/i18n/fr.po b/addons/point_of_sale/i18n/fr.po
index 6ae0cfda0bb..c3eea52b8d2 100644
--- a/addons/point_of_sale/i18n/fr.po
+++ b/addons/point_of_sale/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-09 18:58+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2010-05-21 10:26+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:00+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: point_of_sale
@@ -52,7 +52,7 @@ msgstr "Numéro de pièce"
#. module: point_of_sale
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nom du Modèle non valide dans la définition de l'action."
#. module: point_of_sale
#: field:pos.order,name:0
@@ -92,7 +92,7 @@ msgstr "Ventes (résumé)"
#. module: point_of_sale
#: help:pos.order,user_id:0
msgid "This is the logged in user (not necessarily the salesman)."
-msgstr ""
+msgstr "Ceci est l'utilisateur connecté (pas nécessairement le vendeur)."
#. module: point_of_sale
#: wizard_view:pos.sale.get,init:0
@@ -142,7 +142,7 @@ msgstr "Réf. Partenaire"
#. module: point_of_sale
#: rml:pos.receipt:0
msgid "Tel : + 32 (0) 2 231 04 35"
-msgstr ""
+msgstr "Tél : + 32 (0) 2 231 04 35"
#. module: point_of_sale
#: field:pos.order.line,name:0
@@ -242,7 +242,7 @@ msgstr "Qté"
#. module: point_of_sale
#: field:pos.order,user_id:0
msgid "Logged in User"
-msgstr ""
+msgstr "Connecté en tant qu'utilisateur"
#. module: point_of_sale
#: rml:pos.details:0
@@ -350,7 +350,7 @@ msgstr "Lignes de la commande"
#. module: point_of_sale
#: rml:pos.invoice:0
msgid "Disc.(%)"
-msgstr ""
+msgstr "Rem.(%)"
#. module: point_of_sale
#: model:ir.module.module,shortdesc:point_of_sale.module_meta_information
@@ -385,7 +385,7 @@ msgstr "Configuration des Journaux utilisés par les Points de Vente."
#. module: point_of_sale
#: rml:pos.receipt:0
msgid "Total :"
-msgstr ""
+msgstr "Total :"
#. module: point_of_sale
#: wizard_field:pos.config.journal,init,default_journal:0
@@ -447,7 +447,7 @@ msgstr "Ristourne (%)"
#. module: point_of_sale
#: rml:pos.invoice:0
msgid "Fiscal Position Remark :"
-msgstr ""
+msgstr "Indiquer la position fiscale :"
#. module: point_of_sale
#: model:ir.actions.wizard,name:point_of_sale.pos_add_product
@@ -487,7 +487,7 @@ msgstr "Point de Vente"
#. module: point_of_sale
#: field:pos.order,salesman_id:0
msgid "Salesman"
-msgstr ""
+msgstr "Vendeur"
#. module: point_of_sale
#: rml:pos.details:0
@@ -929,7 +929,7 @@ msgstr "Actions"
#. module: point_of_sale
#: help:pos.order,salesman_id:0
msgid "This is the salesman actually making the order."
-msgstr ""
+msgstr "Indiquer le vendeur de cette vente"
#. module: point_of_sale
#: rml:pos.details:0
@@ -957,7 +957,7 @@ msgstr "Date d'Impression"
#. module: point_of_sale
#: rml:pos.receipt:0
msgid "OPERATION N° :"
-msgstr ""
+msgstr "OPÉRATION N° :"
#. module: point_of_sale
#: rml:pos.lines:0
diff --git a/addons/project_gtd/i18n/fr.po b/addons/project_gtd/i18n/fr.po
index 27f868fbae5..abbd2e8dec7 100644
--- a/addons/project_gtd/i18n/fr.po
+++ b/addons/project_gtd/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-09-08 14:56+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2010-05-21 10:32+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:14+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: project_gtd
@@ -78,7 +78,7 @@ msgstr "Projet par défaut"
#. module: project_gtd
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nom de modèle invalide pour la définition de l'action"
#. module: project_gtd
#: field:project.gtd.timebox,context4_id:0
@@ -110,12 +110,12 @@ msgstr "Feuilles de temps"
#. module: project_gtd
#: model:ir.module.module,shortdesc:project_gtd.module_meta_information
msgid "Getting Things Done - Time Management Module"
-msgstr ""
+msgstr "Getting Things Done - Module de Gestion du Temps"
#. module: project_gtd
#: model:ir.actions.act_window,name:project_gtd.act_timebox_tasks
msgid "Timebox Tasks"
-msgstr ""
+msgstr "Tâche de la Timebox"
#. module: project_gtd
#: wizard_view:project.gtd.timebox.fill,init:0
@@ -181,7 +181,7 @@ msgstr "Contexte 3"
#. module: project_gtd
#: wizard_button:project.gtd.timebox.fill,init,process:0
msgid "Add to Timebox"
-msgstr ""
+msgstr "Ajouter une Timebox"
#. module: project_gtd
#: field:project.gtd.timebox,context5_id:0
@@ -277,7 +277,7 @@ msgstr "Séquence"
#. module: project_gtd
#: field:project.gtd.timebox,child_ids:0
msgid "Child Timeboxes"
-msgstr ""
+msgstr "Timeboxes enfant"
#. module: project_gtd
#: model:ir.ui.menu,name:project_gtd.menu_open_time_allinbox
diff --git a/addons/sale/i18n/fr.po b/addons/sale/i18n/fr.po
index 3d9f2727a80..c81d4b09f23 100644
--- a/addons/sale/i18n/fr.po
+++ b/addons/sale/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-11-17 10:31+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2010-05-22 09:28+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:09+0000\n"
+"X-Launchpad-Export-Date: 2010-05-23 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
@@ -210,7 +210,7 @@ msgstr "Politique d'expédition"
#. module: sale
#: selection:sale.order,state:0 selection:sale.order.line,state:0
msgid "Cancelled"
-msgstr ""
+msgstr "Annuler"
#. module: sale
#: selection:sale.order,state:0
diff --git a/addons/sale/i18n/pl.po b/addons/sale/i18n/pl.po
index 2016f908fe8..5a29059512f 100644
--- a/addons/sale/i18n/pl.po
+++ b/addons/sale/i18n/pl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-05-17 14:08+0000\n"
+"PO-Revision-Date: 2010-05-21 08:21+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-05-19 05:12+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
@@ -222,7 +222,7 @@ msgstr "Wydawanie produktów"
#. module: sale
#: view:sale.order:0
msgid "Reference"
-msgstr "Odnośnik"
+msgstr "Numer"
#. module: sale
#: selection:sale.config.picking_policy,picking_policy:0
diff --git a/addons/scrum/i18n/fr.po b/addons/scrum/i18n/fr.po
index 5dd1943ab4a..9d1982fc341 100644
--- a/addons/scrum/i18n/fr.po
+++ b/addons/scrum/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-09-08 13:49+0000\n"
-"Last-Translator: nel \n"
+"PO-Revision-Date: 2010-05-22 09:49+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 03:59+0000\n"
+"X-Launchpad-Export-Date: 2010-05-23 03:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: scrum
@@ -29,7 +29,7 @@ msgstr "Nom du Rendez-vous"
#. module: scrum
#: model:process.transition,note:scrum.process_transition_backlogtask0
msgid "From backlog create task."
-msgstr ""
+msgstr "Créer une tâche à partir du référentiel"
#. module: scrum
#: model:ir.actions.act_window,name:scrum.action_view_task4
@@ -46,17 +46,17 @@ msgstr "Mes Sprints Ouverts (Directeur de Produit)"
#. module: scrum
#: model:process.node,note:scrum.process_node_productbacklog0
msgid "Create task from backlogs"
-msgstr ""
+msgstr "Créer une tâche à partir des référentiels"
#. module: scrum
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
-msgstr ""
+msgstr "Nom de modèle invalide pour la définition de l'action"
#. module: scrum
#: model:ir.module.module,shortdesc:scrum.module_meta_information
msgid "Scrum, Agile Development Method"
-msgstr ""
+msgstr "Scrum, méthode de développement agile"
#. module: scrum
#: field:scrum.project,progress_rate:0
@@ -69,6 +69,8 @@ msgid ""
"Total remaining time, can be re-estimated periodically by the assignee of "
"the task."
msgstr ""
+"Le temps restant total peut être réévalué périodiquement par le prescripteur "
+"de la tâche."
#. module: scrum
#: field:scrum.project,child_id:0
@@ -88,7 +90,7 @@ msgstr "Est-ce que l'estimation du Retard du Sprint est correcte ?"
#. module: scrum
#: field:scrum.project,members:0
msgid "Project Members"
-msgstr ""
+msgstr "Membres du projet"
#. module: scrum
#: view:scrum.project:0
@@ -106,6 +108,8 @@ msgid ""
"Header added at the beginning of the email for the warning message sent to "
"the customer when a task is closed."
msgstr ""
+"L'entête est ajouté au début de l'email pour que le message d'avertissement "
+"soit envoyer au client lorsque la tâche est fermé."
#. module: scrum
#: field:scrum.task,priority:0
@@ -127,6 +131,8 @@ msgstr "Voir le Retard du Projet"
msgid ""
"Project's member. Not used in any computation, just for information purpose."
msgstr ""
+"Membre du projet. Non utilisé dans aucun calcul, juste proposer à titre "
+"d'information"
#. module: scrum
#: selection:scrum.product.backlog,priority:0
@@ -150,6 +156,8 @@ msgid ""
"Estimated time to do the task, usually set by the project manager when the "
"task is in draft state."
msgstr ""
+"Temps estimé pour réaliser la tâche, habituellement fixé par le responsable "
+"du projet quand la tâche est à l'état brouillon"
#. module: scrum
#: field:scrum.project,notes:0
@@ -175,6 +183,8 @@ msgid ""
"If you check this field, the project manager will receive a request each "
"time a task is completed by his team."
msgstr ""
+"Si vous cochez ce champs, le responsable du projet recevra une requête "
+"chaque fois qu'une tâche est completé par son équipe."
#. module: scrum
#: selection:scrum.project,state:0
@@ -190,7 +200,7 @@ msgstr "Nom de l'équipe"
#. module: scrum
#: field:scrum.project,warn_header:0
msgid "Mail Header"
-msgstr ""
+msgstr "En-tête de courrier"
#. module: scrum
#: field:scrum.project,sprint_size:0
@@ -205,7 +215,7 @@ msgstr "Date de fin"
#. module: scrum
#: help:scrum.task,effective_hours:0
msgid "Computed using the sum of the task work done."
-msgstr ""
+msgstr "Calculé en utilisant la somme du travail de tâche effectuée."
#. module: scrum
#: help:scrum.project,warn_customer:0
@@ -213,6 +223,8 @@ msgid ""
"If you check this, the user will have a popup when closing a task that "
"propose a message to send by email to the customer."
msgstr ""
+"Si vous cochez la case, l'utilisateur verra un menu surgissant quand une "
+"tâche sera fermé proposant un message pour envoyer un mail au client."
#. module: scrum
#: model:ir.actions.act_window,name:scrum.action_sprint_task_open
@@ -239,7 +251,7 @@ msgstr "Date limite"
#: field:scrum.project,partner_id:0
#: field:scrum.task,partner_id:0
msgid "Partner"
-msgstr ""
+msgstr "Partenaire"
#. module: scrum
#: field:scrum.product.backlog,planned_hours:0
@@ -251,7 +263,7 @@ msgstr "Heures planifiés"
#. module: scrum
#: selection:scrum.project,state:0
msgid "Template"
-msgstr ""
+msgstr "Modèle"
#. module: scrum
#: field:scrum.product.backlog,priority:0
@@ -268,11 +280,12 @@ msgstr "État"
#: help:scrum.project,progress_rate:0
msgid "Percent of tasks closed according to the total of tasks todo."
msgstr ""
+"Pourcentage des tâches fermés en accord avec le total des tâches à faire."
#. module: scrum
#: help:scrum.project,notes:0
msgid "Internal description of the project."
-msgstr ""
+msgstr "Description interne du projet"
#. module: scrum
#: field:scrum.sprint,meetings_id:0
@@ -282,7 +295,7 @@ msgstr "Scrum Journalier"
#. module: scrum
#: help:scrum.task,total_hours:0
msgid "Computed as: Time Spent + Remaining Time."
-msgstr ""
+msgstr "Calculer comme: Temps passé + Temps restant"
#. module: scrum
#: field:scrum.task,type:0
@@ -292,7 +305,7 @@ msgstr "Type"
#. module: scrum
#: view:scrum.project:0
msgid "Scrum Data"
-msgstr ""
+msgstr "Données Scrum"
#. module: scrum
#: selection:scrum.product.backlog,priority:0
@@ -303,7 +316,7 @@ msgstr "Moyenne"
#. module: scrum
#: field:scrum.project,total_hours:0
msgid "Total Time"
-msgstr ""
+msgstr "Temps Total"
#. module: scrum
#: model:ir.ui.menu,name:scrum.next_id_67
@@ -356,7 +369,7 @@ msgstr "Voir les tâches du projet"
#. module: scrum
#: field:scrum.task,delay_hours:0
msgid "Delay Hours"
-msgstr ""
+msgstr "Delais en heures"
#. module: scrum
#: field:scrum.project,contact_id:0
@@ -392,18 +405,18 @@ msgstr "Créer tâches"
#. module: scrum
#: field:scrum.task,progress:0
msgid "Progress (%)"
-msgstr ""
+msgstr "Progression (%)"
#. module: scrum
#: help:scrum.task,progress:0
msgid "Computed as: Time Spent / Total Time."
-msgstr ""
+msgstr "Calculer comme: Temps passé / Temps total"
#. module: scrum
#: field:scrum.project,scrum:0
#: field:scrum.task,scrum:0
msgid "Is Scrum"
-msgstr ""
+msgstr "Est Scrum"
#. module: scrum
#: model:ir.actions.act_window,name:scrum.action_product_backlog_form_draft
@@ -482,7 +495,7 @@ msgstr "Mes Tâches Ouvertes"
#. module: scrum
#: field:scrum.project,manager:0
msgid "Project Manager"
-msgstr ""
+msgstr "Responsable du projet"
#. module: scrum
#: selection:scrum.project,state:0
@@ -511,13 +524,13 @@ msgstr "Sprints Ouverts"
#. module: scrum
#: field:scrum.project,effective_hours:0
msgid "Time Spent"
-msgstr ""
+msgstr "Temps écoulé"
#. module: scrum
#: field:scrum.project,complete_name:0
#: field:scrum.project,name:0
msgid "Project Name"
-msgstr ""
+msgstr "Nom du Projet"
#. module: scrum
#: field:scrum.project,product_owner_id:0
@@ -561,6 +574,9 @@ msgid ""
"Computed as: Total Time - Estimated Time. It gives the difference of the "
"time estimated by the project manager and the real time to close the task."
msgstr ""
+"Calculer comme: Temps total - Temps estimé. Cela donne la différence de "
+"temps estimé par le responsable projet et le temps réel pour fermer cette "
+"tâche."
#. module: scrum
#: field:scrum.task,timebox_id:0
@@ -576,7 +592,7 @@ msgstr "Sprints Brouillon"
#. module: scrum
#: field:scrum.project,timesheet_id:0
msgid "Working Time"
-msgstr ""
+msgstr "Temps de travail"
#. module: scrum
#: field:scrum.task,work_ids:0
@@ -591,7 +607,7 @@ msgstr "Voir les retards du sprint"
#. module: scrum
#: field:scrum.task,delegated_user_id:0
msgid "Delegated To"
-msgstr ""
+msgstr "Déléguer à"
#. module: scrum
#: field:scrum.task,date_close:0
@@ -611,7 +627,7 @@ msgstr "Retard Correct"
#. module: scrum
#: help:scrum.project,effective_hours:0
msgid "Sum of spent hours of all tasks related to this project."
-msgstr ""
+msgstr "Total des heures passés de toutes les tâches reliés à ce projet"
#. module: scrum
#: help:scrum.task,project_id:0
@@ -619,16 +635,18 @@ msgid ""
"If you have [?] in the project name, it means there are no analytic account "
"linked to this project."
msgstr ""
+"Si vous avez [?] dans le nom du projet, cela signifie que vous n'avez pas de "
+"compte analytique lié à ce projet"
#. module: scrum
#: help:scrum.project,planned_hours:0
msgid "Sum of planned hours of all tasks related to this project."
-msgstr ""
+msgstr "Somme des tâches planifiés de toutes les tâches relier à ce projet."
#. module: scrum
#: field:scrum.project,warn_customer:0
msgid "Warn Partner"
-msgstr ""
+msgstr "Avertir le partenaire"
#. module: scrum
#: model:ir.actions.act_window,name:scrum.action_sprint_open_tree4
@@ -648,6 +666,10 @@ msgid ""
"projects. It enables you to connect projects with budgets, planning, cost "
"and revenue analysis, timesheets on projects, etc."
msgstr ""
+"Lier ce projet à un compte analytique si vous souhaitez une gestion "
+"financière sur les projets. Il vous active la gestion des projets avec les "
+"budgets, agenda, coût, analyse de revenu, feuilles de temps sur le projet, "
+"etc."
#. module: scrum
#: selection:scrum.product.backlog,state:0
@@ -680,12 +702,12 @@ msgstr "Heures effectives"
#. module: scrum
#: field:scrum.project,warn_manager:0
msgid "Warn Manager"
-msgstr ""
+msgstr "Avertir le responsable"
#. module: scrum
#: selection:scrum.task,state:0
msgid "In Progress"
-msgstr ""
+msgstr "En cours"
#. module: scrum
#: field:scrum.sprint,review:0
diff --git a/addons/smtpclient/i18n/fr.po b/addons/smtpclient/i18n/fr.po
new file mode 100644
index 00000000000..ceed71ebce5
--- /dev/null
+++ b/addons/smtpclient/i18n/fr.po
@@ -0,0 +1,871 @@
+# French translation for openobject-addons
+# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
+# This file is distributed under the same license as the openobject-addons package.
+# FIRST AUTHOR , 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: openobject-addons\n"
+"Report-Msgid-Bugs-To: FULL NAME \n"
+"POT-Creation-Date: 2009-11-26 06:00+0000\n"
+"PO-Revision-Date: 2010-05-22 09:14+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
+"Language-Team: French \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2010-05-23 03:57+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#. module: smtpclient
+#: field:email.smtpclient.queue,bcc:0
+msgid "BCC to"
+msgstr "Copie cachée à"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "__number__ for Invoice / Sales Number"
+msgstr "__number__ pour la facture / Numéro de vente"
+
+#. module: smtpclient
+#: field:email.smtpclient,ssl:0
+msgid "Use SSL?"
+msgstr "Utiliser SSL?"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Start Server"
+msgstr "Démarrer le serveur"
+
+#. module: smtpclient
+#: model:ir.actions.wizard,name:smtpclient.wizard_email_verifycode
+msgid "Verify Server"
+msgstr "Vérifier le serveur"
+
+#. module: smtpclient
+#: field:email.smtpclient,priority:0
+msgid "Server Priority"
+msgstr "Priorité du serveur"
+
+#. module: smtpclient
+#: help:email.sendcode,init,emailto:0
+msgid "Enter the address Email where you want to get the Verification Code"
+msgstr ""
+"Saisir l'adresse email à laquelle vous voulez envoyer le code de vérification"
+
+#. module: smtpclient
+#: selection:email.smtpclient,auth_type:0
+msgid "Other Mail Servers"
+msgstr "Autres serveurs de courrier"
+
+#. module: smtpclient
+#: constraint:ir.actions.act_window:0
+msgid "Invalid model name in the action definition."
+msgstr "Nom de modèle invalide pour la définition de l'action"
+
+#. module: smtpclient
+#: field:email.smtpclient.queue,to:0
+msgid "Mail to"
+msgstr "Envoyer par email à"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "Message Error!"
+msgstr "Erreur de message!"
+
+#. module: smtpclient
+#: field:email.smtpclient,name:0
+msgid "Server Name"
+msgstr "Nom du serveur"
+
+#. module: smtpclient
+#: field:email.smtpclient,header_ids:0
+msgid "Default Headers"
+msgstr "Entêtes de courrier par défaut"
+
+#. module: smtpclient
+#: wizard_button:email.testemail,init,send:0
+msgid "Send Email"
+msgstr "Envoyer un email"
+
+#. module: smtpclient
+#: field:res.company.address,company_id:0
+msgid "Company"
+msgstr "Société"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Set to Draft"
+msgstr "Mettre en brouillon"
+
+#. module: smtpclient
+#: code:addons/smtpclient/wizard/verifycode.py:0
+#, python-format
+msgid "Server already verified!"
+msgstr "Serveur déjà vérifié!"
+
+#. module: smtpclient
+#: code:addons/smtpclient/wizard/sendcode.py:0
+#: code:addons/smtpclient/wizard/testemail.py:0
+#, python-format
+msgid "Verification Failed. Please check the Server Configuration!"
+msgstr ""
+"Échec de vérification. Merci de vérifier le serveur de configuration!"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "SMTP Server Error!"
+msgstr "Erreur du serveur SMTP!"
+
+#. module: smtpclient
+#: field:email.smtpclient,auth_type:0
+#: field:email.smtpclient,type:0
+msgid "Server Type"
+msgstr "Type de serveur"
+
+#. module: smtpclient
+#: field:email.smtpclient,from_email:0
+msgid "Email From"
+msgstr "Email de"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "User Information"
+msgstr "Information utilisateur"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "OpenERP SMTP server Email Registration Code!"
+msgstr "Code d'enregistrement email du serveur SMTP OpenERP!"
+
+#. module: smtpclient
+#: model:ir.model,name:smtpclient.model_report_smtp_server
+#: view:report.smtp.server:0
+msgid "Server Statistics"
+msgstr "Statistiques du serveur"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Messages"
+msgstr "Messages"
+
+#. module: smtpclient
+#: selection:email.smtpclient,type:0
+#: selection:res.company.address,name:0
+msgid "Sale"
+msgstr "Vente"
+
+#. module: smtpclient
+#: field:email.headers,value:0
+msgid "Value"
+msgstr "Valeur"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Access Permission"
+msgstr "Permission d'accès"
+
+#. module: smtpclient
+#: model:ir.model,name:smtpclient.model_email_headers
+msgid "Email Headers"
+msgstr "Entêtes de courrier"
+
+#. module: smtpclient
+#: field:email.smtpclient,delete_queue:0
+msgid "Queue Option"
+msgstr "Option de file d'attente"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "Please configure Email Server Messages [Verification / Test]"
+msgstr ""
+"Merci de configurer les messages du serveur email [Vérification / Test]"
+
+#. module: smtpclient
+#: code:addons/smtpclient/wizard/verifycode.py:0
+#, python-format
+msgid "Verification failed. Invalid Verification Code!"
+msgstr "Échec de vérification. Code de vérification non valide!"
+
+#. module: smtpclient
+#: model:ir.actions.act_window,name:smtpclient.act_mail_server_2_mail_history
+msgid "Email History"
+msgstr "Historique des emails"
+
+#. module: smtpclient
+#: view:email.smtpclient.history:0
+msgid "Server History"
+msgstr "Historique du serveur"
+
+#. module: smtpclient
+#: selection:email.smtpclient,auth_type:0
+msgid "Yahoo!!! Server"
+msgstr "Serveur Yahoo!"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+#: field:email.smtpclient,test_email:0
+msgid "Test Message"
+msgstr "Message de test"
+
+#. module: smtpclient
+#: field:report.smtp.server,server_id:0
+msgid "Server ID"
+msgstr "ID du serveur"
+
+#. module: smtpclient
+#: help:email.smtpclient,delete_queue_period:0
+msgid "delete emails/contents from email queue after specified no of days"
+msgstr ""
+"effacer les emails/contenu placé en attente après le nombre de jours spécifié"
+
+#. module: smtpclient
+#: field:report.smtp.server,no:0
+msgid "Total No."
+msgstr "Nombre total"
+
+#. module: smtpclient
+#: help:email.smtpclient,process_id:0
+msgid "Mail Transport Agent Process"
+msgstr "Processus d'agent de transport email"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "__user__ for User Name"
+msgstr "__user__ pour le nom d'utilisateur"
+
+#. module: smtpclient
+#: field:email.smtpclient,date_create:0
+msgid "Date Create"
+msgstr "Date de création"
+
+#. module: smtpclient
+#: field:email.smtpclient,state:0
+msgid "Server Status"
+msgstr "État du serveur"
+
+#. module: smtpclient
+#: field:email.smtpclient.queue,error:0
+msgid "Last Error"
+msgstr "Dernière erreur"
+
+#. module: smtpclient
+#: wizard_view:email.sendcode,init:0
+#: wizard_button:email.sendcode,init,send:0
+msgid "Send Code"
+msgstr "Envoyer un code"
+
+#. module: smtpclient
+#: field:email.smtpclient.queue,name:0
+msgid "Subject"
+msgstr "Sujet"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "Read Error!"
+msgstr "Erreur de lecture!"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "Unable to read Server Settings"
+msgstr "Impossible de lire les paramètres du serveur"
+
+#. module: smtpclient
+#: field:email.smtpclient,server_statistics:0
+msgid "Statistics"
+msgstr "Statistiques"
+
+#. module: smtpclient
+#: wizard_view:email.testemail,init:0
+msgid "Test Email"
+msgstr "Email de test"
+
+#. module: smtpclient
+#: field:email.smtpclient.history,server_id:0
+msgid "Smtp Server"
+msgstr "Serveur SMTP"
+
+#. module: smtpclient
+#: field:res.company,addresses:0
+msgid "Email Addresses"
+msgstr "Adresses email"
+
+#. module: smtpclient
+#: model:ir.actions.act_window,name:smtpclient.action_email_smtpclient_history_tree
+#: model:ir.ui.menu,name:smtpclient.menu_smtpclient_administration_server_history
+msgid "Email Server History"
+msgstr "Historique du serveur email"
+
+#. module: smtpclient
+#: selection:email.smtpclient.queue,state:0
+msgid "Waiting"
+msgstr "En attente"
+
+#. module: smtpclient
+#: help:email.testemail,init,emailto:0
+msgid "Enter the address Email where you want to get the Test Email"
+msgstr ""
+"Saisir l'adresse email à laquelle vous voulez recevoir l'email de test"
+
+#. module: smtpclient
+#: selection:email.smtpclient,state:0
+msgid "Not Verified"
+msgstr "Non vérifié"
+
+#. module: smtpclient
+#: field:email.smtpclient.history,email:0
+msgid "Email"
+msgstr "Email"
+
+#. module: smtpclient
+#: selection:email.smtpclient.queue,state:0
+msgid "Sent"
+msgstr "Envoyé"
+
+#. module: smtpclient
+#: field:email.smtpclient.history,user_id:0
+msgid "Username"
+msgstr "Nom d'utilisateur"
+
+#. module: smtpclient
+#: field:res.company.address,name:0
+msgid "Address Type"
+msgstr "Type d'adresse"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Permission"
+msgstr "Permission"
+
+#. module: smtpclient
+#: view:email.smtpclient.queue:0
+msgid "Message with All Headers"
+msgstr "Message avec entêtes complètes"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Message Headers"
+msgstr "Entêtes de message"
+
+#. module: smtpclient
+#: field:ir.actions.server,report_id:0
+msgid "Report"
+msgstr "Rapport"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Other Information"
+msgstr "Autre information"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Configuration"
+msgstr "Configuration"
+
+#. module: smtpclient
+#: constraint:ir.cron:0
+msgid "Invalid arguments"
+msgstr "Paramètres non valides"
+
+#. module: smtpclient
+#: constraint:ir.ui.view:0
+msgid "Invalid XML for View Architecture!"
+msgstr "XML non valide pour l'architecture de la vue !"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+#: field:email.smtpclient,disclaimers:0
+msgid "Disclaimers"
+msgstr "Avertissement de responsabilité limitée"
+
+#. module: smtpclient
+#: field:report.smtp.server,name:0
+msgid "Server"
+msgstr "Serveur"
+
+#. module: smtpclient
+#: view:res.company:0
+msgid "SMTP Settings"
+msgstr "Paramètres SMTP"
+
+#. module: smtpclient
+#: help:email.smtpclient,body:0
+msgid ""
+"The message text that will be send along with the email which is send "
+"through this server"
+msgstr "Le message texte qui sera envoyé avec l'email envoyé par ce serveur"
+
+#. module: smtpclient
+#: model:ir.actions.wizard,name:smtpclient.wizard_email_testemail
+msgid "Send Test Email"
+msgstr "Envoyer email de test"
+
+#. module: smtpclient
+#: model:ir.model,name:smtpclient.model_email_smtpclient_queue
+msgid "Email Queue"
+msgstr "File d'attente email"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Server Information"
+msgstr "Information sur le serveur"
+
+#. module: smtpclient
+#: help:email.verifycode,init,code:0
+msgid "Enter the verification code thay you get in your verification Email"
+msgstr ""
+"Saisir le code de vérification que vous avez reçu dans votre email de "
+"vérification"
+
+#. module: smtpclient
+#: model:ir.model,name:smtpclient.model_email_smtpclient_history
+msgid "Email Client History"
+msgstr "Historique du client email"
+
+#. module: smtpclient
+#: selection:email.smtpclient,delete_queue:0
+msgid "Never Delete Message"
+msgstr "Ne jamais effacer le message"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "OpenERP Test Email!"
+msgstr "Email de test OpenERP!"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+#: field:email.smtpclient,body:0
+#: view:email.smtpclient.queue:0
+#: field:email.smtpclient.queue,serialized_message:0
+msgid "Message"
+msgstr "Message"
+
+#. module: smtpclient
+#: field:email.smtpclient,process_id:0
+msgid "MTA Process"
+msgstr "Processus MTA"
+
+#. module: smtpclient
+#: field:email.headers,server_id:0
+#: view:email.smtpclient:0
+#: field:email.smtpclient,server:0
+#: field:email.smtpclient.queue,server_id:0
+#: model:ir.ui.menu,name:smtpclient.menu_smtpclient_administration_smtp_server
+msgid "SMTP Server"
+msgstr "Serveur SMTP"
+
+#. module: smtpclient
+#: selection:email.smtpclient,auth_type:0
+msgid "Google Server"
+msgstr "Serveur Google"
+
+#. module: smtpclient
+#: selection:email.smtpclient,state:0
+msgid "Verified"
+msgstr "Vérifié"
+
+#. module: smtpclient
+#: help:email.smtpclient,priority:0
+msgid ""
+"Priority between 0 to 10, will be used to define the MTA process priotiry"
+msgstr ""
+"Priorité de 0 à 10, utilisé pour définir les priorités des processus MTA"
+
+#. module: smtpclient
+#: field:email.smtpclient,port:0
+msgid "SMTP Port"
+msgstr "Port SMTP"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "Email TO Address not Defined !"
+msgstr "Adresse d'envoi non définie!"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "SMTP Server Error !"
+msgstr "Erreur de serveur SMTP!"
+
+#. module: smtpclient
+#: field:email.smtpclient,auth:0
+msgid "Use Auth"
+msgstr "Utiliser l'authentification"
+
+#. module: smtpclient
+#: field:email.smtpclient,pstate:0
+msgid "Server Statue"
+msgstr "État du serveur"
+
+#. module: smtpclient
+#: field:email.smtpclient,user:0
+msgid "User Name"
+msgstr "Nom d'utilisateur"
+
+#. module: smtpclient
+#: field:email.smtpclient,verify_email:0
+msgid "Verify Message"
+msgstr "Vérifiez le message"
+
+#. module: smtpclient
+#: model:ir.model,name:smtpclient.model_email_smtpclient
+#: model:ir.module.module,shortdesc:smtpclient.module_meta_information
+msgid "Email Client"
+msgstr "Client email"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Disclaimers Message"
+msgstr "Message sur la limitation de garantie"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "__code__ for Verification Code"
+msgstr "__code__ pour le Code de Vérification"
+
+#. module: smtpclient
+#: selection:email.smtpclient.queue,state:0
+msgid "Queued"
+msgstr "File d'attente"
+
+#. module: smtpclient
+#: field:email.smtpclient.history,date_create:0
+#: field:email.smtpclient.queue,date_create:0
+msgid "Date"
+msgstr "Date"
+
+#. module: smtpclient
+#: field:email.smtpclient.queue,cc:0
+msgid "CC to"
+msgstr "En copie à"
+
+#. module: smtpclient
+#: model:email.smtpclient,verify_email:smtpclient.email_smtpclient_sendmailserver0
+msgid ""
+"Verification Message. This is the code\n"
+"__code__ \n"
+"you must copy in the OpenERP Email Server (Verify Server wizard).\n"
+"Created by user __user__"
+msgstr ""
+"Message de vérification. Ceci est le code\n"
+"__code__ \n"
+"que vous devez saisir dans le serveur email OpenERP (assistant Vérification "
+"du Serveur).\n"
+"Créé par utilisateur __utilisateur__"
+
+#. module: smtpclient
+#: view:email.smtpclient.queue:0
+#: model:ir.actions.act_window,name:smtpclient.action_email_smtpclient_queue_tree
+#: model:ir.ui.menu,name:smtpclient.menu_smtpclient_administration_smtp_server_queue
+msgid "Message Queue"
+msgstr "File d'attente des messages"
+
+#. module: smtpclient
+#: selection:email.smtpclient,type:0
+#: selection:res.company.address,name:0
+msgid "Default"
+msgstr "Défaut"
+
+#. module: smtpclient
+#: selection:email.smtpclient,delete_queue:0
+msgid "Delete Content After"
+msgstr "Effacer le contenu après"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "You have no permission to access SMTP Server : %s "
+msgstr "Vous n'avez aucune permission d'accès au serveur SMTP : %s "
+
+#. module: smtpclient
+#: field:email.smtpclient,active:0
+msgid "Active"
+msgstr "Actif"
+
+#. module: smtpclient
+#: model:ir.actions.act_window,name:smtpclient.act_mail_server_2_mail_queue
+msgid "Message Queus"
+msgstr "File d'attente des messages"
+
+#. module: smtpclient
+#: code:addons/smtpclient/wizard/sendcode.py:0
+#: code:addons/smtpclient/wizard/testemail.py:0
+#: code:addons/smtpclient/wizard/verifycode.py:0
+#: view:email.smtpclient.queue:0
+#: selection:email.smtpclient.queue,state:0
+#, python-format
+msgid "Error"
+msgstr "Erreur"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "Server Error!"
+msgstr "Erreur serveur !"
+
+#. module: smtpclient
+#: selection:email.smtpclient,delete_queue:0
+msgid "Clear All After"
+msgstr "Tout effacer après"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid ""
+"Please verify Email Server, without verification you can not send Email(s)."
+msgstr ""
+"Merci de vérifier votre serveur email, sans vérification vous ne pouvez pas "
+"envoyer d'email(s)."
+
+#. module: smtpclient
+#: field:email.smtpclient,history_line:0
+#: field:report.smtp.server,history:0
+msgid "History"
+msgstr "Historique"
+
+#. module: smtpclient
+#: field:email.smtpclient.queue,priority:0
+msgid "Message Priority"
+msgstr "Priorité du message"
+
+#. module: smtpclient
+#: field:ir.actions.server,file_ids:0
+msgid "Attachments"
+msgstr "Fichiers attachés"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "__name__ for Customer Name"
+msgstr "__name__ pour le Nom du Client"
+
+#. module: smtpclient
+#: view:email.smtpclient.queue:0
+msgid "General"
+msgstr "Général"
+
+#. module: smtpclient
+#: field:email.headers,key:0
+msgid "Header"
+msgstr "Entête"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid ""
+"Verification Message. This is the code\n"
+"\n"
+"__code__\n"
+"\n"
+"you must copy in the OpenERP Email Server (Verify Server wizard).\n"
+"\n"
+"Created by user __user__"
+msgstr ""
+"Message de vérification. Voici le code\n"
+"\n"
+"__code__\n"
+"\n"
+"Vous devez le copier dans le serveur de couriel d'Open ERP (Assistant de "
+"vérification).\n"
+"\n"
+"Créer par l'utilisateur __user__"
+
+#. module: smtpclient
+#: selection:res.company.address,name:0
+msgid "Invoice"
+msgstr "Facture"
+
+#. module: smtpclient
+#: wizard_view:email.verifycode,init:0
+#: wizard_button:email.verifycode,init,check:0
+msgid "Verify Code"
+msgstr "Code de vérification"
+
+#. module: smtpclient
+#: wizard_button:email.sendcode,init,end:0
+#: wizard_button:email.testemail,init,end:0
+#: wizard_button:email.verifycode,init,end:0
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: smtpclient
+#: field:email.smtpclient,delete_queue_period:0
+msgid "Delete after"
+msgstr "Effacer après"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "Server is not Verified, Please Verify the Server !"
+msgstr "Le serveur n'est pas vérifié, merci de vérifier le serveur!"
+
+#. module: smtpclient
+#: field:email.smtpclient.history,resource_id:0
+msgid "Resource ID"
+msgstr "ID de la ressource"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "SMTP Data Error !"
+msgstr "Erreur de données SMTP !"
+
+#. module: smtpclient
+#: constraint:ir.model:0
+msgid ""
+"The Object name must start with x_ and not contain any special character !"
+msgstr ""
+"Le nom de l'objet doit commencer par x_ et ne doit pas contenir de "
+"caractères spéciaux !"
+
+#. module: smtpclient
+#: selection:email.smtpclient,delete_queue:0
+msgid "Delete when Email Sent"
+msgstr "Effacer une fois l'email envoyé"
+
+#. module: smtpclient
+#: selection:email.smtpclient,type:0
+msgid "Account"
+msgstr "Compte"
+
+#. module: smtpclient
+#: model:ir.module.module,description:smtpclient.module_meta_information
+msgid ""
+"Email Client module that provides:\n"
+" Sending Email\n"
+" Use Multiple Server\n"
+" Multi Threading\n"
+" Multi Attachment\n"
+" "
+msgstr ""
+"Module de client email qui permet d' :\n"
+" Envoyer des emails\n"
+" Utiliser plusieurs serveurs\n"
+" Utiliser plusieurs files d'envoi (multi-threading)\n"
+" Envoyer plusieurs fichiers attachés\n"
+" "
+
+#. module: smtpclient
+#: selection:email.smtpclient,type:0
+msgid "Stock"
+msgstr "Stock"
+
+#. module: smtpclient
+#: field:email.smtpclient.history,name:0
+msgid "Description"
+msgstr "Description"
+
+#. module: smtpclient
+#: field:email.smtpclient,code:0
+#: wizard_field:email.verifycode,init,code:0
+msgid "Verification Code"
+msgstr "Code de vérifcation"
+
+#. module: smtpclient
+#: selection:email.smtpclient,pstate:0
+msgid "Stop"
+msgstr "Arrêter"
+
+#. module: smtpclient
+#: field:email.smtpclient.queue,body:0
+msgid "Email Text"
+msgstr "Texte de l'email"
+
+#. module: smtpclient
+#: selection:res.company.address,name:0
+msgid "Delivery"
+msgstr "Livraison"
+
+#. module: smtpclient
+#: selection:email.smtpclient,pstate:0
+msgid "Running"
+msgstr "En cours"
+
+#. module: smtpclient
+#: view:email.smtpclient.queue:0
+msgid "Last Error occured"
+msgstr "Dernière erreur apparu"
+
+#. module: smtpclient
+#: selection:email.smtpclient,state:0
+msgid "Waiting for Verification"
+msgstr "En attente de vérification"
+
+#. module: smtpclient
+#: field:email.smtpclient,password:0
+msgid "Password"
+msgstr "Mot de passe"
+
+#. module: smtpclient
+#: field:email.smtpclient,users_id:0
+msgid "Users Allowed"
+msgstr "Utilisateurs authorisés"
+
+#. module: smtpclient
+#: code:addons/smtpclient/wizard/sendcode.py:0
+#, python-format
+msgid "Verification Code Already Generated !"
+msgstr "Génération du code de vérification déjà effectuée!"
+
+#. module: smtpclient
+#: wizard_field:email.sendcode,init,emailto:0
+#: field:email.smtpclient,email:0
+#: wizard_field:email.testemail,init,emailto:0
+#: view:res.company:0
+#: field:res.company.address,email:0
+msgid "Email Address"
+msgstr "Adresse courriel"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Verification Message"
+msgstr "Message de vérification"
+
+#. module: smtpclient
+#: view:email.smtpclient:0
+msgid "Stop Server"
+msgstr "Arrêter le serveur"
+
+#. module: smtpclient
+#: model:ir.ui.menu,name:smtpclient.menu_smtpclient_administration_server
+msgid "Email Servers"
+msgstr "Serveurs email"
+
+#. module: smtpclient
+#: model:ir.actions.wizard,name:smtpclient.wizard_email_sendcode
+msgid "Send Verification Code"
+msgstr "Envoyer le code de vérification"
+
+#. module: smtpclient
+#: field:email.smtpclient.history,model:0
+msgid "Model"
+msgstr "Modèle"
+
+#. module: smtpclient
+#: model:ir.actions.act_window,name:smtpclient.action_email_smtpclient_tree
+#: field:ir.actions.server,email_server:0
+msgid "Email Server"
+msgstr "Serveur de couriel"
+
+#. module: smtpclient
+#: code:addons/smtpclient/smtpclient.py:0
+#, python-format
+msgid "Permission Error!"
+msgstr "Erreur de permission !"
+
+#. module: smtpclient
+#: model:ir.model,name:smtpclient.model_res_company_address
+msgid "res.company.address"
+msgstr "res.company.address"
+
+#. module: smtpclient
+#: field:email.smtpclient.queue,state:0
+msgid "Message Status"
+msgstr "État du message"
diff --git a/addons/stock/i18n/fr.po b/addons/stock/i18n/fr.po
index 6b82ef00f96..26c85ca75c7 100644
--- a/addons/stock/i18n/fr.po
+++ b/addons/stock/i18n/fr.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-05-20 06:22+0000\n"
-"Last-Translator: Olivier (Open ERP) \n"
+"PO-Revision-Date: 2010-05-21 10:35+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-05-21 03:37+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock
@@ -66,7 +66,7 @@ msgstr "Nom de modèle non valide dans la définition de l'action."
#: model:ir.module.module,shortdesc:stock.module_meta_information
#: model:ir.ui.menu,name:stock.menu_stock_root
msgid "Inventory Management"
-msgstr ""
+msgstr "Gestion des inventaires"
#. module: stock
#: selection:stock.location,icon:0
@@ -86,7 +86,7 @@ msgstr "STOCK_MEDIA_FORWARD"
#. module: stock
#: rml:lot.location:0
msgid "Total :"
-msgstr ""
+msgstr "Total :"
#. module: stock
#: selection:stock.location,icon:0
@@ -300,7 +300,7 @@ msgstr "Commande(Origine)"
#: rml:lot.stock.overview:0
#: rml:lot.stock.overview_all:0
msgid "Grand Total:"
-msgstr ""
+msgstr "Total:"
#. module: stock
#: view:stock.location:0
@@ -744,7 +744,7 @@ msgstr "Depuis"
#. module: stock
#: rml:stock.picking.list:0
msgid "weight"
-msgstr ""
+msgstr "poids"
#. module: stock
#: rml:stock.picking.list:0
@@ -1391,7 +1391,7 @@ msgstr "État de la facturation"
#. module: stock
#: rml:lot.location:0
msgid "Units"
-msgstr ""
+msgstr "Unités"
#. module: stock
#: selection:stock.location,icon:0
@@ -1641,7 +1641,7 @@ msgstr "Incoterms"
#: rml:lot.stock.overview:0
#: rml:lot.stock.overview_all:0
msgid "Total:"
-msgstr ""
+msgstr "Total:"
#. module: stock
#: selection:stock.location,icon:0
@@ -2275,6 +2275,8 @@ msgid ""
"Scheduled date for the movement of the products or real date if the move is "
"done."
msgstr ""
+"Date prévisionnelle pour le mouvement du produit ou la date réelle si le "
+"mouvement est terminé."
#. module: stock
#: view:stock.picking:0
diff --git a/addons/stock/i18n/pl.po b/addons/stock/i18n/pl.po
index 942cb5d0730..a4406384e8e 100644
--- a/addons/stock/i18n/pl.po
+++ b/addons/stock/i18n/pl.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-02-26 17:56+0000\n"
+"PO-Revision-Date: 2010-05-21 08:22+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 03:56+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock
@@ -126,7 +126,7 @@ msgstr "Przyjmowanie produktów"
#: field:stock.picking,name:0
#: field:stock.tracking,serial:0
msgid "Reference"
-msgstr "Odnośnik"
+msgstr "Numer"
#. module: stock
#: wizard_field:stock.invoice_onshipping,init,group:0
diff --git a/addons/stock_invoice_directly/i18n/fr.po b/addons/stock_invoice_directly/i18n/fr.po
index 3467771b8bb..a7092e8621f 100644
--- a/addons/stock_invoice_directly/i18n/fr.po
+++ b/addons/stock_invoice_directly/i18n/fr.po
@@ -7,16 +7,16 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2009-09-08 14:34+0000\n"
-"Last-Translator: Fabien (Open ERP) \n"
+"PO-Revision-Date: 2010-05-21 10:33+0000\n"
+"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-04-17 04:20+0000\n"
+"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock_invoice_directly
#: model:ir.module.module,shortdesc:stock_invoice_directly.module_meta_information
msgid "Invoice Picking Directly"
-msgstr ""
+msgstr "Facture la livraison directement"