diff --git a/__tryton__.py b/__tryton__.py
index 1f729ff876..baafeb7eb5 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -1,4 +1,5 @@
-#This file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms.
+#This file is part of Tryton. The COPYRIGHT file at the top level of
+#this repository contains the full copyright notices and license terms.
{
'name': 'Account Invoice',
'version': '0.1',
@@ -11,7 +12,7 @@
'ir',
'account',
'company',
- 'relationship',
+ 'party',
'product',
'res',
'workflow',
diff --git a/invoice.odt b/invoice.odt
index 3c29273893..fd89f7d454 100644
Binary files a/invoice.odt and b/invoice.odt differ
diff --git a/invoice.py b/invoice.py
index 34f769c6b6..b3c571fcd4 100644
--- a/invoice.py
+++ b/invoice.py
@@ -252,12 +252,12 @@ class Invoice(OSV):
], 'State', readonly=True)
invoice_date = fields.Date('Invoice Date', required=True,
states=_STATES)
- party = fields.Many2One('relationship.party', 'Party', change_default=True,
+ party = fields.Many2One('party.party', 'Party', change_default=True,
required=True, states=_STATES, on_change=['party', 'payment_term',
'type', 'company'])
- contact_address = fields.Many2One('relationship.address', 'Contact Address',
+ contact_address = fields.Many2One('party.address', 'Contact Address',
required=True, states=_STATES, domain="[('party', '=', party)]")
- invoice_address = fields.Many2One('relationship.address', 'Invoice Address',
+ invoice_address = fields.Many2One('party.address', 'Invoice Address',
required=True, states=_STATES, domain="[('party', '=', party)]")
currency = fields.Many2One('currency.currency', 'Currency', required=True,
states={
@@ -407,8 +407,8 @@ class Invoice(OSV):
return res
def on_change_party(self, cursor, user, ids, vals, context=None):
- party_obj = self.pool.get('relationship.party')
- address_obj = self.pool.get('relationship.address')
+ party_obj = self.pool.get('party.party')
+ address_obj = self.pool.get('party.address')
account_obj = self.pool.get('account.account')
payment_term_obj = self.pool.get('account.invoice.payment_term')
company_obj = self.pool.get('company.company')
@@ -696,7 +696,7 @@ class Invoice(OSV):
return True
def get_tax_context(self, cursor, user, invoice, context=None):
- party_obj = self.pool.get('relationship.party')
+ party_obj = self.pool.get('party.party')
res = {}
if isinstance(invoice, dict):
if invoice.get('party'):
@@ -1407,7 +1407,7 @@ class InvoiceLine(OSV):
def on_change_product(self, cursor, user, ids, vals, context=None):
product_obj = self.pool.get('product.product')
- party_obj = self.pool.get('relationship.party')
+ party_obj = self.pool.get('party.party')
account_obj = self.pool.get('account.account')
uom_obj = self.pool.get('product.uom')
company_obj = self.pool.get('company.company')
@@ -1922,14 +1922,14 @@ InvoiceReport()
class Address(OSV):
- _name = 'relationship.address'
+ _name = 'party.address'
invoice = fields.Boolean('Invoice')
Address()
class Party(OSV):
- _name = 'relationship.party'
+ _name = 'party.party'
payment_term = fields.Property(type='many2one',
relation='account.invoice.payment_term',
string='Invoice Payment Term', group_name='Accounting Properties',
diff --git a/invoice.xml b/invoice.xml
index 51f3871bb3..a15983e34d 100644
--- a/invoice.xml
+++ b/invoice.xml
@@ -646,8 +646,8 @@ this repository contains the full copyright notices and license terms. -->
- relationship.address
-
+ party.address
+
@@ -660,8 +660,8 @@ this repository contains the full copyright notices and license terms. -->
- relationship.address
-
+ party.address
+