add briefkopf
							parent
							
								
									28c5d8878a
								
							
						
					
					
						commit
						a5f3efa662
					
				|  | @ -64,6 +64,23 @@ class res_company(osv.osv): | ||||||
|             if os.path.isdir(dir): |             if os.path.isdir(dir): | ||||||
|                 break |                 break | ||||||
|          |          | ||||||
|  |         if os.path.isdir(dir): | ||||||
|  |             filename = os.path.join(dir, 'briefkopf.rml')  | ||||||
|  |             f = open(filename , 'rb') | ||||||
|  |             data = f.read() | ||||||
|  |             result = dict.fromkeys(ids, data) | ||||||
|  |         return result | ||||||
|  |      | ||||||
|  |     def _get_rml_header2(self, cr, uid, ids, _field_name, _args, context=None): | ||||||
|  |         result = dict.fromkeys(ids, False) | ||||||
|  |         # Get filename | ||||||
|  |         dirname = 'cam_reports/report' | ||||||
|  |         adps = addons.module.ad_paths         | ||||||
|  |         for adp in adps: | ||||||
|  |             dir = os.path.join(adp, dirname) | ||||||
|  |             if os.path.isdir(dir): | ||||||
|  |                 break | ||||||
|  |          | ||||||
|         if os.path.isdir(dir): |         if os.path.isdir(dir): | ||||||
|             filename = os.path.join(dir, 'page.rml')  |             filename = os.path.join(dir, 'page.rml')  | ||||||
|             f = open(filename , 'rb') |             f = open(filename , 'rb') | ||||||
|  | @ -72,5 +89,6 @@ class res_company(osv.osv): | ||||||
|         return result |         return result | ||||||
|      |      | ||||||
|     _columns = { |     _columns = { | ||||||
|         'rml_header': fields.function(_get_rml_header, type='text', string='RML Header'), |         'rml_header': fields.function(_get_rml_header, type='text', string='Briefkopf',readonly=True), | ||||||
|  |         'rml_header2': fields.function(_get_rml_header2, type='text', string='RML Header',readonly=True), | ||||||
|     }       |     }       | ||||||
|  | @ -0,0 +1,99 @@ | ||||||
|  | <header> | ||||||
|  |     <pageTemplate> | ||||||
|  |         <frame id="first" x1="1.5cm" y1="4cm" height="21.1cm" width="18.5cm"/> | ||||||
|  |          <stylesheet> | ||||||
|  |             <!-- Set here the default font to use for all <para> tags --> | ||||||
|  |             <paraStyle name='Normal' fontName="Helvetica"/> | ||||||
|  |             <paraStyle name="footer"  fontName="Helvetica" leading="8" fontSize="7.0" alignment="LEFT"/> | ||||||
|  |             <paraStyle name="footer_rechts"  fontName="Helvetica" leading="8" fontSize="7.0" alignment="RIGHT"/> | ||||||
|  |             <paraStyle name="header_fett"  fontName="Helvetica-Bold" fontSize="7.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/> | ||||||
|  |             <paraStyle name="header"  fontName="Helvetica" fontSize="7.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/> | ||||||
|  |             <paraStyle name="Absender"  fontName="Helvetica" fontSize="7.0" leading="8" alignment="LEFT" spaceAfter="0.0"/> | ||||||
|  | 
 | ||||||
