diff --git a/__tryton__.py b/__tryton__.py index e18aa8ad88..c502d17ae9 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': 'Stock Management', 'version': '0.1', @@ -10,7 +11,7 @@ 'depends': [ 'ir', 'workflow', - 'relationship', + 'party', 'product', 'company', 'currency', diff --git a/location.py b/location.py index 8d12ef36d7..39218f3091 100644 --- a/location.py +++ b/location.py @@ -17,7 +17,7 @@ class Location(OSV): name = fields.Char("Name", size=None, required=True, states=STATES) code = fields.Char("Code", size=None, states=STATES, select=1) active = fields.Boolean('Active', select=1) - address = fields.Many2One("relationship.address", "Address", + address = fields.Many2One("party.address", "Address", states={ 'invisible': "type != 'warehouse'", 'readonly': "not active", @@ -131,7 +131,7 @@ Location() class Party(OSV): - _name = 'relationship.party' + _name = 'party.party' supplier_location = fields.Property(type='many2one', relation='stock.location', string='Supplier Location', group_name='Stock Properties', view_load=True, diff --git a/location.xml b/location.xml index 15fc831b46..4277f2593a 100644 --- a/location.xml +++ b/location.xml @@ -1,5 +1,6 @@ - + @@ -187,14 +188,14 @@ supplier_location customer_location diff --git a/packing.py b/packing.py index efae89bda2..59411547a9 100644 --- a/packing.py +++ b/packing.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. "Packing" from trytond.osv import fields, OSV from trytond.netsvc import LocalService @@ -22,11 +23,11 @@ class PackingIn(OSV): reference = fields.Char( "Reference", size=None, select=1, states={'readonly': "state != 'draft'",}) - supplier = fields.Many2One('relationship.party', 'Supplier', + supplier = fields.Many2One('party.party', 'Supplier', states={ 'readonly': "state != 'draft' or bool(incoming_moves)", }, on_change=['supplier'], required=True) - contact_address = fields.Many2One('relationship.address', 'Contact Address', + contact_address = fields.Many2One('party.address', 'Contact Address', states={ 'readonly': "state != 'draft'", }, domain="[('party', '=', supplier)]") @@ -86,7 +87,7 @@ class PackingIn(OSV): def on_change_supplier(self, cursor, user, ids, values, context=None): if not values.get('supplier'): return {} - party_obj = self.pool.get("relationship.party") + party_obj = self.pool.get("party.party") address_id = party_obj.address_get(cursor, user, values['supplier'], context=context) return {'contact_address': address_id} @@ -269,11 +270,11 @@ class PackingOut(OSV): states={ 'readonly': "state != 'draft'", }) - customer = fields.Many2One('relationship.party', 'Customer', required=True, + customer = fields.Many2One('party.party', 'Customer', required=True, states={ 'readonly': "state != 'draft'", }, on_change=['customer']) - delivery_address = fields.Many2One('relationship.address', + delivery_address = fields.Many2One('party.address', 'Delivery Address', required=True, states={ 'readonly': "state != 'draft'", @@ -327,7 +328,7 @@ class PackingOut(OSV): def on_change_customer(self, cursor, user, ids, values, context=None): if not values.get('customer'): return {} - party_obj = self.pool.get("relationship.party") + party_obj = self.pool.get("party.party") address_id = party_obj.address_get(cursor, user, values['customer'], type='delivery', context=context) party = party_obj.browse(cursor, user, values['customer'], context=context) @@ -751,8 +752,9 @@ class PackingInternal(OSV): PackingInternal() + class Address(OSV): - _name = 'relationship.address' + _name = 'party.address' delivery = fields.Boolean('Delivery') Address() diff --git a/packing.xml b/packing.xml index c49e7ab476..b9e8529d0d 100644 --- a/packing.xml +++ b/packing.xml @@ -1,5 +1,6 @@ - + @@ -801,8 +802,8 @@ - relationship.address - + party.address + @@ -815,8 +816,8 @@ - relationship.address - + party.address + diff --git a/packing_out.odt b/packing_out.odt index 0f1d969f9a..b774e2f680 100644 Binary files a/packing_out.odt and b/packing_out.odt differ