diff --git a/__tryton__.py b/__tryton__.py index e18aa8ad88..e5211bf95b 100644 --- a/__tryton__.py +++ b/__tryton__.py @@ -1,7 +1,8 @@ -#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', + 'version': '0.0.1', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/', @@ -10,7 +11,7 @@ 'depends': [ 'ir', 'workflow', - 'relationship', + 'party', 'product', 'company', 'currency', diff --git a/de_DE.csv b/de_DE.csv index 900dd27c67..e67e5a6cd6 100644 --- a/de_DE.csv +++ b/de_DE.csv @@ -13,11 +13,11 @@ error,stock.packing.in,0,Incoming Moves must have input location as destination error,stock.packing.in,0,Inventory Moves must have input location as source location!,Lagerbewegungen müssen einen Lagerort vom Typ eingehend als Herkunft haben!,0 error,stock.packing.in,0,Inventory Moves must have output location as destination location!,Lagerbewegungen müssen einen Lagerort vom Typ ausgehend als Herkunft haben! ,0 error,stock.packing.in,0,Outgoing Moves must have output location as source location!,Ausgehende Bewegungen müssen einen Lagerort vom Typ ausgehend als Herkunft haben! ,0 +field,"party.address,delivery",0,Delivery,Lieferadresse,0 +field,"party.party,customer_location",0,Customer Location,Lagerort Kunde,0 +field,"party.party,supplier_location",0,Supplier Location,Lagerort Lieferant,0 field,"product.product,forecast_quantity",0,Forecast Quantity,Voraussichtliche Menge,0 field,"product.product,quantity",0,Quantity,Menge,0 -field,"relationship.address,delivery",0,Delivery,Lieferadresse,0 -field,"relationship.party,customer_location",0,Customer Location,Lagerort Kunde,0 -field,"relationship.party,supplier_location",0,Supplier Location,Lagerort Lieferant,0 field,"stock.inventory,company",0,Company,Unternehmen,0 field,"stock.inventory,date",0,Date,Datum,0 field,"stock.inventory.line,expected_quantity",0,Expected Quantity,Erwartete Menge,0 @@ -93,8 +93,8 @@ field,"stock.packing.out,reference",0,Reference,Referenz,0 field,"stock.packing.out,state",0,State,Status,0 field,"stock.packing.out,warehouse",0,Warehouse,Warenlager,0 field,"stock.product_stock_date.init,forecast_date",0,At Date,Am,0 -help,"relationship.party,customer_location",0,The default destination location when sending products to the party.,Standardbestimmungsort für Sendungen zum Geschäftspartner,0 -help,"relationship.party,supplier_location",0,The default source location when receiving products from the party.,Standardbestimmungsort für Sendungen vom Geschäftspartner,0 +help,"party.party,customer_location",0,The default destination location when sending products to the party.,Standardbestimmungsort für Sendungen zum Geschäftspartner,0 +help,"party.party,supplier_location",0,The default source location when receiving products from the party.,Standardbestimmungsort für Sendungen vom Geschäftspartner,0 help,"stock.location_stock_date.init,forecast_date",0,"Allow to compute expected stock quantities for this date. * An empty value is an infinite date in the future. * A date in the past will provide historical values.","Berechnet den erwarteten Lagerbestand für dieses Datum @@ -153,11 +153,9 @@ model,"ir.ui.menu,name",menu_packing_in_received,Received Supplier packings,Erha model,"ir.ui.menu,name",menu_packing_in_form,Supplier Packings,Lieferscheine von Lieferanten,0 odt,stock.packing.out,0,Customer Code:,Kundennummer:,0 odt,stock.packing.out,0,Date:,Datum:,0 -odt,stock.packing.out,0,Email:,E-Mail:,0 odt,stock.packing.out,0,List,Liste,0 odt,stock.packing.out,0,Packing,Lieferschein,0 odt,stock.packing.out,0,Packing Number:,Lieferscheinnummer:,0 -odt,stock.packing.out,0,Phone:,Telefon:,0 odt,stock.packing.out,0,Product,Artikel,0 odt,stock.packing.out,0,Quantity,Menge,0 odt,stock.packing.out,0,Reference:,Referenz,0 @@ -212,26 +210,32 @@ view,stock.move,0,Moves,Bewegungen,0 view,stock.move,0,Set Done,Auf Erledigt setzen,0 view,stock.move,0,Set Draft,Auf Entwurf setzen,0 view,stock.packing.in,0,Cancel,Abbrechen,0 +view,stock.packing.in,0,Done,Erledigt,0 +view,stock.packing.in,0,Draft,Entwurf,0 view,stock.packing.in,0,Incoming Moves,Eingehende Bewegungen,0 view,stock.packing.in,0,Inventory Moves,Lagerbewegungen,0 view,stock.packing.in,0,Moves,Bewegungen,0 view,stock.packing.in,0,Received,Erhalten,0 view,stock.packing.in,0,Reset to Draft,Auf Entwurf zurücksetzen,0 -view,stock.packing.in,0,Set Done,Auf Erledigt setzen,0 view,stock.packing.in,0,Supplier Packing,Lieferschein von Lieferant,0 view,stock.packing.in,0,Supplier Packings,Lieferscheine von Lieferanten,0 view,stock.packing.internal,0,Assign,Zuweisen,0 view,stock.packing.internal,0,Cancel,Abbrechen,0 +view,stock.packing.internal,0,Done,Erledigt,0 +view,stock.packing.internal,0,Draft,Entwurf,0 view,stock.packing.internal,0,Force Assign,Zuweisung erzwingen,0 view,stock.packing.internal,0,Internal Packing,Interner Lieferschein,0 view,stock.packing.internal,0,Internal Packings,Interne Lieferscheine,0 view,stock.packing.internal,0,Reset to Draft,Auf Entwurf zurücksetzen,0 view,stock.packing.internal,0,Set Done,Auf Erledigt setzen,0 view,stock.packing.internal,0,Set Waiting,Auf Wartend setzen,0 +view,stock.packing.internal,0,Waiting,Wartend,0 view,stock.packing.out,0,Assign,Zuweisen,0 view,stock.packing.out,0,Cancel,Abbrechen,0 view,stock.packing.out,0,Customer Packing,Lieferschein an Kunde,0 view,stock.packing.out,0,Customer Packings,Lieferscheine an Kunden,0 +view,stock.packing.out,0,Done,Erledigt,0 +view,stock.packing.out,0,Draft,Entwurf,0 view,stock.packing.out,0,Force Assign,Zuweisung erzwingen,0 view,stock.packing.out,0,Inventory Moves,Lagerbewegungen,0 view,stock.packing.out,0,Make packing,Lieferung fertigstellen,0 @@ -239,6 +243,8 @@ view,stock.packing.out,0,Outgoing Moves,Ausgehende Bewegungen,0 view,stock.packing.out,0,Reset to Draft,Auf Entwurf zurücksetzen,0 view,stock.packing.out,0,Set Done,Auf Erledigt setzen,0 view,stock.packing.out,0,Set Waiting,Auf Wartend setzen,0 +view,stock.packing.out,0,Unpack,Entpackt,0 +view,stock.packing.out,0,Waiting,Wartend,0 wizard_button,"stock.location.open,init,end",0,Cancel,Abbrechen,0 wizard_button,"stock.location.open,init,open",0,Open,Öffnen,0 wizard_button,"stock.product.open,init,end",0,Cancel,Abbrechen,0 diff --git a/es_ES.csv b/es_ES.csv index 44cfd31982..e5720d14fc 100644 --- a/es_ES.csv +++ b/es_ES.csv @@ -15,9 +15,9 @@ error,stock.packing.in,0,Inventory Moves must have output location as destinatio error,stock.packing.in,0,Outgoing Moves must have output location as source location!,Los Movimientos de Salida deben tener tanto lugar de salida como origen!,0 field,"product.product,forecast_quantity",0,Forecast Quantity,Cantidad Pronosticada,0 field,"product.product,quantity",0,Quantity,Cantidad,0 -field,"relationship.address,delivery",0,Delivery,Envío,0 -field,"relationship.party,customer_location",0,Customer Location,Lugar del Cliente,0 -field,"relationship.party,supplier_location",0,Supplier Location,Lugar del Proveedor,0 +field,"party.address,delivery",0,Delivery,Envío,0 +field,"party.party,customer_location",0,Customer Location,Lugar del Cliente,0 +field,"party.party,supplier_location",0,Supplier Location,Lugar del Proveedor,0 field,"stock.inventory,company",0,Company,Compañía,0 field,"stock.inventory,date",0,Date,Fecha,0 field,"stock.inventory.line,expected_quantity",0,Expected Quantity,Cantidad Esperada,0 @@ -93,8 +93,8 @@ field,"stock.packing.out,reference",0,Reference,Referencia,0 field,"stock.packing.out,state",0,State,Estado,0 field,"stock.packing.out,warehouse",0,Warehouse,Depósito,0 field,"stock.product_stock_date.init,forecast_date",0,At Date,En la fecha,0 -help,"relationship.party,customer_location",0,The default destination location when sending products to the party.,El lugar predeterminado destino cuando se envian productos al tercero.,0 -help,"relationship.party,supplier_location",0,The default source location when receiving products from the party.,El lugar origen predeterminado cuando se reciben productos del tercero.,0 +help,"party.party,customer_location",0,The default destination location when sending products to the party.,El lugar predeterminado destino cuando se envian productos al tercero.,0 +help,"party.party,supplier_location",0,The default source location when receiving products from the party.,El lugar origen predeterminado cuando se reciben productos del tercero.,0 help,"stock.location_stock_date.init,forecast_date",0,"Allow to compute expected stock quantities for this date. * An empty value is an infinite date in the future. * A date in the past will provide historical values.","Permitir calcular el inventario esperado para esta fecha. 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 21c180138b..88264103e9 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} @@ -274,11 +275,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'", @@ -332,7 +333,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) @@ -762,8 +763,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..34e6f12581 100644 --- a/packing.xml +++ b/packing.xml @@ -1,5 +1,6 @@ - + @@ -801,13 +802,13 @@ - relationship.address - + party.address + + expr="/tree/field[@name="active"]" position="after"> @@ -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 diff --git a/setup.py b/setup.py index c2c913bee3..c77ae0f30a 100644 --- a/setup.py +++ b/setup.py @@ -12,13 +12,17 @@ for dep in info.get('depends', []): match = re.compile( '(ir|res|workflow|webdav)((\s|$|<|>|<=|>=|==|!=).*?$)').match(dep) if match: - dep = 'trytond' + match.group(2) + continue else: dep = 'trytond_' + dep requires.append(dep) +major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2) +requires.append('trytond >= %s.%s' % (major_version, minor_version)) +requires.append('trytond < %s.%s' % (major_version, str(int(minor_version) + 1))) + setup(name='trytond_' + info['name'].lower(), - version=info.get('version', '0'), + version=info.get('version', '0.0.1'), description=info.get('description', ''), author=info.get('author', ''), author_email=info.get('email', ''),