|  |             <paraStyle name="normal" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" /> | ||||||
|  |             <paraStyle name="fett" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT"/> | ||||||
|  |             <paraStyle name="ueberschrift" fontName="Helvetica-Bold" fontSize="10.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/> | ||||||
|  |              | ||||||
|  |             <paraStyle name="tabelle_header" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER"/> | ||||||
|  |             <paraStyle name="tabelle_header_links" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT"/> | ||||||
|  |             <paraStyle name="tabelle_header_rechts" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT"/> | ||||||
|  |             <paraStyle name="tabelle_daten_center" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER"/> | ||||||
|  |             <paraStyle name="tabelle_daten_links" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT"/> | ||||||
|  |             <paraStyle name="tabelle_daten_links_italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT"/> | ||||||
|  |             <paraStyle name="tabelle_daten_rechts" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT"/> | ||||||
|  |              | ||||||
|  |             <paraStyle name="schlussrechnung" fontName="Helvetica" fontSize="9.0" leading="10" alignment="RIGHT"/> | ||||||
|  |             <paraStyle name="schlussrechnung_fett" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="RIGHT"/> | ||||||
|  |             <paraStyle name="skonto" fontName="Helvetica" fontSize="7.0" leading="10" alignment="RIGHT"/> | ||||||
|  |              | ||||||
|  |             <!--  Tabellen --> | ||||||
|  |             <blockTableStyle id="Struktur"> | ||||||
|  |               <blockAlignment value="LEFT"/> | ||||||
|  |               <blockValign value="TOP"/> | ||||||
|  |               <blockTopPadding length="0"/> | ||||||
|  |               <blockBottomPadding length="0"/>       | ||||||
|  |               <blockLeftPadding length="0"/>       | ||||||
|  |               <blockRightPadding length="0"/>       | ||||||
|  |             </blockTableStyle> | ||||||
|  |          | ||||||
|  |             <blockTableStyle id="TabelleHaupt"> | ||||||
|  |               <blockAlignment value="LEFT"/> | ||||||
|  |               <blockValign value="TOP"/> | ||||||
|  |               <lineStyle kind="LINEBELOW" colorName="#000000" thickness="0.5"/> | ||||||
|  |               <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0" thickness="1"/> | ||||||
|  |               <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="-1,-1" thickness="1"/> | ||||||
|  |             </blockTableStyle> | ||||||
|  |          | ||||||
|  |             <blockTableStyle id="TabelleSchlussrechnung"> | ||||||
|  |               <blockValign value="MIDDLE"/>  | ||||||
|  |             </blockTableStyle>             | ||||||
|  |          </stylesheet> | ||||||
|  |           | ||||||
|  |         <pageGraphics> | ||||||
|  |         	 | ||||||
|  |         	<!-- Logo Oben 1 --> | ||||||
|  |             <place x="1.75cm" y="24.75cm" height="3cm" width="7cm"> | ||||||
|  |                 <para style="footer">[[ company.partner_id.name ]]</para> | ||||||
|  |                 <para style="footer">[[ company.street ]]</para> | ||||||
|  |                 <para style="footer">[[ company.zip ]] [[ company.city ]]</para> | ||||||
|  |                 <para style="footer">[[ company.country_id.name ]]</para> | ||||||
|  |             </place> | ||||||
|  |              | ||||||
|  | 			<!-- Logo Oben 2 --> | ||||||
|  |             <place x="6.90cm" y="24.75cm" height="3cm" width="7cm"> | ||||||
|  |                 <para style="footer">Telefon:</para> | ||||||
|  |                 <para style="footer">Telefax:</para> | ||||||
|  |                 <para style="footer">E-Mail:</para> | ||||||
|  |                 <para style="footer">Web:</para> | ||||||
|  |             </place> | ||||||
|  |             <place x="8.10cm" y="24.75cm" height="3cm" width="7cm"> | ||||||
|  |                 <para style="footer">[[ company.phone ]]</para> | ||||||
|  |                 <para style="footer">[[ company.fax ]]</para> | ||||||
|  |                 <para style="footer">[[ company.partner_id.email ]]</para> | ||||||
|  |                 <para style="footer">[[ company.partner_id.website ]]</para> | ||||||
|  |             </place> | ||||||
|  | 			 | ||||||
|  | 			<!-- Logo Oben --> | ||||||
|  | 			<image x="13.80cm" y="26.60cm" height="1.5cm" preserveAspectRatio="1">[[ company.logo]]</image> | ||||||
|  |         	 | ||||||
|  |             <!-- Seperator --> | ||||||
|  |             <rect x="1.70cm" y="26.40cm" width="18.00cm" height="0.01cm" fill="yes" stroke="no"/> | ||||||
|  | 			 | ||||||
|  |             <!-- Seperator --> | ||||||
|  |             <rect x="1.70cm" y="1.85cm" width="18.00cm" height="0.01cm" fill="yes" stroke="no"/> | ||||||
|  |             	 | ||||||
|  |             <!-- Footer links --> | ||||||
|  |             <place x="1.75cm" y="0cm" height="1.75cm" width="18cm"> | ||||||
|  |                 <para style="footer">Bankverbindung: BANK, IBAN: AT000000000000000000, BIC: AAAAAAAA</para> | ||||||
|  |                 <para style="footer">UID: [[company.vat ]], FN: [[ company.company_registry ]]</para> | ||||||
|  |                 <para style="footer">Die Ware bleibt bis zur vollständigen Bezahlung unser Eigentum.</para> | ||||||
|  |             </place>             | ||||||
|  |              | ||||||
|  |             <!-- Seitenzahl -->  | ||||||
|  |             <setFont name="Helvetica" size="8"/>       | ||||||
|  | 			<drawRightString x="561" y="58">Seite <pageNumber/> </drawRightString> | ||||||
|  | 
 | ||||||
