Permalink
Browse files

- contacts now also have a prefix to set in the admin portal

- did a lot of enhancements in pdf export functions.... works goes on there
- Adjusted djangoUserExtention/TemplateSet added new pagefooterleft and pagefootermiddle
  • Loading branch information...
1 parent dd2fcbe commit 0167ed607a1b3c446fc10e2f30f280873d20415f Aaron Riedener committed Dec 9, 2010
View
2 crm/admin.py
@@ -391,7 +391,7 @@ class ContactPostalAddress(admin.StackedInline):
classes = ('collapse-open',)
fieldsets = (
('Basics', {
- 'fields': ('prename', 'name', 'addressline1', 'addressline2', 'addressline3', 'addressline4', 'zipcode', 'town', 'state', 'country', 'purpose')
+ 'fields': ('prefix', 'prename', 'name', 'addressline1', 'addressline2', 'addressline3', 'addressline4', 'zipcode', 'town', 'state', 'country', 'purpose')
}),
)
allow_add = True
View
BIN crm/locale/de/LC_MESSAGES/django.mo
Binary file not shown.
View
337 crm/locale/de/LC_MESSAGES/django.po
@@ -8,21 +8,22 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-11-12 08:18+0100\n"
+"POT-Creation-Date: 2010-12-07 15:35+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <aaron.riedener@koalix.ch>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:132 admin.py:147 admin.py:162 admin.py:179 admin.py:231
-#: admin.py:274 admin.py:325 admin.py:362
+#: admin.py:293 admin.py:344 admin.py:381
msgid "Basics"
msgstr "Standard"
-#: admin.py:135 admin.py:150 admin.py:165 admin.py:234 admin.py:277
-#: admin.py:328
+#: admin.py:135 admin.py:150 admin.py:165 admin.py:234 admin.py:296
+#: admin.py:347
msgid "Advanced (not editable)"
msgstr "Zusatzinformationen (nicht veränderbar)"
@@ -38,19 +39,19 @@ msgstr "Bestellung erstellen"
msgid "Quote created"
msgstr "Offerte erstellt"
-#: admin.py:200 admin.py:420
+#: admin.py:200 admin.py:439
msgid "Create Quote"
msgstr "Offerte erstellen"
-#: admin.py:205 admin.py:298 const/status.py:7
+#: admin.py:205 admin.py:317 const/status.py:7
msgid "Invoice created"
msgstr "Rechnung erstellt"
-#: admin.py:208 admin.py:301 admin.py:427
+#: admin.py:208 admin.py:320 admin.py:446
msgid "Create Invoice"
msgstr "Rechnung erstellen"
-#: admin.py:250 admin.py:293
+#: admin.py:250 admin.py:312
msgid "Recalculate Prices"
msgstr "Berechne Preis neu"
@@ -62,465 +63,494 @@ msgstr "Erzeuge ein PDF der Rechnung"
msgid "Create PDF of Delivery Order"
msgstr "Erzeuge ein PDF des Lieferscheins"
-#: admin.py:289
+#: admin.py:267
+msgid "Successfully registered Invoice in the Accounting"
+msgstr "Die Rechnung ist erflogreich in der Buchhaltung registriert worden"
+
+#: admin.py:268
+msgid "Register Invoice in Accounting"
+msgstr "Registriere Rechnung in Buchhaltung"
+
+#: admin.py:273
+msgid "Successfully unregistered Invoice in the Accounting"
+msgstr "Die Rechnung wurde erflogreich aus der Buchhaltung entfernt"
+
+#: admin.py:274
+msgid "Unregister Invoice in Accounting"
+msgstr "Entferne Rechnung aus der Buchhaltung"
+
+#: admin.py:279
+msgid "Successfully registered Payment in the Accounting"
+msgstr "Die Zahlung wurde erfolgreich eingebucht"
+
+#: admin.py:280
+msgid "Register Payment in Accounting"
+msgstr "Buche Zahlung des Kunden in der Buchhaltung"
+
+#: admin.py:308
msgid "Successfully recalculated Prices"
msgstr "Preisberechnung erfolgreich"
-#: admin.py:291
+#: admin.py:310
msgid "Unsuccessfull in updating the Prices "
msgstr "Preisberechnung fehlgeschlagen"
-#: admin.py:307
+#: admin.py:326
msgid "Create PDF of Quote"
msgstr "Erzeuge ein PDF der Offerte"
-#: admin.py:312
+#: admin.py:331
msgid "Purchase Confirmation PDF created"
msgstr "PDF der Verkaufsbestätigung erstellt"
-#: admin.py:313
+#: admin.py:332
msgid "Create PDF of Purchase Confirmation"
msgstr "Erzeuge ein PDF der Verkaufsbestätigung"
-#: admin.py:413
+#: admin.py:432
msgid "Create Contract"
msgstr "Erzeuge Auftrag"
-#: models.py:22
+#: models.py:22 models.py:165 models.py:223 models.py:301 models.py:516
+#: models.py:550 models.py:698
+msgid "Description"
+msgstr "Beschreibung"
+
+#: models.py:23
+msgid "Displayed Name After Price In The Position"
+msgstr "Angezeigt nach dem Preis in der Position"
+
+#: models.py:24
+msgid "Rounding"
+msgstr "Rundung"
+
+#: models.py:32 models.py:33 models.py:230 models.py:308
+msgid "Currency"
+msgstr "Währung"
+
+#: models.py:36
msgid "Prefix"
msgstr "Anrede"
-#: models.py:23 models.py:59 models.py:71
+#: models.py:37 models.py:73 models.py:85
msgid "Name"
msgstr "Name"
-#: models.py:24
+#: models.py:38
msgid "Prename"
msgstr "Vorname"
-#: models.py:25
+#: models.py:39
msgid "Addressline 1"
msgstr "Adresslinie 1"
-#: models.py:26
+#: models.py:40
msgid "Addressline 2"
msgstr "Adresslinie 2"
-#: models.py:27
+#: models.py:41
msgid "Addressline 3"
msgstr "Adresslinie 3"
-#: models.py:28
+#: models.py:42
msgid "Addressline 4"
msgstr "Adresslinie 4"
-#: models.py:29
+#: models.py:43
msgid "Zipcode"
msgstr "PLZ"
-#: models.py:30
+#: models.py:44
msgid "City"
msgstr "Ortschaft"
-#: models.py:31
+#: models.py:45
msgid "State"
msgstr "Bundestaat/Kanton"
-#: models.py:32
+#: models.py:46
msgid "Country"
msgstr "Land"
-#: models.py:36 models.py:45 models.py:54 models.py:66 models.py:75
-#: models.py:90 models.py:122 models.py:132 models.py:142 models.py:160
-#: models.py:212 models.py:263 models.py:346 models.py:402 models.py:416
-#: models.py:432 models.py:448 models.py:497 models.py:529 models.py:550
-#: models.py:570 models.py:614 models.py:623 models.py:636 models.py:649
-#: models.py:662 models.py:675 models.py:688 models.py:701 models.py:714
-#: models.py:727 models.py:740 models.py:753 models.py:766 models.py:779
-#: models.py:792
-msgid "Customer Relationship Management (CRM)"
-msgstr "Customer Relationship Management (CRM)"
-
-#: models.py:37 models.py:38
+#: models.py:51 models.py:52
msgid "Postal Address"
msgstr "Postadresse"
-#: models.py:41
+#: models.py:55
msgid "Phone Number"
msgstr "Telefonnummer"
-#: models.py:46 models.py:47
+#: models.py:60 models.py:61
msgid "Phone Address"
msgstr "Telefonnummer"
-#: models.py:50 models.py:55 models.py:56
+#: models.py:64 models.py:69 models.py:70
msgid "Email Address"
msgstr "Email Adresse"
-#: models.py:60 models.py:154 models.py:206 models.py:229 models.py:457
+#: models.py:74 models.py:168 models.py:229 models.py:307 models.py:553
msgid "Created at"
msgstr "Erstelldatum"
-#: models.py:61 models.py:155 models.py:207 models.py:230 models.py:459
+#: models.py:75 models.py:170 models.py:231 models.py:309 models.py:555
msgid "Last modified"
msgstr "Zuletzt geändert"
-#: models.py:62 models.py:156 models.py:208 models.py:231 models.py:460
+#: models.py:76 models.py:171 models.py:232 models.py:310 models.py:556
msgid "Last modified by"
msgstr "Zuletzt geändert durch"
-#: models.py:67 models.py:68
+#: models.py:81 models.py:82
msgid "Contact"
msgstr "Kontakt"
-#: models.py:72
+#: models.py:86
msgid "Days To Payment Date"
msgstr "Tage bis zur Fälligkeit"
-#: models.py:76 models.py:354
+#: models.py:90
msgid "Mode of Payment"
msgstr "Zahlungsmodalität"
-#: models.py:77
+#: models.py:91
msgid "Modes of Payment"
msgstr "Zahlungsmodalitäten"
-#: models.py:91 models.py:557
+#: models.py:105 models.py:655
msgid "Customer Group"
msgstr "Kundengruppe"
-#: models.py:92
+#: models.py:106
msgid "Customer Groups"
msgstr "Kundengruppen"
-#: models.py:95
+#: models.py:109
msgid "Default Mode of Payment"
msgstr "Standard Zahlungsmodalität"
-#: models.py:96
+#: models.py:110
msgid "Is member of"
msgstr "Ist Mitglied von"
-#: models.py:123 models.py:227
+#: models.py:137 models.py:305
msgid "Customer"
msgstr "Kunde"
-#: models.py:124
+#: models.py:138
msgid "Customers"
msgstr "Kunden"
-#: models.py:133 models.py:200
+#: models.py:147 models.py:222
msgid "Distributor"
msgstr "Lieferant"
-#: models.py:134
+#: models.py:148
msgid "Distributors"
msgstr "Lieferanten"
-#: models.py:143 models.py:144 models.py:582
+#: models.py:157 models.py:158 models.py:703
msgid "Shipment Partner"
msgstr "Versandunternehmen"
-#: models.py:150 models.py:205 models.py:228
+#: models.py:164 models.py:228 models.py:306
msgid "Staff"
msgstr "Mitarbeiter"
-#: models.py:151 models.py:201 models.py:223 models.py:407 models.py:422
-#: models.py:454 models.py:577
-msgid "Description"
-msgstr "Beschreibung"
-
-#: models.py:152
+#: models.py:166
msgid "Default Customer"
msgstr "Standard Kunde"
-#: models.py:153
+#: models.py:167
msgid "Default Distributor"
msgstr "Standard Lieferant"
-#: models.py:161 models.py:195 models.py:198 models.py:220 models.py:619
-#: models.py:632
+#: models.py:169
+msgid "Default Currency"
+msgstr "Standard Währung"
+
+#: models.py:176 models.py:217 models.py:220 models.py:298 models.py:740
+#: models.py:753
msgid "Contract"
msgstr "Auftrag"
-#: models.py:162
+#: models.py:177
msgid "Contracts"
msgstr "Aufträge"
-#: models.py:199 models.py:221
+#: models.py:221 models.py:299
msgid "External Reference"
msgstr "Externe Referenz"
-#: models.py:202 models.py:224 models.py:586
+#: models.py:224 models.py:302 models.py:707
msgid "Last Pricing Date"
msgstr "Datum der letze Preisberechnung"
-#: models.py:203 models.py:225
+#: models.py:225 models.py:303
msgid "Last Calculted Price With Tax"
msgstr "Zuletzt berechneter Preis mit Steuer"
-#: models.py:213 models.py:214 models.py:217
+#: models.py:226 models.py:304 models.py:709
+msgid "Last Calculted Tax"
+msgstr "Zuletzt berechnete Steuer"
+
+#: models.py:291 models.py:292 models.py:295
msgid "Purchase Order"
msgstr "Bestellung"
-#: models.py:217 models.py:268 models.py:342 models.py:398
+#: models.py:295 models.py:347 models.py:429 models.py:507
msgid "from Contract"
msgstr "vom Auftrag"
-#: models.py:222 models.py:578
+#: models.py:300 models.py:699
msgid "Discount"
msgstr "Rabatt"
-#: models.py:226 models.py:588
-msgid "Last Calculted Tax"
-msgstr "Zuletzt berechnete Steuer"
-
-#: models.py:264 models.py:268
+#: models.py:343 models.py:347
msgid "Sales Contract"
msgstr "Verkaufsauftrag"
-#: models.py:265
+#: models.py:344
msgid "Sales Contracts"
msgstr "Verkaufsaufträge"
-#: models.py:271 models.py:560
+#: models.py:350 models.py:658
msgid "Valid until"
msgstr "Gültig bis"
-#: models.py:272
+#: models.py:351
msgid "Status"
msgstr "Status"
-#: models.py:342 models.py:347
+#: models.py:429 models.py:434
msgid "Quote"
msgstr "Offerte"
-#: models.py:348
+#: models.py:435
msgid "Quotes"
msgstr "Offerten"
-#: models.py:351
+#: models.py:438
msgid "To pay until"
msgstr "Zahlbar bis"
-#: models.py:353
+#: models.py:440
msgid "Payment Bank Reference"
msgstr "Zahlungsreferenz der Bank"
-#: models.py:398 models.py:403
+#: models.py:507 models.py:512
msgid "Invoice"
msgstr "Rechnung"
-#: models.py:404
+#: models.py:513
msgid "Invoices"
msgstr "Rechnungen"
-#: models.py:408
-msgid "Displayed Name After Price In The Position"
-msgstr "Angezeigt nach dem Preis in der Position"
-
-#: models.py:409
-msgid "Rounding"
-msgstr "Rundung"
-
-#: models.py:417 models.py:418
-msgid "Currency"
-msgstr "Währung"
-
-#: models.py:423
+#: models.py:517
msgid "Displayed Name After Quantity In The Position"
msgstr "Angezeigt nach der Anzahl in der Position"
-#: models.py:424
+#: models.py:518
msgid "Is A Fraction Of"
msgstr "Ist eine Untereinheit von"
-#: models.py:425
+#: models.py:519
msgid "Factor Between This And Next Higher Unit"
msgstr "Multiplikator zwischen dieser und der nächst höheren Einheit"
-#: models.py:433 models.py:458 models.py:556 models.py:580
+#: models.py:527 models.py:554 models.py:653 models.py:701
msgid "Unit"
msgstr "Masseinheit"
-#: models.py:434
+#: models.py:528
msgid "Units"
msgstr "Masseinheiten"
-#: models.py:437
+#: models.py:531
msgid "Taxrate in Percentage"
msgstr "Steuersatz in Prozent"
-#: models.py:438
+#: models.py:532
msgid "Taxname"
msgstr "Name der Steuer"
-#: models.py:449
+#: models.py:533
+msgid "Activa Account"
+msgstr "Aktiv Konto"
+
+#: models.py:534
+msgid "Passiva Account"
+msgstr "Passiv Konto"
+
+#: models.py:545
msgid "Tax"
msgstr "Steuer"
-#: models.py:450
+#: models.py:546
msgid "Taxes"
msgstr "Steuern"
-#: models.py:455
+#: models.py:551
msgid "Title"
msgstr "Titel"
-#: models.py:456
+#: models.py:552
msgid "Product Number"
msgstr "Produktnummer"
-#: models.py:498 models.py:515 models.py:536 models.py:555 models.py:579
+#: models.py:558
+msgid "Accounting Product Categorie"
+msgstr "Buchhaltung Produktkategorie"
+
+#: models.py:595 models.py:612 models.py:633 models.py:652 models.py:700
msgid "Product"
msgstr "Produkt"
-#: models.py:499
+#: models.py:596
msgid "Products"
msgstr "Produkte"
-#: models.py:509
+#: models.py:606
msgid "There is no Price for this product"
msgstr "Es existiert kein Preis für dieses Produkt"
-#: models.py:509
+#: models.py:606
msgid "that matches the date"
msgstr "welches übereinstimmt mit Datum"
-#: models.py:509
+#: models.py:606
msgid "customer"
msgstr "Kunde"
-#: models.py:509
+#: models.py:606
msgid " and unit"
msgstr "und Einheit"
-#: models.py:513 models.py:534
+#: models.py:610 models.py:631
msgid "From Unit"
msgstr "Von Masseinheit"
-#: models.py:514 models.py:535
+#: models.py:611 models.py:632
msgid "To Unit"
msgstr "Zu Masseinheit"
-#: models.py:516
+#: models.py:613
msgid "Factor between From and To Unit"
msgstr "Multiplikator zwischen der einen und der anderen Einheit"
-#: models.py:530
+#: models.py:627
msgid "Unit Transfrom"
msgstr "Einheiten Umrechnung"
-#: models.py:531
+#: models.py:628
msgid "Unit Transfroms"
msgstr "Einheiten Umrechnungen"
-#: models.py:537
+#: models.py:634
msgid "Factor between From and To Customer Group"
msgstr "Prismultiplikator zwischen der einen und der anderen Kundengruppe"
-#: models.py:551
+#: models.py:648
msgid "Customer Group Price Transfrom"
msgstr "Kundengruppe Preisumrechnung"
-#: models.py:552
+#: models.py:649
msgid "Customer Group Price Transfroms"
msgstr "Kundengruppen Preisumrechnungen"
-#: models.py:558 models.py:585
+#: models.py:656 models.py:706
msgid "Price Per Unit"
msgstr "Preis pro Einheit"
-#: models.py:559
+#: models.py:657
msgid "Valid from"
msgstr "Gültig vom"
-#: models.py:571
+#: models.py:692
msgid "Price"
msgstr "Preis"
-#: models.py:572
+#: models.py:693
msgid "Prices"
msgstr "Preise"
-#: models.py:575
+#: models.py:696
msgid "Position Number"
msgstr "Positionsnummer"
-#: models.py:576
+#: models.py:697
msgid "Quantity"
msgstr "Anzahl"
-#: models.py:581
+#: models.py:702
msgid "Shipment on"
msgstr "Verschickt am"
-#: models.py:583
+#: models.py:704
msgid "Shipment ID"
msgstr "Lieferungs ID"
-#: models.py:584
+#: models.py:705
msgid "Overwrite Product Price"
msgstr "Überschreie Produkt Preis"
-#: models.py:587
+#: models.py:708
msgid "Last Calculted Price"
msgstr "Zuletzt berechneter Preis"
-#: models.py:610 models.py:615
+#: models.py:731 models.py:736
msgid "Position"
msgstr "Position"
-#: models.py:616
+#: models.py:737
msgid "Positions"
msgstr "Positionen"
-#: models.py:624 models.py:628
+#: models.py:745 models.py:749
msgid "Salescontract Position"
msgstr "Verkaufsaufträg Position"
-#: models.py:625
+#: models.py:746
msgid "Salescontract Positions"
msgstr "Verkaufsaufträge Positionen"
-#: models.py:637 models.py:641
+#: models.py:758 models.py:762
msgid "Purchaseorder Position"
msgstr "Bestellung Position"
-#: models.py:638
+#: models.py:759
msgid "Purchaseorder Positions"
msgstr "Bestellung Positionen"
-#: models.py:644 models.py:657 models.py:670 models.py:683 models.py:696
-#: models.py:709 models.py:722 models.py:735 models.py:748 models.py:761
-#: models.py:774 models.py:787
+#: models.py:765 models.py:778 models.py:791 models.py:804 models.py:817
+#: models.py:830 models.py:843 models.py:856 models.py:869 models.py:882
+#: models.py:895 models.py:908
msgid "Purpose"
msgstr "Verwendungszweck"
-#: models.py:650 models.py:651
+#: models.py:771 models.py:772
msgid "Phone Address For Contact"
msgstr "Telefonnummer für Kontakte"
-#: models.py:663 models.py:664
+#: models.py:784 models.py:785
msgid "Email Address For Contact"
msgstr "Email Adresse für Kontakte"
-#: models.py:676 models.py:677
+#: models.py:797 models.py:798
msgid "Postal Address For Contact"
msgstr "Postadresse für Kontakte"
-#: models.py:689 models.py:690 models.py:702 models.py:703 models.py:715
-#: models.py:716
+#: models.py:810 models.py:811 models.py:823 models.py:824 models.py:836
+#: models.py:837
msgid "Postal Address For Contracts"
msgstr "Postadresse für Aufträge"
-#: models.py:728 models.py:729 models.py:741 models.py:742 models.py:754
-#: models.py:755
+#: models.py:849 models.py:850 models.py:862 models.py:863 models.py:875
+#: models.py:876
msgid "Phone Address For Contracts"
msgstr "Telefonnummer für Aufträge"
-#: models.py:767 models.py:768 models.py:780 models.py:781 models.py:793
-#: models.py:794
+#: models.py:888 models.py:889 models.py:901 models.py:902 models.py:914
+#: models.py:915
msgid "Email Address For Contracts"
msgstr "Email Adresse für Aufträge"
@@ -620,6 +650,9 @@ msgstr "Rechnung registriert"
msgid "Invoice payed"
msgstr "Rechnung bezahlt"
+#~ msgid "Customer Relationship Management (CRM)"
+#~ msgstr "Customer Relationship Management (CRM)"
+
#~ msgid "Home"
#~ msgstr "Zu Hause"
View
7 crm/models.py
@@ -14,6 +14,7 @@
from django.core import serializers
import djangoUserExtention
from django.contrib import auth
+from lxml import etree
import accounting
import settings
import copy
@@ -117,6 +118,7 @@ def createContract(self):
def createInvoice(self):
contract = self.createContract()
+
invoice = contract.createInvoice()
return invoice
@@ -413,6 +415,11 @@ def createPDF(self, purchaseconfirmation):
objectsToSerialize += list(PostalAddress.objects.filter(id=address.id))
xml_serializer.serialize(objectsToSerialize, stream=out, indent=3)
out.close()
+ xml = etree.parse("/tmp/quote_"+str(self.id)+".xml")
+ rootelement = xml.getroot()
+ projectroot = etree.SubElement(rootelement, "projectroot")
+ projectroot.text = settings.PROJECT_ROOT
+ xml.write("/tmp/quote_"+str(self.id)+".xml")
if (purchaseconfirmation == False) :
log = open("/tmp/log.txt", "w")
log.write('bash -c "fop -c '+settings.MEDIA_ROOT+userExtention[0].defaultTemplateSet.fopConfigurationFile.path+' -xml /tmp/quote_'+str(self.id)+'.xml -xsl ' + settings.MEDIA_ROOT+userExtention[0].defaultTemplateSet.quoteXSLFile.xslfile.path+' -pdf /tmp/quote_'+str(self.id)+'.pdf"')
View
4 djangoUserExtention/admin.py
@@ -58,14 +58,14 @@ class OptionTemplateSet(admin.ModelAdmin):
search_fields = ('id', 'title', 'invoiceXSLFile', 'quoteXSLFile', 'purchaseconfirmationXSLFile',
'deilveryorderXSLFile', 'profitLossStatementXSLFile', 'balancesheetXSLFile',
'logo', 'footerTextsalesorders', 'headerTextsalesorders',
- 'headerTextpurchaseorders', 'footerTextpurchaseorders'
+ 'headerTextpurchaseorders', 'footerTextpurchaseorders', 'pagefooterleft', 'pagefootermiddle'
)
fieldsets = (
(_('Basics'), {
'fields': ('title', 'invoiceXSLFile', 'quoteXSLFile', 'purchaseconfirmationXSLFile',
'deilveryorderXSLFile', 'profitLossStatementXSLFile', 'balancesheetXSLFile',
'logo', 'fopConfigurationFile', 'footerTextsalesorders', 'headerTextsalesorders',
- 'headerTextpurchaseorders', 'footerTextpurchaseorders')
+ 'headerTextpurchaseorders', 'footerTextpurchaseorders', 'pagefooterleft', 'pagefootermiddle')
}),
)
View
2 djangoUserExtention/models.py
@@ -46,6 +46,8 @@ class TemplateSet(models.Model):
headerTextsalesorders = models.TextField(verbose_name=_("Header Text On Salesorders"), blank=True, null=True)
headerTextpurchaseorders = models.TextField(verbose_name=_("Header Text On Purchaseorders"), blank=True, null=True)
footerTextpurchaseorders = models.TextField(verbose_name=_("Footer Text On Purchaseorders"), blank=True, null=True)
+ pagefooterleft = models.CharField(max_length=40, verbose_name=_("Page Footer Left"), blank=True, null=True)
+ pagefootermiddle = models.CharField(max_length=40, verbose_name=_("Page Footer Middle"), blank=True, null=True)
class Meta:
app_label = "djangoUserExtention"
View
1 settings.py
@@ -35,6 +35,7 @@
SITE_ID = 1
USE_I18N = True
MEDIA_ROOT = '/var/www/koalixcrm/media/'
+PROJECT_ROOT = '/var/www/koalixcrm/'
MEDIA_URL = '/media/'
ADMIN_MEDIA_PREFIX = '/media/admin/'
View
4 templatefiles/invoice.xsl
@@ -29,7 +29,9 @@
<fo:table-row height="2cm" border-bottom-color="black" border-bottom-style="solid" border-bottom-width="0.5pt">
<fo:table-cell padding-bottom="3pt" >
<fo:block text-align="left" >
- <fo:external-graphic content-width="6.0cm" src="/var/www/koalixcrm/media/uploads/templatefiles/logo.jpg"/>
+ <xsl:attribute name="src">
+ <xsl:value-of select="projectroot"/><xsl:value-of select="object[@model='djangoUserExtention.templateset']/field[@name='logo']"/>
+ </xsl:attribute>
</fo:block>
</fo:table-cell>
</fo:table-row>
View
95 templatefiles/quote.xsl
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
@@ -29,7 +30,7 @@
<fo:block text-align="left" >
<fo:external-graphic content-width="6.0cm">
<xsl:attribute name="src">
- <xsl:value-of select="object[@model='djangoUserExtention.templateset']/field[@name='logo']"/>
+ <xsl:value-of select="projectroot"/><xsl:value-of select="object[@model='djangoUserExtention.templateset']/field[@name='logo']"/>
</xsl:attribute>
</fo:external-graphic>
</fo:block>
@@ -51,7 +52,7 @@
font-weight="bold">Erstelldatum:</fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
- text-align="left">&#8203; </fo:block>
+ text-align="left"><xsl:text> </xsl:text> </fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
text-align="left">Kundennummer:</fo:block>
@@ -60,7 +61,7 @@
text-align="left">Auftragsnummer:</fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
- text-align="left">&#8203; </fo:block>
+ text-align="left"><xsl:text> </xsl:text> </fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
text-align="left">MwSt.-Nummer:</fo:block>
@@ -72,7 +73,7 @@
text-align="left">Gültig bis:</fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
- text-align="left">&#8203; </fo:block>
+ text-align="left"><xsl:text> </xsl:text> </fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
text-align="left">Ansprechpartner:</fo:block>
@@ -91,7 +92,7 @@
<xsl:value-of select="substring(object[@model='crm.salescontract']/field[@name='dateofcreation'], 9, 2)"/><xsl:text>.</xsl:text><xsl:value-of select="substring(object[@model='crm.salescontract']/field[@name='dateofcreation'], 6, 2)"/><xsl:text>.</xsl:text><xsl:value-of select="substring(object[@model='crm.salescontract']/field[@name='dateofcreation'], 1, 4)"/></fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
- text-align="left">&#8203; </fo:block>
+ text-align="left"><xsl:text> </xsl:text> </fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
text-align="left">KU-<xsl:value-of select="object[@model='crm.contact']/@pk"/></fo:block>
@@ -100,7 +101,7 @@
text-align="left">AU-<xsl:value-of select="object[@model='crm.salescontract']/field[@name='contract']"/></fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
- text-align="left">&#8203; </fo:block>
+ text-align="left"><xsl:text> </xsl:text> </fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
text-align="left">keine</fo:block>
@@ -112,13 +113,13 @@
text-align="left"><xsl:value-of select="substring(object[@model='crm.quote']/field[@name='validuntil'], 9, 2)"/><xsl:text>.</xsl:text><xsl:value-of select="substring(object[@model='crm.quote']/field[@name='validuntil'], 6, 2)"/><xsl:text>.</xsl:text><xsl:value-of select="substring(object[@model='crm.quote']/field[@name='validuntil'], 1, 4)"/></fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
- text-align="left">&#8203; </fo:block>
+ text-align="left"><xsl:text> </xsl:text> </fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
- text-align="left"><xsl:value-of select="object[@model='auth.user']/field[@name='first_name']"/>&#8203; <xsl:value-of select="object[@model='auth.user']/field[@name='last_name']"/></fo:block>
+ text-align="left"><xsl:value-of select="object[@model='auth.user']/field[@name='first_name']"/><xsl:text> </xsl:text> <xsl:value-of select="object[@model='auth.user']/field[@name='last_name']"/></fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
- text-align="left">&#8203; </fo:block>
+ text-align="left"><xsl:text>-</xsl:text> </fo:block>
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
text-align="left"><xsl:value-of select="object[@model='auth.user']/field[@name='email']"/></fo:block>
@@ -127,16 +128,16 @@
<fo:block font-size="7pt"
font-family="BitstreamVeraSans"
text-align="left"
- text-decoration="underline"><xsl:value-of select="object[@model='auth.user']/field[@name='first_name']"/>&#8203; <xsl:value-of select="object[@model='auth.user']/field[@name='last_name']"/>, Brunnenhof, CH-9602 Bazenheid</fo:block>
+ text-decoration="underline"><xsl:value-of select="object[@model='auth.user']/field[@name='first_name']"/><xsl:text> </xsl:text> <xsl:value-of select="object[@model='auth.user']/field[@name='last_name']"/>, Brunnenhof, CH-9602 Bazenheid</fo:block>
<fo:block font-size="8pt"
font-family="BitstreamVeraSans"
- text-align="left">&#8203; </fo:block>
+ text-align="left"><xsl:text> </xsl:text> </fo:block>
<xsl:choose>
<xsl:when test="object[@model='crm.postaladdressforcontact']/field[@name='purpose']">
<fo:block font-size="9pt"
font-family="BitstreamVeraSans"
text-align="left">
- <xsl:value-of select="object[@model='crm.postaladdress']/field[@name='prename']"/>&#8203; <xsl:value-of select="object[@model='crm.postaladdress']/field[@name='name']"/>
+ <xsl:value-of select="object[@model='crm.postaladdress']/field[@name='prename']"/><xsl:text> </xsl:text> <xsl:value-of select="object[@model='crm.postaladdress']/field[@name='name']"/>
</fo:block>
<xsl:choose>
<xsl:when test="object[@model='crm.postaladdress']/field[@name='addressline1']">
@@ -177,31 +178,34 @@
<fo:block font-size="9pt"
font-family="BitstreamVeraSans"
text-align="left">
- <xsl:value-of select="object[@model='crm.postaladdress']/field[@name='zipcode']"/> &#8203; <xsl:value-of select="object[@model='crm.postaladdress']/field[@name='town']"/>
+ <xsl:value-of select="object[@model='crm.postaladdress']/field[@name='zipcode']"/> <xsl:text> </xsl:text> <xsl:value-of select="object[@model='crm.postaladdress']/field[@name='town']"/>
</fo:block>
</xsl:when>
</xsl:choose>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
- <fo:block font-size="8pt"
+ <fo:block font-size="15pt"
font-family="BitstreamVeraSans"
+ color="black"
text-align="left"
- line-height="1.0cm">&#8203;
+ font-weight="bold"
+ margin-top="1cm">
+ Offerte OF-<xsl:value-of select="object[@model='crm.salescontract']/@pk"/>
</fo:block>
- <fo:block font-size="15pt"
+ <fo:block font-size="9pt"
font-family="BitstreamVeraSans"
color="black"
text-align="left"
- font-weight="bold">
- Offerte OF-<xsl:value-of select="object[@model='crm.salescontract']/@pk"/>
+ margin-top="1cm">
+ <xsl:value-of select="object[@model='djangoUserExtention.templateset']/field[@name='headerTextsalesorders']"/>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after" >
<fo:block font-size="8pt"
font-family="BitstreamVeraSans"
- text-align="left">&#8203; </fo:block>
+ text-align="left"><xsl:text> </xsl:text> </fo:block>
<fo:table table-layout="fixed" width="100%">
<fo:table-column column-width="15.0cm"/>
<fo:table-column column-width="3.0cm"/>
@@ -212,15 +216,18 @@
font-family="BitstreamVeraSans"
text-align="left"
font-weight="bold"
- >&#8203; </fo:block>
+ ><xsl:text> </xsl:text> </fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block font-size="8pt"
font-family="BitstreamVeraSans"
font-weight="bold"
- text-align="start"><xsl:value-of select="object[@model='auth.user']/field[@name='first_name']"/>&#8203; <xsl:value-of select="object[@model='auth.user']/field[@name='last_name']"/> &#8203; &#8203; &#8203; &#8203; Brunnenhof &#8203; &#8203; &#8203; &#8203; 9602 Bazenheid &#8203; &#8203; &#8203; &#8203; +41 (0)71 511 21 18 &#8203; &#8203; &#8203; &#8203; info@koalix.com</fo:block>
+ text-align="start">
+ <xsl:value-of select="object[@model='djangoUserExtention.templateset']/field[@name='pagefooterleft']"/>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="object[@model='djangoUserExtention.templateset']/field[@name='pagefootermiddle']"/></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-size="8pt"
@@ -237,7 +244,7 @@
<fo:block font-size="9pt"
font-family="BitstreamVeraSans"
text-align="left"
- line-height="13pt" >&#8203; </fo:block>
+ line-height="13pt" ><xsl:text> </xsl:text> </fo:block>
<fo:table table-layout="fixed" width="100%">
<fo:table-column column-width="1.0cm"/>
<fo:table-column column-width="7.7cm"/>
@@ -324,9 +331,7 @@
<xsl:choose>
<xsl:when test="field[@name='quantity'] = '0E-15'">-</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="format-number(field[@name='quantity'], '#.##0,00', 'european')"/>&#8203;
- <xsl:variable name ="unitinthisposition" select="field[@name='unit']"/>
- <xsl:value-of select="../object[@model='crm.unit' and @pk=$unitinthisposition]/field[@name='shortName']"/>
+ <xsl:value-of select="format-number(field[@name='quantity'], '#.##0,00', 'european')"/><xsl:text> </xsl:text><xsl:variable name ="unitinthisposition" select="field[@name='unit']"/><xsl:value-of select="../object[@model='crm.unit' and @pk=$unitinthisposition]/field[@name='shortName']"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
@@ -336,7 +341,7 @@
<xsl:choose>
<xsl:when test="field[@name='positionPricePerUnit']/None">-</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="format-number(field[@name='positionPricePerUnit'], '#.##0,00', 'european')"/>&#8203;<xsl:value-of select="../object[@model='crm.currency']/field[@name='shortName']"/>
+ <xsl:value-of select="format-number(field[@name='positionPricePerUnit'], '#.##0,00', 'european')"/><xsl:text> </xsl:text><xsl:value-of select="../object[@model='crm.currency']/field[@name='shortName']"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
@@ -356,20 +361,20 @@
<xsl:choose>
<xsl:when test="field[@name='lastCalculatedPrice']/None">-</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="format-number(field[@name='lastCalculatedPrice'], '#.##0,00', 'european')"/>&#8203;<xsl:value-of select="../object[@model='crm.currency']/field[@name='shortName']"/>
+ <xsl:value-of select="format-number(field[@name='lastCalculatedPrice'], '#.##0,00', 'european')"/><xsl:text> </xsl:text><xsl:value-of select="../object[@model='crm.currency']/field[@name='shortName']"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
<fo:table-row keep-together="always" keep-with-previous="always">
- <fo:table-cell number-columns-spanned="6"><fo:block text-align="start" >&#8203;
+ <fo:table-cell number-columns-spanned="6"><fo:block text-align="start" margin-top="0.5cm"><xsl:text> </xsl:text>
</fo:block></fo:table-cell>
</fo:table-row>
<fo:table-row keep-together="always" keep-with-previous="always">
<fo:table-cell number-columns-spanned="2">
- <fo:block text-align="start" >&#8203;
+ <fo:block text-align="start" ><xsl:text> </xsl:text>
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="2" border-color="black" border-style="solid" border-width="0.5pt" padding="2.5pt">
@@ -382,7 +387,7 @@
<xsl:choose>
<xsl:when test="object[@model='crm.salescontract']/field[@name='lastCalculatedPrice']/None">-</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="format-number(object[@model='crm.salescontract']/field[@name='lastCalculatedPrice'], '#.##0,00', 'european')"/>&#8203;<xsl:value-of select="object[@model='crm.currency']/field[@name='shortName']"/>
+ <xsl:value-of select="format-number(object[@model='crm.salescontract']/field[@name='lastCalculatedPrice'], '#.##0,00', 'european')"/><xsl:text> </xsl:text><xsl:value-of select="object[@model='crm.currency']/field[@name='shortName']"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
@@ -403,7 +408,7 @@
<xsl:choose>
<xsl:when test="object[@model='crm.salescontract']/field[@name='lastCalculatedTax']/None">-</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="format-number(object[@model='crm.salescontract']/field[@name='lastCalculatedTax'], '#.##0,00', 'european')"/>&#8203;<xsl:value-of select="object[@model='crm.currency']/field[@name='shortName']"/>
+ <xsl:value-of select="format-number(object[@model='crm.salescontract']/field[@name='lastCalculatedTax'], '#.##0,00', 'european')"/><xsl:text> </xsl:text><xsl:text> </xsl:text><xsl:value-of select="object[@model='crm.currency']/field[@name='shortName']"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
@@ -424,38 +429,22 @@
<xsl:choose>
<xsl:when test="object[@model='crm.salescontract']/field[@name='lastCalculatedPrice']/None">-</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="format-number(object[@model='crm.salescontract']/field[@name='lastCalculatedPrice']+object[@model='crm.salescontract']/field[@name='lastCalculatedTax'], '#.##0,00', 'european')"/>&#8203;<xsl:value-of select="object[@model='crm.currency']/field[@name='shortName']"/>
+ <xsl:value-of select="format-number(object[@model='crm.salescontract']/field[@name='lastCalculatedPrice']+object[@model='crm.salescontract']/field[@name='lastCalculatedTax'], '#.##0,00', 'european')"/><xsl:text> </xsl:text><xsl:value-of select="object[@model='crm.currency']/field[@name='shortName']"/>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
- <fo:block font-size="10pt"
- font-family="BitstreamVeraSans"
- text-align="left"
- line-height="0.5cm" >&#8203;
- </fo:block>
-
- <fo:block font-size="10pt"
- font-family="BitstreamVeraSans"
- text-align="left"
- line-height="13pt" >Freundliche Grüsse
- </fo:block>
- <fo:block font-size="10pt"
- font-family="BitstreamVeraSans"
- text-align="left"
- line-height="20pt" >&#8203;
- </fo:block>
-
- <fo:block font-size="10pt"
+ <fo:block font-size="9pt"
font-family="BitstreamVeraSans"
+ color="black"
text-align="left"
- line-height="13pt"
- id="last-page">Aaron Riedener
- </fo:block>
+ margin-top="1cm">
+ <xsl:value-of select="object[@model='djangoUserExtention.templateset']/field[@name='footerTextsalesorders']"/>
+ </fo:block>
</fo:flow>
<xsl:apply-templates/>
</fo:page-sequence>

0 comments on commit 0167ed6

Please sign in to comment.