I needed those fields for the anglo-saxon stock accounting so I thought it
will be good to have it in the base purchase module.

Please review this at http://codereview.appspot.com/3539042/

Affected files:
  M __init__.py
  A invoice.py


Index: __init__.py
===================================================================
--- a/__init__.py
+++ b/__init__.py
@@ -3,3 +3,4 @@

 from purchase import *
 from configuration import *
+from invoice import *
Index: invoice.py
===================================================================
new file mode 100644
--- /dev/null
+++ b/invoice.py
@@ -0,0 +1,21 @@
+#This file is part of Tryton.  The COPYRIGHT file at the top level of
+#this repository contains the full copyright notices and license terms.
+from trytond.model import ModelView, ModelSQL, fields
+
+
+class Invoice(ModelSQL, ModelView):
+    _name = 'account.invoice'
+
+    purchases = fields.Many2Many('purchase.purchase-account.invoice',
+            'invoice', 'purchase', 'Purchases', readonly=True)
+
+Invoice()
+
+
+class InvoiceLine(ModelSQL, ModelView):
+    _name = 'account.invoice.line'
+
+    purchase_lines = fields.Many2Many('purchase.line-account.invoice.line',
+            'invoice_line', 'purchase_line', 'Purchase Lines',
readonly=True)
+
+InvoiceLine()



-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpqZdh1qK5Ym.pgp
Description: PGP signature

Reply via email to