|  |         </pageGraphics> | ||||||
|  | 
 | ||||||
|  |     </pageTemplate> | ||||||
|  | </header> | ||||||
|  | @ -49,51 +49,5 @@ | ||||||
|             </blockTableStyle>             |             </blockTableStyle>             | ||||||
|          </stylesheet> |          </stylesheet> | ||||||
|           |           | ||||||
|         <pageGraphics> |  | ||||||
|         	 |  | ||||||
|         	<!-- Logo Oben 1 --> |  | ||||||
|             <place x="1.75cm" y="24.75cm" height="3cm" width="7cm"> |  | ||||||
|                 <para style="footer">[[ company.partner_id.name ]]</para> |  | ||||||
|                 <para style="footer">[[ company.street ]]</para> |  | ||||||
|                 <para style="footer">[[ company.zip ]] [[ company.city ]]</para> |  | ||||||
|                 <para style="footer">[[ company.country_id.name ]]</para> |  | ||||||
|             </place> |  | ||||||
|              |  | ||||||
| 			<!-- Logo Oben 2 --> |  | ||||||
|             <place x="6.90cm" y="24.75cm" height="3cm" width="7cm"> |  | ||||||
|                 <para style="footer">Telefon:</para> |  | ||||||
|                 <para style="footer">Telefax:</para> |  | ||||||
|                 <para style="footer">E-Mail:</para> |  | ||||||
|                 <para style="footer">Web:</para> |  | ||||||
|             </place> |  | ||||||
|             <place x="8.10cm" y="24.75cm" height="3cm" width="7cm"> |  | ||||||
|                 <para style="footer">[[ company.phone ]]</para> |  | ||||||
|                 <para style="footer">[[ company.fax ]]</para> |  | ||||||
|                 <para style="footer">[[ company.partner_id.email ]]</para> |  | ||||||
|                 <para style="footer">[[ company.partner_id.website ]]</para> |  | ||||||
|             </place> |  | ||||||
| 			 |  | ||||||
| 			<!-- Logo Oben --> |  | ||||||
| 			<image x="13.80cm" y="26.60cm" height="1.5cm" preserveAspectRatio="1">[[ company.logo]]</image> |  | ||||||
|         	 |  | ||||||
|             <!-- Seperator --> |  | ||||||
|             <rect x="1.70cm" y="26.40cm" width="18.00cm" height="0.01cm" fill="yes" stroke="no"/> |  | ||||||
| 			 |  | ||||||
|             <!-- Seperator --> |  | ||||||
|             <rect x="1.70cm" y="1.85cm" width="18.00cm" height="0.01cm" fill="yes" stroke="no"/> |  | ||||||
|             	 |  | ||||||
|             <!-- Footer links --> |  | ||||||
|             <place x="1.75cm" y="0cm" height="1.75cm" width="18cm"> |  | ||||||
|                 <para style="footer">Bankverbindung: BANK, IBAN: AT000000000000000000, BIC: AAAAAAAA</para> |  | ||||||
|                 <para style="footer">UID: [[company.vat ]], FN: [[ company.company_registry ]]</para> |  | ||||||
|                 <para style="footer">Die Ware bleibt bis zur vollständigen Bezahlung unser Eigentum.</para> |  | ||||||
|             </place>             |  | ||||||
|              |  | ||||||
|             <!-- Seitenzahl -->  |  | ||||||
|             <setFont name="Helvetica" size="8"/>       |  | ||||||
| 			<drawRightString x="561" y="58">Seite <pageNumber/> </drawRightString> |  | ||||||
| 
 |  | ||||||
