diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index 9039f00381c..c81f6040a3d 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -29,7 +29,7 @@
+
+
+
+ hr_evaluation.plan.form
+ hr_evaluation.plan
+ tree
+
+
+
+
+
+
+
+
+
+
+ hr_evaluation.plan
+ form
+ tree,form
+
+
+
+
-
- hr_evaluation.plan.phase.form
- hr_evaluation.plan.phase
- form
-
-
-
-
-
- hr_evaluation.plan.phase.form
- hr_evaluation.plan.phase
- tree
-
-
-
-
-
-
-
-
-
-
+
+ hr_evaluation.plan.phase.form
+ hr_evaluation.plan.phase
+ form
+
+
+
+
+
+ hr_evaluation.plan.phase.form
+ hr_evaluation.plan.phase
+ tree
+
+
+
+
+
+
+
+
+
+
-
+
hr.hr.employee.view.form
hr.employee
-
-
+
+
- hr_evaluation.evaluation.form
- hr_evaluation.evaluation
- form
-
-
+ hr_evaluation.evaluation
+ form
+
+
-
-
-
- hr_evaluation.evaluation.form
- hr_evaluation.evaluation
- tree
-
-
-
-
-
-
-
-
- hr_evaluation.evaluation
- form
- tree,form
-
-
+
+
+
+ hr_evaluation.evaluation.tree
+ hr_evaluation.evaluation
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hr_evaluation.evaluation
+ form
+ tree,form
+
+
-
- hr_evaluation.interview.form
- hr.evaluation.interview
- form
-
+
+ hr_evaluation.interview.form
+ hr.evaluation.interview
+ form
+
-
-
-
- hr_evaluation.interview.tree
- hr.evaluation.interview
- tree
-
-
+
+
+
+ hr_evaluation.interview.tree
+ hr.evaluation.interview
+ tree
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
- hr.evaluation.interview
- form
- tree,form
-
+
+ hr.evaluation.interview
+ form
+ tree,form
+
-
+
-
+
diff --git a/addons/sale/report_sale_view.xml b/addons/sale/report_sale_view.xml
index 286a529cf82..30816750035 100644
--- a/addons/sale/report_sale_view.xml
+++ b/addons/sale/report_sale_view.xml
@@ -1,89 +1,6 @@
-
- report.sale.order.tree
- sale.order
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sale Orders By Partner
- sale.order
- form
- graph,tree
- {'report':True}
- [('date_order','>=',time.strftime('%Y-%m-01')),('state','<>','draft'),('state','<>','cancel')]
-
-
-
-
- tree
-
-
-
-
-
- graph
-
-
-
-
-
-
-
- report.sale.order.line.tree
- sale.order.line
- tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sale Orders by Product
- sale.order.line
- form
- graph,tree
- {'report':True}
- [('product_uom_qty','!=','0')]
-
-
-
-
- tree
-
-
-
-
-
- graph
-
-
-
-
-
-
+
+
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index a9d0935fc76..0c0542d6747 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -197,7 +197,8 @@ class sale_order(osv.osv):
('cancel', 'Cancelled')
], 'Order State', readonly=True, help="Gives the state of the quotation or sale order. The exception state is automatically set when a cancel operation occurs in the invoice validation (Invoice Exception) or in the picking list process (Shipping Exception). The 'Waiting Schedule' state is set when the invoice is confirmed but waiting for the scheduler to run on the date 'Ordered Date'.", select=True),
'date_order': fields.date('Ordered Date', required=True, readonly=True, states={'draft': [('readonly', False)]}),
-
+ 'create_date': fields.date('Creation Date', readonly=True),
+ 'date_confirm': fields.date('Confirmation Date', readonly=True),
'user_id': fields.many2one('res.users', 'Salesman', states={'draft': [('readonly', False)]}, select=True),
'partner_id': fields.many2one('res.partner', 'Customer', readonly=True, states={'draft': [('readonly', False)]}, required=True, change_default=True, select=True),
'partner_invoice_id': fields.many2one('res.partner.address', 'Invoice Address', readonly=True, required=True, states={'draft': [('readonly', False)]}),
@@ -361,10 +362,10 @@ class sale_order(osv.osv):
def button_dummy(self, cr, uid, ids, context={}):
return True
-#FIXME: the method should return the list of invoices created (invoice_ids)
-# and not the id of the last invoice created (res). The problem is that we
-# cannot change it directly since the method is called by the sale order
-# workflow and I suppose it expects a single id...
+ #FIXME: the method should return the list of invoices created (invoice_ids)
+ # and not the id of the last invoice created (res). The problem is that we
+ # cannot change it directly since the method is called by the sale order
+ # workflow and I suppose it expects a single id...
def _inv_get(self, cr, uid, order, context={}):
return {}
@@ -522,9 +523,9 @@ class sale_order(osv.osv):
'partner_type': 'customer', 'probability': 1.0,\
'planned_revenue': o.amount_untaxed})
if (o.order_policy == 'manual'):
- self.write(cr, uid, [o.id], {'state': 'manual'})
+ self.write(cr, uid, [o.id], {'state': 'manual', 'date_confirm': time.strftime('%Y-%m-%d')})
else:
- self.write(cr, uid, [o.id], {'state': 'progress'})
+ self.write(cr, uid, [o.id], {'state': 'progress', 'date_confirm': time.strftime('%Y-%m-%d')})
self.pool.get('sale.order.line').button_confirm(cr, uid, [x.id for x in o.order_line])
def procurement_lines_get(self, cr, uid, ids, *args):
diff --git a/addons/sale/sale_report.py b/addons/sale/sale_report.py
index 442b3588ade..2f387ee3883 100644
--- a/addons/sale/sale_report.py
+++ b/addons/sale/sale_report.py
@@ -35,13 +35,13 @@ class sale_report(osv.osv):
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'product_id':fields.many2one('product.product', 'Product', readonly=True),
- 'product_uom':fields.many2one('product.uom', 'UoM', readonly=True),
'product_qty':fields.float('Qty', readonly=True),
'partner_id':fields.many2one('res.partner', 'Partner', readonly=True),
'shop_id':fields.many2one('sale.shop', 'Shop', readonly=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'Salesman', readonly=True),
'price_total':fields.float('Total Price', readonly=True),
+ 'delay':fields.float('Avg Closing Days', digits=(16,2), readonly=True),
'price_average':fields.float('Average Price', readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'state': fields.selection([
@@ -71,6 +71,7 @@ class sale_report(osv.osv):
s.user_id as user_id,
s.shop_id as shop_id,
s.company_id as company_id,
+ extract(epoch from avg(s.date_confirm-s.create_date))/(24*60*60)::decimal(16,2) as delay,
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,
diff --git a/addons/sale/sale_report_view.xml b/addons/sale/sale_report_view.xml
index 418060834c3..3592cda4662 100644
--- a/addons/sale/sale_report_view.xml
+++ b/addons/sale/sale_report_view.xml
@@ -16,6 +16,7 @@
+
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index e48d59d1f4a..f319e04c1d8 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -204,15 +204,29 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -243,7 +257,7 @@
-
+
diff --git a/addons/sale/sale_workflow.xml b/addons/sale/sale_workflow.xml
index 6a7e7b6a8ee..213605929ba 100644
--- a/addons/sale/sale_workflow.xml
+++ b/addons/sale/sale_workflow.xml
@@ -58,7 +58,6 @@
stopall
action_cancel()
-
invoice
@@ -85,7 +84,6 @@
stopall
action_cancel()
-
ship
diff --git a/addons/survey/survey.py b/addons/survey/survey.py
index ccd3e3d28f4..9e4aad1ff7f 100644
--- a/addons/survey/survey.py
+++ b/addons/survey/survey.py
@@ -1580,7 +1580,7 @@ class survey_request(osv.osv):
'email' : fields.char("E-mail", size=64),
'survey_id' : fields.many2one("survey", "Survey", required=1),
'response' : fields.many2one('survey.response', 'Answer'),
- 'state' : fields.selection([('waiting_answer', 'Wating Answer'),('done', 'Done'),('cancel', 'Cancelled')], 'State', readonly=1)
+ 'state' : fields.selection([('draft','Draft'),('waiting_answer', 'Wating Answer'),('done', 'Done'),('cancel', 'Cancelled')], 'State', readonly=1)
}
_defaults = {
'state' : lambda * a: 'waiting_answer',
@@ -1642,4 +1642,4 @@ class survey_print_answer(osv.osv_memory):
survey_print_answer()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: