diff --git a/purchase.odt b/purchase.odt
new file mode 100644
index 0000000000..bc1e3eff21
Binary files /dev/null and b/purchase.odt differ
diff --git a/purchase.py b/purchase.py
index 32ff8c29c0..d5b1d555fd 100644
--- a/purchase.py
+++ b/purchase.py
@@ -4,6 +4,7 @@ from trytond.osv import fields, OSV
from decimal import Decimal
import datetime
from trytond.netsvc import LocalService
+from trytond.report import Report
_STATES = {
'readonly': "state != 'draft'",
@@ -686,6 +687,23 @@ class PurchaseLine(OSV):
PurchaseLine()
+class PurchaseReport(Report):
+ _name = 'purchase.purchase'
+
+ def parse(self, cursor, user_id, report, objects, datas, context):
+ user_obj = self.pool.get('res.user')
+
+ user = user_obj.browse(cursor, user_id, user_id, context)
+ if context is None:
+ context = {}
+ context = context.copy()
+ context['company'] = user.company
+
+ return super(PurchaseReport, self).parse(cursor, user_id, report,
+ objects, datas, context)
+PurchaseReport()
+
+
class Template(OSV):
_name = "product.template"
diff --git a/purchase.xml b/purchase.xml
index 41b65b99b3..7707f39744 100644
--- a/purchase.xml
+++ b/purchase.xml
@@ -142,6 +142,63 @@
+
+ Draft Purchases
+ purchase.purchase
+ form
+ [('state', '=', 'draft')]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Purchases in Quotation
+ purchase.purchase
+ form
+ [('state', '=', 'quotation')]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Confirmed Purchases
+ purchase.purchase
+ form
+ [('state', '=', 'confirmed')]
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -458,6 +515,19 @@
+
+ Purchase
+ purchase.purchase
+ purchase.purchase
+ purchase/purchase.odt
+ company/header_A4.odt
+
+
+ form_print
+ purchase.purchase,0
+
+
+
purchase.line
form