|         </pageGraphics> |  | ||||||
| 
 |  | ||||||
|     </pageTemplate> |     </pageTemplate> | ||||||
| </header> | </header> | ||||||
|  | @ -0,0 +1,11 @@ | ||||||
|  | --- ext/odoo/openerp/report/report_sxw.py	2015-04-15 12:18:30.132784074 +0200
 | ||||||
|  | +++ ext/odoo/openerp/report/report_sxw.py	2015-04-15 11:48:21.743518606 +0200
 | ||||||
|  | @@ -476,6 +476,8 @@
 | ||||||
|  |          processed_rml = etree.XML(rml) | ||||||
|  |          if report_xml.use_global_header: | ||||||
|  |              rml_parser._add_header(processed_rml, self.header) | ||||||
|  | +        else:
 | ||||||
|  | +            rml_parser._add_header(processed_rml, 'internal')
 | ||||||
|  |          processed_rml = self.preprocess_rml(processed_rml,report_xml.report_type) | ||||||
|  |          if rml_parser.logo: | ||||||
|  |              logo = base64.decodestring(rml_parser.logo) | ||||||
|  | @ -67,6 +67,7 @@ def main(): | ||||||
| 
 | 
 | ||||||
|             'set_translations', |             'set_translations', | ||||||
|             'set_default_removal_strategy', |             'set_default_removal_strategy', | ||||||
|  |             'default_set_order_policy', | ||||||
|         ] |         ] | ||||||
| 
 | 
 | ||||||
|     if cmd == 'rollout': |     if cmd == 'rollout': | ||||||
|  |  | ||||||
|  | @ -81,6 +81,7 @@ class Config(): | ||||||
|             'group_uom': True,                           # Verwende Mengeneinheiten |             'group_uom': True,                           # Verwende Mengeneinheiten | ||||||
|             'group_invoice_deli_orders': True,           # Erstelle Rechnungen durch Auslieferungen             |             'group_invoice_deli_orders': True,           # Erstelle Rechnungen durch Auslieferungen             | ||||||
|         } |         } | ||||||
|  |         self.order_policy = 'picking'                   # Erzeuge Rechnung: [manual], [picking],[prepaid] | ||||||
|          |          | ||||||
|         # Einstellungen Einkauf |         # Einstellungen Einkauf | ||||||
|         self.purchase_config = { |         self.purchase_config = { | ||||||
|  |  | ||||||
|  | @ -583,6 +583,14 @@ class CamadeusFunctions(): | ||||||
|                 return True |                 return True | ||||||
|         return False |         return False | ||||||
|      |      | ||||||
|  |     def default_set_order_policy(self): | ||||||
|  |         """Setze Rechnung von Lieferschein""" | ||||||
|  |          | ||||||
|  |         if hasattr(self.config, 'order_policy'): | ||||||
|  |             method = self.config.order_policy | ||||||
|  |             self._execute('ir.values', 'set_default', 'sale.order', 'order_policy', method) | ||||||
|  |             return True | ||||||
|  | 
 | ||||||
|     def set_default_removal_strategy(self): |     def set_default_removal_strategy(self): | ||||||
|         """Default Entnahmestrategie für Lager setzen""" |         """Default Entnahmestrategie für Lager setzen""" | ||||||
|         if hasattr(self.config, 'removal_strategy'): |         if hasattr(self.config, 'removal_strategy'): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue