diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 81834ebbdbf..cbe75dd56d3 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -171,9 +171,10 @@
+
-
+
@@ -183,11 +184,13 @@
+
+
+
-
-
+
@@ -261,19 +264,19 @@
domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -293,7 +296,8 @@
-
+
+
@@ -322,19 +326,19 @@
domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -345,15 +349,16 @@
search
-
+
-
+
+
@@ -377,7 +382,7 @@
- Purchase Lines not Invoiced
+ Purchase Lines Not Invoiced
ir.actions.act_window
purchase.order.line
[('state','in',('confirmed','done')), ('invoiced','=',False)]
diff --git a/addons/purchase/report/purchase_report.py b/addons/purchase/report/purchase_report.py
index 40a61efbc19..612ea134b4e 100644
--- a/addons/purchase/report/purchase_report.py
+++ b/addons/purchase/report/purchase_report.py
@@ -31,7 +31,7 @@ class purchase_report(osv.osv):
_description = "Purchases Orders"
_auto = False
_columns = {
- 'date': fields.date('Order Date', readonly=True),
+ 'date': fields.date('Order Date', readonly=True, help="Date on which this document has been created"),
'name': fields.char('Year',size=64,required=False, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'state': fields.selection([('draft', 'Request for Quotation'),
@@ -52,11 +52,12 @@ class purchase_report(osv.osv):
'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),
+ 'product_uom' : fields.many2one('product.uom', 'Product UoM', required=True),
'company_id':fields.many2one('res.company', 'Company', readonly=True),
'user_id':fields.many2one('res.users', 'Responsible', readonly=True),
'delay':fields.float('Days to Validate', digits=(16,2), readonly=True),
'delay_pass':fields.float('Days to Deliver', digits=(16,2), readonly=True),
- 'quantity': fields.float('# of Products', readonly=True),
+ 'quantity': fields.float('Quantity', readonly=True),
'price_total': fields.float('Total Price', readonly=True),
'price_average': fields.float('Average Price', readonly=True, group_operator="avg"),
'negociation': fields.float('Purchase-Standard Price', readonly=True, group_operator="avg"),
@@ -89,6 +90,7 @@ class purchase_report(osv.osv):
s.create_uid as user_id,
s.company_id as company_id,
l.product_id,
+ l.product_uom as product_uom,
s.location_id as location_id,
sum(l.product_qty*u.factor) as quantity,
extract(epoch from age(s.date_approve,s.date_order))/(24*60*60)::decimal(16,2) as delay,
@@ -114,6 +116,7 @@ class purchase_report(osv.osv):
l.price_unit,
s.date_approve,
l.date_planned,
+ l.product_uom,
date_trunc('day',s.minimum_planned_date),
s.partner_address_id,
s.pricelist_id,
diff --git a/addons/purchase/report/purchase_report_view.xml b/addons/purchase/report/purchase_report_view.xml
index b8831ed11e0..816efd65ac3 100644
--- a/addons/purchase/report/purchase_report_view.xml
+++ b/addons/purchase/report/purchase_report_view.xml
@@ -25,6 +25,7 @@
+
@@ -34,7 +35,7 @@
-
+
@@ -52,18 +53,18 @@
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
diff --git a/addons/purchase/wizard/purchase_order_group.py b/addons/purchase/wizard/purchase_order_group.py
index 8d2e17609e8..10bf55570cc 100644
--- a/addons/purchase/wizard/purchase_order_group.py
+++ b/addons/purchase/wizard/purchase_order_group.py
@@ -24,11 +24,29 @@ from osv import fields, osv
import netsvc
import pooler
from osv.orm import browse_record, browse_null
+from tools.translate import _
class purchase_order_group(osv.osv_memory):
_name = "purchase.order.group"
_description = "Purchase Order Merge"
-
+
+ def fields_view_get(self, cr, uid, view_id=None, view_type='form',
+ context=None, toolbar=False, submenu=False):
+ """
+ Changes the view dynamically
+ @param self: The object pointer.
+ @param cr: A database cursor
+ @param uid: ID of the user currently logged in
+ @param context: A standard dictionary
+ @return: New arch of view.
+ """
+ if not context:
+ context={}
+ res = super(purchase_order_group, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
+ if context.get('active_model','') == 'purchase.order' and len(context['active_ids']) < 2:
+ raise osv.except_osv(_('Warning'),
+ _('Please select multiple order to merge in the list view.'))
+ return res
def merge_orders(self, cr, uid, ids, context):
"""
To merge similar type of purchase orders.
diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py
index 13a760c9b87..1e0c4f06838 100644
--- a/addons/purchase_requisition/purchase_requisition.py
+++ b/addons/purchase_requisition/purchase_requisition.py
@@ -35,7 +35,7 @@ class purchase_requisition(osv.osv):
'date_start': fields.datetime('Requisition Date'),
'date_end': fields.datetime('Requisition Deadline'),
'user_id': fields.many2one('res.users', 'Responsible'),
- 'exclusive': fields.selection([('exclusive','Purchase Tender (exclusive)'),('multiple','Multiple Requisitions')],'Requisition Type', required=True, help="Purchase Tender (exclusive):On the confirmation of a purchase order, it cancels the remaining purchase order.Multiple Requisitions:It allows to have multiple purchase orders.On confirmation of a purchase order it does not cancel the remaining orders"""),
+ 'exclusive': fields.selection([('exclusive','Purchase Requisition (exclusive)'),('multiple','Multiple Requisitions')],'Requisition Type', required=True, help="Purchase Requisition (exclusive): On the confirmation of a purchase order, it cancels the remaining purchase order.\nPurchase Requisition(Multiple): It allows to have multiple purchase orders.On confirmation of a purchase order it does not cancel the remaining orders"""),
'description': fields.text('Description'),
'company_id': fields.many2one('res.company', 'Company', required=True),
'purchase_ids' : fields.one2many('purchase.order','requisition_id','Purchase Orders',states={'done': [('readonly', True)]}),
diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml
index eed99cefd6c..3daeab14881 100644
--- a/addons/purchase_requisition/purchase_requisition_view.xml
+++ b/addons/purchase_requisition/purchase_requisition_view.xml
@@ -21,7 +21,7 @@
purchase.order
-
+
@@ -102,10 +102,9 @@
tree
purchase.requisition
-
+
-
@@ -125,19 +124,20 @@
+
-
-
-
-
-
-
+
+
+
+
+
+
@@ -150,7 +150,7 @@
purchase.requisition
form
tree,form
- {"search_default_user_id":uid}
+ {"search_default_create_uid":uid,'search_default_draft': 1}
diff --git a/addons/purchase_requisition/wizard/purchase_requisition_partner_view.xml b/addons/purchase_requisition/wizard/purchase_requisition_partner_view.xml
index 6214c4fad51..d994ba71405 100644
--- a/addons/purchase_requisition/wizard/purchase_requisition_partner_view.xml
+++ b/addons/purchase_requisition/wizard/purchase_requisition_partner_view.xml
@@ -7,10 +7,10 @@
form