Rename relationship into party
This commit is contained in:
1 parent
658dec6c36
commit
c604b5fa7f
4 files changed
+16
-15
No files matched your search
+3
-2
@@ -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',
|
||||
|
||||
BIN
Binary file not shown.
+9
-9
@@ -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',
|
||||
|
||||
+4
-4
@@ -646,8 +646,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="address_view_tree">
|
||||
<field name="model">relationship.address</field>
|
||||
<field name="inherit" ref="relationship.address_view_tree"/>
|
||||
<field name="model">party.address</field>
|
||||
<field name="inherit" ref="party.address_view_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<![CDATA[
|
||||
<data>
|
||||
@@ -660,8 +660,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="address_view_form">
|
||||
<field name="model">relationship.address</field>
|
||||
<field name="inherit" ref="relationship.address_view_form"/>
|
||||
<field name="model">party.address</field>
|
||||
<field name="inherit" ref="party.address_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<![CDATA[
|
||||
<data>
|
||||
|
||||
Reference in new issue
Block a user