Skip to content
Browse files

added two additional fields to the account tables, as a result of the…

…se changes I started to use south
  • Loading branch information...
1 parent e418bdf commit a944adabf2392c38c170328875172a657fbf872e @scaphilo committed Dec 31, 2012
View
2 accounting/admin.py
@@ -66,7 +66,7 @@ def clean(self):
class OptionAccount(admin.ModelAdmin):
list_display = ('accountNumber', 'accountType', 'title', 'isopenreliabilitiesaccount', 'isopeninterestaccount', 'isProductInventoryActiva', 'isACustomerPaymentAccount', 'value')
list_display_links = ('accountNumber', 'accountType', 'title', 'value')
- fieldsets = ((_('Basic'), {'fields': ('accountNumber', 'accountType', 'title', 'isopenreliabilitiesaccount', 'isopeninterestaccount', 'isProductInventoryActiva', 'isACustomerPaymentAccount')}),)
+ fieldsets = ((_('Basic'), {'fields': ('accountNumber', 'accountType', 'title', 'description', 'originalAmount', 'isopenreliabilitiesaccount', 'isopeninterestaccount', 'isProductInventoryActiva', 'isACustomerPaymentAccount')}),)
save_as = True
form = AccountForm
View
233 accounting/migrations/0001_initial.py
@@ -0,0 +1,233 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding model 'AccountingPeriod'
+ db.create_table('accounting_accountingperiod', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('title', self.gf('django.db.models.fields.CharField')(max_length=200)),
+ ('begin', self.gf('django.db.models.fields.DateField')()),
+ ('end', self.gf('django.db.models.fields.DateField')()),
+ ))
+ db.send_create_signal('accounting', ['AccountingPeriod'])
+
+ # Adding model 'Account'
+ db.create_table('accounting_account', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('accountNumber', self.gf('django.db.models.fields.IntegerField')()),
+ ('title', self.gf('django.db.models.fields.CharField')(max_length=50)),
+ ('accountType', self.gf('django.db.models.fields.CharField')(max_length=1)),
+ ('isopenreliabilitiesaccount', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('isopeninterestaccount', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('isProductInventoryActiva', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('isACustomerPaymentAccount', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ))
+ db.send_create_signal('accounting', ['Account'])
+
+ # Adding model 'ProductCategorie'
+ db.create_table('accounting_productcategorie', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('title', self.gf('django.db.models.fields.CharField')(max_length=50)),
+ ('profitAccount', self.gf('django.db.models.fields.related.ForeignKey')(related_name='db_profit_account', to=orm['accounting.Account'])),
+ ('lossAccount', self.gf('django.db.models.fields.related.ForeignKey')(related_name='db_loss_account', to=orm['accounting.Account'])),
+ ))
+ db.send_create_signal('accounting', ['ProductCategorie'])
+
+ # Adding model 'Booking'
+ db.create_table('accounting_booking', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('fromAccount', self.gf('django.db.models.fields.related.ForeignKey')(related_name='db_booking_fromaccount', to=orm['accounting.Account'])),
+ ('toAccount', self.gf('django.db.models.fields.related.ForeignKey')(related_name='db_booking_toaccount', to=orm['accounting.Account'])),
+ ('amount', self.gf('django.db.models.fields.DecimalField')(max_digits=20, decimal_places=2)),
+ ('description', self.gf('django.db.models.fields.CharField')(max_length=120, null=True, blank=True)),
+ ('bookingReference', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['crm.Invoice'], null=True, blank=True)),
+ ('bookingDate', self.gf('django.db.models.fields.DateTimeField')()),
+ ('accountingPeriod', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['accounting.AccountingPeriod'])),
+ ('staff', self.gf('django.db.models.fields.related.ForeignKey')(related_name='db_booking_refstaff', blank=True, to=orm['auth.User'])),
+ ('dateofcreation', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+ ('lastmodification', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('lastmodifiedby', self.gf('django.db.models.fields.related.ForeignKey')(related_name='db_booking_lstmodified', blank=True, to=orm['auth.User'])),
+ ))
+ db.send_create_signal('accounting', ['Booking'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'AccountingPeriod'
+ db.delete_table('accounting_accountingperiod')
+
+ # Deleting model 'Account'
+ db.delete_table('accounting_account')
+
+ # Deleting model 'ProductCategorie'
+ db.delete_table('accounting_productcategorie')
+
+ # Deleting model 'Booking'
+ db.delete_table('accounting_booking')
+
+
+ models = {
+ 'accounting.account': {
+ 'Meta': {'ordering': "['accountNumber']", 'object_name': 'Account'},
+ 'accountNumber': ('django.db.models.fields.IntegerField', [], {}),
+ 'accountType': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'isACustomerPaymentAccount': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'isProductInventoryActiva': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'isopeninterestaccount': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'isopenreliabilitiesaccount': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'accounting.accountingperiod': {
+ 'Meta': {'object_name': 'AccountingPeriod'},
+ 'begin': ('django.db.models.fields.DateField', [], {}),
+ 'end': ('django.db.models.fields.DateField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'accounting.booking': {
+ 'Meta': {'object_name': 'Booking'},
+ 'accountingPeriod': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['accounting.AccountingPeriod']"}),
+ 'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '20', 'decimal_places': '2'}),
+ 'bookingDate': ('django.db.models.fields.DateTimeField', [], {}),
+ 'bookingReference': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Invoice']", 'null': 'True', 'blank': 'True'}),
+ 'dateofcreation': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}),
+ 'fromAccount': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_booking_fromaccount'", 'to': "orm['accounting.Account']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lastmodification': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'lastmodifiedby': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_booking_lstmodified'", 'blank': 'True', 'to': "orm['auth.User']"}),
+ 'staff': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_booking_refstaff'", 'blank': 'True', 'to': "orm['auth.User']"}),
+ 'toAccount': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_booking_toaccount'", 'to': "orm['accounting.Account']"})
+ },
+ 'accounting.productcategorie': {
+ 'Meta': {'object_name': 'ProductCategorie'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lossAccount': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_loss_account'", 'to': "orm['accounting.Account']"}),
+ 'profitAccount': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_profit_account'", 'to': "orm['accounting.Account']"}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'crm.contact': {
+ 'Meta': {'object_name': 'Contact'},
+ 'dateofcreation': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lastmodification': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'lastmodifiedby': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '300'})
+ },
+ 'crm.contract': {
+ 'Meta': {'object_name': 'Contract'},
+ 'dateofcreation': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'defaultSupplier': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Supplier']", 'null': 'True', 'blank': 'True'}),
+ 'defaultcurrency': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Currency']"}),
+ 'defaultcustomer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Customer']", 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lastmodification': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'lastmodifiedby': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_contractlstmodified'", 'to': "orm['auth.User']"}),
+ 'staff': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'db_relcontractstaff'", 'null': 'True', 'to': "orm['auth.User']"})
+ },
+ 'crm.currency': {
+ 'Meta': {'object_name': 'Currency'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'rounding': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '5', 'decimal_places': '2', 'blank': 'True'}),
+ 'shortName': ('django.db.models.fields.CharField', [], {'max_length': '3'})
+ },
+ 'crm.customer': {
+ 'Meta': {'object_name': 'Customer', '_ormbases': ['crm.Contact']},
+ 'contact_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['crm.Contact']", 'unique': 'True', 'primary_key': 'True'}),
+ 'defaultCustomerBillingCycle': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.CustomerBillingCycle']"}),
+ 'ismemberof': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['crm.CustomerGroup']", 'null': 'True', 'blank': 'True'})
+ },
+ 'crm.customerbillingcycle': {
+ 'Meta': {'object_name': 'CustomerBillingCycle'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
+ 'timeToPaymentDate': ('django.db.models.fields.IntegerField', [], {})
+ },
+ 'crm.customergroup': {
+ 'Meta': {'object_name': 'CustomerGroup'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '300'})
+ },
+ 'crm.invoice': {
+ 'Meta': {'object_name': 'Invoice', '_ormbases': ['crm.SalesContract']},
+ 'derivatedFromQuote': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Quote']", 'null': 'True', 'blank': 'True'}),
+ 'payableuntil': ('django.db.models.fields.DateField', [], {}),
+ 'paymentBankReference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'salescontract_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['crm.SalesContract']", 'unique': 'True', 'primary_key': 'True'}),
+ 'status': ('django.db.models.fields.CharField', [], {'max_length': '1'})
+ },
+ 'crm.quote': {
+ 'Meta': {'object_name': 'Quote', '_ormbases': ['crm.SalesContract']},
+ 'salescontract_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['crm.SalesContract']", 'unique': 'True', 'primary_key': 'True'}),
+ 'status': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+ 'validuntil': ('django.db.models.fields.DateField', [], {})
+ },
+ 'crm.salescontract': {
+ 'Meta': {'object_name': 'SalesContract'},
+ 'contract': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Contract']"}),
+ 'currency': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Currency']"}),
+ 'customer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Customer']"}),
+ 'dateofcreation': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'discount': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '5', 'decimal_places': '2', 'blank': 'True'}),
+ 'externalReference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lastCalculatedPrice': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '17', 'decimal_places': '2', 'blank': 'True'}),
+ 'lastCalculatedTax': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '17', 'decimal_places': '2', 'blank': 'True'}),
+ 'lastPricingDate': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ 'lastmodification': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'lastmodifiedby': ('django.db.models.fields.related.ForeignKey', [], {'blank': "'True'", 'related_name': "'db_lstscmodified'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'staff': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'db_relscstaff'", 'null': 'True', 'to': "orm['auth.User']"})
+ },
+ 'crm.supplier': {
+ 'Meta': {'object_name': 'Supplier', '_ormbases': ['crm.Contact']},
+ 'contact_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['crm.Contact']", 'unique': 'True', 'primary_key': 'True'}),
+ 'offersShipmentToCustomers': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ }
+ }
+
+ complete_apps = ['accounting']
View
191 .../migrations/0002_auto__add_field_account_description__add_field_account_originalAmount.py
@@ -0,0 +1,191 @@
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Account.description'
+ db.add_column('accounting_account', 'description',
+ self.gf('django.db.models.fields.TextField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Account.originalAmount'
+ db.add_column('accounting_account', 'originalAmount',
+ self.gf('django.db.models.fields.DecimalField')(default=0.0, max_digits=20, decimal_places=2),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Account.description'
+ db.delete_column('accounting_account', 'description')
+
+ # Deleting field 'Account.originalAmount'
+ db.delete_column('accounting_account', 'originalAmount')
+
+
+ models = {
+ 'accounting.account': {
+ 'Meta': {'ordering': "['accountNumber']", 'object_name': 'Account'},
+ 'accountNumber': ('django.db.models.fields.IntegerField', [], {}),
+ 'accountType': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'isACustomerPaymentAccount': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'isProductInventoryActiva': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'isopeninterestaccount': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'isopenreliabilitiesaccount': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'originalAmount': ('django.db.models.fields.DecimalField', [], {'default': '0.0', 'max_digits': '20', 'decimal_places': '2'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'accounting.accountingperiod': {
+ 'Meta': {'object_name': 'AccountingPeriod'},
+ 'begin': ('django.db.models.fields.DateField', [], {}),
+ 'end': ('django.db.models.fields.DateField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
+ },
+ 'accounting.booking': {
+ 'Meta': {'object_name': 'Booking'},
+ 'accountingPeriod': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['accounting.AccountingPeriod']"}),
+ 'amount': ('django.db.models.fields.DecimalField', [], {'max_digits': '20', 'decimal_places': '2'}),
+ 'bookingDate': ('django.db.models.fields.DateTimeField', [], {}),
+ 'bookingReference': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Invoice']", 'null': 'True', 'blank': 'True'}),
+ 'dateofcreation': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '120', 'null': 'True', 'blank': 'True'}),
+ 'fromAccount': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_booking_fromaccount'", 'to': "orm['accounting.Account']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lastmodification': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'lastmodifiedby': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_booking_lstmodified'", 'blank': 'True', 'to': "orm['auth.User']"}),
+ 'staff': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_booking_refstaff'", 'blank': 'True', 'to': "orm['auth.User']"}),
+ 'toAccount': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_booking_toaccount'", 'to': "orm['accounting.Account']"})
+ },
+ 'accounting.productcategorie': {
+ 'Meta': {'object_name': 'ProductCategorie'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lossAccount': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_loss_account'", 'to': "orm['accounting.Account']"}),
+ 'profitAccount': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_profit_account'", 'to': "orm['accounting.Account']"}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'crm.contact': {
+ 'Meta': {'object_name': 'Contact'},
+ 'dateofcreation': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lastmodification': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'lastmodifiedby': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'blank': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '300'})
+ },
+ 'crm.contract': {
+ 'Meta': {'object_name': 'Contract'},
+ 'dateofcreation': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'defaultSupplier': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Supplier']", 'null': 'True', 'blank': 'True'}),
+ 'defaultcurrency': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Currency']"}),
+ 'defaultcustomer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Customer']", 'null': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lastmodification': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'lastmodifiedby': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'db_contractlstmodified'", 'to': "orm['auth.User']"}),
+ 'staff': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'db_relcontractstaff'", 'null': 'True', 'to': "orm['auth.User']"})
+ },
+ 'crm.currency': {
+ 'Meta': {'object_name': 'Currency'},
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'rounding': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '5', 'decimal_places': '2', 'blank': 'True'}),
+ 'shortName': ('django.db.models.fields.CharField', [], {'max_length': '3'})
+ },
+ 'crm.customer': {
+ 'Meta': {'object_name': 'Customer', '_ormbases': ['crm.Contact']},
+ 'contact_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['crm.Contact']", 'unique': 'True', 'primary_key': 'True'}),
+ 'defaultCustomerBillingCycle': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.CustomerBillingCycle']"}),
+ 'ismemberof': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['crm.CustomerGroup']", 'null': 'True', 'blank': 'True'})
+ },
+ 'crm.customerbillingcycle': {
+ 'Meta': {'object_name': 'CustomerBillingCycle'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '300'}),
+ 'timeToPaymentDate': ('django.db.models.fields.IntegerField', [], {})
+ },
+ 'crm.customergroup': {
+ 'Meta': {'object_name': 'CustomerGroup'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '300'})
+ },
+ 'crm.invoice': {
+ 'Meta': {'object_name': 'Invoice', '_ormbases': ['crm.SalesContract']},
+ 'derivatedFromQuote': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Quote']", 'null': 'True', 'blank': 'True'}),
+ 'payableuntil': ('django.db.models.fields.DateField', [], {}),
+ 'paymentBankReference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'salescontract_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['crm.SalesContract']", 'unique': 'True', 'primary_key': 'True'}),
+ 'status': ('django.db.models.fields.CharField', [], {'max_length': '1'})
+ },
+ 'crm.quote': {
+ 'Meta': {'object_name': 'Quote', '_ormbases': ['crm.SalesContract']},
+ 'salescontract_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['crm.SalesContract']", 'unique': 'True', 'primary_key': 'True'}),
+ 'status': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
+ 'validuntil': ('django.db.models.fields.DateField', [], {})
+ },
+ 'crm.salescontract': {
+ 'Meta': {'object_name': 'SalesContract'},
+ 'contract': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Contract']"}),
+ 'currency': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Currency']"}),
+ 'customer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['crm.Customer']"}),
+ 'dateofcreation': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'discount': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '5', 'decimal_places': '2', 'blank': 'True'}),
+ 'externalReference': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'lastCalculatedPrice': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '17', 'decimal_places': '2', 'blank': 'True'}),
+ 'lastCalculatedTax': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '17', 'decimal_places': '2', 'blank': 'True'}),
+ 'lastPricingDate': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
+ 'lastmodification': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'lastmodifiedby': ('django.db.models.fields.related.ForeignKey', [], {'blank': "'True'", 'related_name': "'db_lstscmodified'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'staff': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'db_relscstaff'", 'null': 'True', 'to': "orm['auth.User']"})
+ },
+ 'crm.supplier': {
+ 'Meta': {'object_name': 'Supplier', '_ormbases': ['crm.Contact']},
+ 'contact_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['crm.Contact']", 'unique': 'True', 'primary_key': 'True'}),
+ 'offersShipmentToCustomers': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
+ }
+ }
+
+ complete_apps = ['accounting']
View
0 accounting/migrations/__init__.py
No changes.
View
10 accounting/models.py
@@ -196,22 +196,19 @@ def __unicode__(self):
class Meta:
app_label = "accounting"
- #app_label_koalix = _("Accounting")
verbose_name = _('Accounting Period')
verbose_name_plural = _('Accounting Periods')
class Account(models.Model):
accountNumber = models.IntegerField(verbose_name=_("Account Number"))
title = models.CharField(verbose_name=_("Account Title"), max_length=50)
accountType = models.CharField(verbose_name=_("Account Type"), max_length=1, choices=ACCOUNTTYPECHOICES)
+ description = models.TextField(verbose_name = _("Description"),null=True, blank=True)
+ originalAmount = models.DecimalField(max_digits=20, decimal_places=2, verbose_name=_("Original Amount"), default=0.00)
isopenreliabilitiesaccount = models.BooleanField(verbose_name=_("Is The Open Liabilities Account"))
- # TODO: There may only be one isopenreliabilitiesaccount and it must be an activa
isopeninterestaccount = models.BooleanField(verbose_name=_("Is The Open Interests Account"))
- # TODO: There may only be one openinterestaccount and it must be an activa
isProductInventoryActiva = models.BooleanField(verbose_name=_("Is a Product Inventory Account"))
- # TODO: This can only be set when accountType is Activa and can not be customerpaymentaccount
isACustomerPaymentAccount = models.BooleanField(verbose_name=_("Is a Customer Payment Account"))
- # TODO: This can only be set when accountType is Activa and can not be product inventry as well
def value(self):
sum = self.allBookings(fromAccount = False) - self.allBookings(fromAccount = True)
@@ -252,7 +249,6 @@ def __unicode__(self):
class Meta:
app_label = "accounting"
- #app_label_koalix = _("Accounting")
verbose_name = _('Account')
verbose_name_plural = _('Account')
ordering = ['accountNumber']
@@ -264,7 +260,6 @@ class ProductCategorie(models.Model):
class Meta:
app_label = "accounting"
- #app_label_koalix = _("Accounting")
verbose_name = _('Product Categorie')
verbose_name_plural = _('Product Categories')
def __unicode__(self):
@@ -288,7 +283,6 @@ def __unicode__(self):
class Meta:
app_label = "accounting"
- #app_label_koalix = _("Accounting")
verbose_name = _('Booking')
verbose_name_plural = _('Bookings')

0 comments on commit a944ada

Please sign in to comment.
Something went wrong with that request. Please try again.