dmi, skonto
						commit
						3c6281c03c
					
				|  | @ -33,7 +33,7 @@ | |||
|     """, | ||||
|     'author': 'camadeus GmbH', | ||||
|     'website': 'http://www.camadeus.at', | ||||
|     'depends': ['account'],  | ||||
|     'depends': ['account', 'sale'],  | ||||
|     'data': [ | ||||
|         'cam_invoice_skonto_view.xml', | ||||
|         'cam_invoice_skonto_data.xml', | ||||
|  |  | |||
|  | @ -387,4 +387,20 @@ def resolve_o2m_operations(cr, uid, target_osv, operations, fields, context): | |||
|         if result != None: | ||||
|             results.append(result) | ||||
|     return results      | ||||
| 
 | ||||
| class sale_order(osv.osv): | ||||
|     _inherit = 'sale.order' | ||||
|      | ||||
|     def _skonto_betrag_inkl(self, cr, uid, ids, field_name, arg, context=None): | ||||
|         res = {} | ||||
|         sos = self.browse(cr, uid, ids, context=context) | ||||
|         for so in sos: | ||||
|             if so.payment_term and so.payment_term.skonto_prozent: | ||||
|                 res[so.id] = so.amount_total * (1 - so.payment_term.skonto_prozent/100.0) | ||||
|         return res | ||||
|         | ||||
|     _columns = { | ||||
|         'skonto_betrag_inkl': fields.function(_skonto_betrag_inkl, string='Betrag inkl. Skonto', type='float'), | ||||
|     } | ||||
|      | ||||
| # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||||
|  |  | |||
|  | @ -28,7 +28,6 @@ | |||
| <openerp> | ||||
|     <data>     | ||||
|     	 | ||||
|     	<!-- account.payment.term --> | ||||
|         <record id="view_payment_term_form" model="ir.ui.view"> | ||||
|             <field name="name">cam_invoice_skonto.payment.term.form</field> | ||||
|             <field name="model">account.payment.term</field> | ||||
|  | @ -46,7 +45,6 @@ | |||
|             </field> | ||||
|         </record>    | ||||
|          | ||||
|         <!-- account.invoice --> | ||||
| 		<record id="invoice_form" model="ir.ui.view"> | ||||
|             <field name="name">cam_invoice_skonto.invoice.form</field> | ||||
|             <field name="model">account.invoice</field> | ||||
|  | @ -74,5 +72,16 @@ | |||
|             </field> | ||||
|         </record> | ||||
|          | ||||
|         <record id="view_order_form" model="ir.ui.view"> | ||||
|             <field name="name">sale.order.form</field> | ||||
|             <field name="model">sale.order</field> | ||||
|             <field name="inherit_id" ref="sale.view_order_form"/> | ||||
|             <field name="arch" type="xml"> | ||||
|                 <field name="amount_total" position="after"> | ||||
| 					<field name="skonto_betrag_inkl"/>                     | ||||
|                 </field>  | ||||
|             </field> | ||||
|         </record> | ||||
|                  		 | ||||
|     </data> | ||||
| </openerp> | ||||
|  |  | |||
|  | @ -1,11 +1,6 @@ | |||
| <?xml version="1.0"?> | ||||
| <!--   | ||||
|     <reports> | ||||
|         <report>account.report_invoice</report> | ||||
|     </reports> | ||||
| --> | ||||
| <document filename="Rechnung.pdf"> | ||||
|   <template pageSize="(595.0,842.0)" title="Sale Order" author="Andreas Brückl" allowSplitting="20"> | ||||
|   <template pageSize="(595.0,842.0)" title="Sale Order" author="Camadeus Consulting" allowSplitting="20"> | ||||
|     <pageTemplate id="first"> | ||||
|       <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/> | ||||
|     </pageTemplate> | ||||
|  | @ -18,87 +13,95 @@ | |||
|     </para> | ||||
|     <para>[[repeatIn(objects,'o')]] [[ setLang(o.partner_id.commercial_partner_id.lang)]]</para> | ||||
| 
 | ||||
| 	<blockTable colWidths="270,85,145" style="Struktur"> | ||||
| 		<tr> | ||||
| 			<td> | ||||
| 				<section>   | ||||
| 				    <para style="fett">[[ o.partner_id.commercial_partner_id.name ]]</para> | ||||
|                     <para style="normal">[[ (o.partner_id.commercial_partner_id.id != o.partner_id.id and o.partner_id.name) or '' ]] </para> | ||||
| 				    <para style="normal">[[ (o.partner_id.street ) or '']]</para> | ||||
| 				    <para style="normal">[[ (o.partner_id.street2) or removeParentNode('para') ]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_id.zip) or '' ]] [[ (o.partner_id and o.partner_id.city) or '' ]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_id.state_id and o.partner_id.state_id.name) or removeParentNode('para')]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_id.country_id and o.partner_id.country_id.name) or '' ]]</para> | ||||
| 				    <!-- Für Sichtfenster --> | ||||
| 				    <section>[[ not (o.partner_id.commercial_partner_id and o.partner_id.commercial_partner_id.ref) or removeParentNode('section') ]] | ||||
| 					    <para style="normal"> </para> | ||||
| 				    </section> 				     | ||||
| 				</section> | ||||
| 				<para></para>    				     | ||||
|     		</td> | ||||
|     		<td> | ||||
| 			    <para style="normal">Datum:</para> | ||||
| 			    <para style="normal">Quelldokument:</para> | ||||
| 			    <para style="normal">Kundenreferenz:</para> | ||||
| 			    <!--<para style="normal">Kundennummer:</para>--> | ||||
| 			    <para style="normal">Kunde UID Nr.:</para>    | ||||
| 				<para style="normal">Ansprechpartner:</para> | ||||
| 			</td> | ||||
|     		<td> | ||||
| 			    <para style="normal">[[ formatLang(o.date_invoice,date = True) ]] </para> | ||||
| 			    <para style="normal">[[ o.origin ]] </para> | ||||
| 			    <para style="normal">[[ o.name ]] </para> | ||||
| 			    <!--<para style="normal">[[ o.partner_id.commercial_partner_id.ref ]] </para>--> | ||||
| 			    <para style="normal">[[ o.partner_id.commercial_partner_id and o.partner_id.commercial_partner_id.vat or '' ]] </para>    | ||||
| 				<para style="normal">[[ (o.user_id and o.user_id.name) or '' ]] </para> | ||||
| 			</td> | ||||
| 		</tr>     | ||||
| 		<!--   | ||||
| 		<tr> | ||||
| 			<td> | ||||
|     			<section>[[ (o.partner_shipping_id and o.partner_shipping_id.id != o.partner_id.id) or removeParentNode('section')]]     | ||||
|                     <spacer length="0.5cm"/>  | ||||
| 				    <para style="normal">Lieferadresse:</para> | ||||
| 				    <para style="normal">[[ o.partner_shipping_id.commercial_partner_id.name ]]</para> | ||||
|                     <para style="normal">[[ (o.partner_shipping_id.commercial_partner_id.id != o.partner_shipping_id.id and o.partner_shipping_id.name) or '' ]] </para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.street ) or '']]</para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.street2) or removeParentNode('para') ]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.zip) or '' ]] [[ (o.partner_shipping_id and o.partner_shipping_id.city) or '' ]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name) or removeParentNode('para')]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name) or '' ]]</para>     | ||||
| 				</section> | ||||
| 				<para style="normal"> </para> | ||||
|     		</td> | ||||
|     		<td> | ||||
|             	<para style="normal"> </para> | ||||
| 			</td> | ||||
|     		<td> | ||||
|             	<para style="normal"> </para> | ||||
| 			</td> | ||||
| 		</tr>    | ||||
| 		-->		 | ||||
| 	</blockTable> | ||||
|      | ||||
|     <para style="fett">[[ o.partner_id.commercial_partner_id.name ]]</para> | ||||
|     <para style="normal">[[ (o.partner_id.commercial_partner_id.id != o.partner_id.id and o.partner_id.name) or '' ]] </para> | ||||
|     <para style="normal">[[ (o.partner_id.street ) or '']]</para> | ||||
|     <para style="normal">[[ (o.partner_id.street2) or removeParentNode('para') ]]</para> | ||||
|     <para style="normal">[[ (o.partner_id.zip) or '' ]] [[ (o.partner_id and o.partner_id.city) or '' ]]</para> | ||||
|     <para style="normal">[[ (o.partner_id.state_id and o.partner_id.state_id.name) or removeParentNode('para')]]</para> | ||||
|     <para style="normal">[[ (o.partner_id.country_id and o.partner_id.country_id.name) or '' ]]</para> | ||||
|         | ||||
|     <blockTable colWidths="90,110" style="Struktur" hAlign="RIGHT"> | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para style="normal">Kundennr.:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ o.partner_id.ref or removeParentNode('tr') ]]</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para style="normal">Ihre Referenz:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ o.name ]]</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para style="normal">Ansprechpartner:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ (o.user_id and o.user_id.name) or '' ]]</para> | ||||
|         </td> | ||||
|       </tr>   | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para style="normal">Ihre UID:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ o.partner_id.commercial_partner_id and o.partner_id.commercial_partner_id.vat or '' ]]</para> | ||||
|         </td> | ||||
|       </tr>                                                                                                      | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para style="normal">Datum:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ formatLang(o.date_invoice,date = True) ]]</para> | ||||
|         </td> | ||||
|       </tr>                                        | ||||
|     </blockTable>     | ||||
|      | ||||
| 
 | ||||
| 
 | ||||
|    <para style="ueberschrift"><b>Rechnung [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|    <para style="ueberschrift"><b>PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</b></para> | ||||
|    <para style="ueberschrift"><b>Rechnungsentwurf [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</b></para> | ||||
|    <para style="ueberschrift"><b>Stornierte Rechnung [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|    <para style="ueberschrift"><b>Stornorechnung [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|    <para style="ueberschrift"><b>Stornorechnung [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|    <para style="ueberschrift"><b>Rechnung [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|    <spacer length="1.0cm"/> | ||||
| 	 | ||||
|    <para style="ueberschrift2"><b>Rechnung [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|    <para style="ueberschrift2"><b>PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</b></para> | ||||
|    <para style="ueberschrift2"><b>Rechnungsentwurf [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</b></para> | ||||
|    <para style="ueberschrift2"><b>Stornierte Rechnung [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|    <para style="ueberschrift2"><b>Stornorechnung [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|    <para style="ueberschrift2"><b>Stornorechnung [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|    <para style="ueberschrift2"><b>Rechnung [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para> | ||||
|      | ||||
|     <spacer length="0.5cm"/> | ||||
|      | ||||
|     <blockTable colWidths="30,57,203,45,60,40,75" repeatRows="1" style="TabelleHaupt" hAlign="LEFT"> | ||||
|     <blockTable colWidths="30,57,170,75,63,40,75" repeatRows="1" style="TabelleHaupt" hAlign="LEFT"> | ||||
|       <tr> | ||||
|         <td> | ||||
|           <para style="tabelle_header">Pos</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="tabelle_header">Art-nr.</para> | ||||
|           <para style="tabelle_header">Art.nr.</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="tabelle_header_links">Bezeichnung</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="tabelle_header">Menge</para> | ||||
|           <para style="tabelle_header_links">Menge</para> | ||||
|         </td>  | ||||
|         <td> | ||||
|           <para style="tabelle_header_rechts">E-Preis</para> | ||||
|           <para style="tabelle_header_rechts">Einzelpreis</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="tabelle_header"></para> | ||||
|  | @ -125,7 +128,7 @@ | |||
|             </section>            | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="tabelle_daten_center">[[formatLang(line.quantity, digits=2)[-2:]=='00' and formatLang(line.quantity, digits=0) or formatLang(line.quantity, digits=2)]]</para> | ||||
|           <para style="tabelle_daten_links">[[formatLang(line.quantity, digits=2)[-2:]=='00' and formatLang(line.quantity, digits=0) or formatLang(line.quantity, digits=2)]] [[ line.uos_id.name ]]</para> | ||||
|         </td>    | ||||
|         <td> | ||||
|           <para style="tabelle_daten_rechts">[[ formatLang(line.price_unit,digits=2) ]]</para> | ||||
|  | @ -151,15 +154,15 @@ | |||
|           <para style="schlussrechnung">[[ formatLang(o.amount_untaxed,digits=2 )]]</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr> | ||||
|       <tr>[[ repeatIn(o.tax_line,'tax') ]] | ||||
|         <td> | ||||
|             <para></para> | ||||
|           <para style="schlussrechnung"></para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="schlussrechnung">MwSt. in €</para> | ||||
|           <para style="schlussrechnung">MwSt. [[tax.name.split(" ")[0] or ""]] in €</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="schlussrechnung">[[ formatLang(o.amount_tax,digits=2 ) ]]</para> | ||||
|           <para style="schlussrechnung">[[ formatLang(tax.tax_amount) ]]</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr> | ||||
|  | @ -173,6 +176,17 @@ | |||
|           <para style="schlussrechnung_fett">[[ formatLang(o.amount_total,digits=2 ) ]]</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para></para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="schlussrechnung">Rechnungsbetrag inkl. Skonto in €</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="schlussrechnung">[[ (o.skonto_betrag_inkl and formatLang(o.skonto_betrag_inkl,digits=2)) or removeParentNode('tr') ]]</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|     </blockTable> | ||||
|      | ||||
|     <spacer length="0.5cm"/> | ||||
|  | @ -185,7 +199,7 @@ | |||
| 
 | ||||
|     <spacer length="0.5cm"/> | ||||
|      | ||||
|     <blockTable colWidths="110,300" style="Struktur" hAlign="LEFT"> | ||||
| 	<blockTable colWidths="110,390" style="Struktur" hAlign="LEFT"> | ||||
|       <tr> | ||||
|         <td> | ||||
|           <para style="normal">Zahlungsbedingungen:</para> | ||||
|  | @ -196,13 +210,27 @@ | |||
|       </tr> | ||||
|     </blockTable> | ||||
|      | ||||
|     <!--  | ||||
|     <spacer length="0.5cm"/> | ||||
|     <para style="normal">Vielen Dank für Ihren Auftrag!</para> | ||||
|     <spacer length="0.5cm"/> | ||||
|     <para style="normal"> | ||||
|         Bis zur Bezahlung aller Ansprüche aus den Geschäftsverbindungen behält sich der Verkäufer das Eigentum an seinen Warenlieferungen vor. Es gelten unsere Allgemeinen Geschäftsbedingungen. | ||||
|     </para> | ||||
| 
 | ||||
|     <blockTable colWidths="500" style="Struktur" hAlign="LEFT"> | ||||
|       <tr> | ||||
|         <td> | ||||
|           <para style="normal"></para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr>[[ o.date_due and o.payment_term and o.payment_term.skonto_prozent or removeParentNode('tr') ]] | ||||
|         <td> | ||||
|           <para style="normal">Zahlbar bis [[ formatLang(o.skonto_faelligkeit,date = True) ]] abzüglich [[ formatLang(o.payment_term.skonto_prozent,digits=2) ]]% beträgt [[ formatLang(o.skonto_betrag_inkl,digits=2) ]]€.</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr>[[ o.date_due or removeParentNode('tr') ]] | ||||
|         <td> | ||||
|           <para style="normal">Zahlbar bis [[ formatLang(o.date_due,date = True) ]] ohne Abzug.</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|     </blockTable> | ||||
|     --> | ||||
|      | ||||
|   </story> | ||||
| </document> | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ | |||
|          | ||||
|             <blockTableStyle id="TabelleHaupt"> | ||||
|               <blockAlignment value="LEFT"/> | ||||
|               <blockValign value="MIDDLE"/> | ||||
|               <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"/> | ||||
|  | @ -48,54 +48,50 @@ | |||
|               <blockValign value="MIDDLE"/>  | ||||
|             </blockTableStyle>             | ||||
|          </stylesheet> | ||||
|         <pageGraphics> | ||||
|             <!-- Logo --> | ||||
|             <image x="13cm" y="26.75cm" height="46" width="180" preserveAspectRatio="1" >[[ company.logo]]</image> | ||||
|           | ||||
|             <!-- Absenderkopf --> | ||||
|             <place x="1.5cm" y="24.5cm" height="1.5cm" width="14cm"> | ||||
|                 <para style="header"><u>[[ company.partner_id.name ]], [[ company.partner_id.street ]], [[ company.partner_id.zip ]] [[ company.partner_id.city ]]</u></para> | ||||
|         <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="9"/> | ||||
|             <drawRightString x="18.9cm" y="3.5cm">Seite <pageNumber/> </drawRightString> | ||||
| 
 | ||||
|             <!-- Seperator --> | ||||
|             <fill color="#000000"/> | ||||
|             <rect x="1.4cm" y="3.1cm" width="17.5cm" height="0.01cm" fill="yes" stroke="no"/>              | ||||
|              | ||||
|             <!-- Footer links --> | ||||
|             <place x="1.5cm" y="0cm" height="3cm" width="7cm"> | ||||
|                 <para style="footer">--</para> | ||||
|                 <para style="footer">--</para> | ||||
|                 <para style="footer">--</para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|             </place> | ||||
|              | ||||
|             <!-- Footer Mitte --> | ||||
|             <place x="8cm" y="0cm" height="3cm" width="7cm"> | ||||
|                 <para style="footer">[[ company.partner_id.street ]]</para> | ||||
|                 <para style="footer">[[ company.partner_id.zip ]] [[ company.partner_id.city ]]</para> | ||||
|                 <para style="footer">UID: [[company.vat ]]</para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|             </place>             | ||||
|              | ||||
|             <!-- Footer rechts --> | ||||
|             <place x="15cm" y="0cm" height="3cm" width="7cm"> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para> | ||||
|                 <para style="footer"></para>             | ||||
|             </place>    | ||||
|             <setFont name="Helvetica" size="8"/>       | ||||
| 			<drawRightString x="561" y="58">Seite <pageNumber/> </drawRightString> | ||||
| 
 | ||||
|         </pageGraphics> | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,85 +1,90 @@ | |||
| <?xml version="1.0"?> | ||||
| <!--   | ||||
|     <reports> | ||||
|         <report>sale.report_saleorder</report> | ||||
|     </reports> | ||||
| --> | ||||
| 
 | ||||
| <document filename="Sales Order.pdf"> | ||||
|   <template pageSize="(595.0,842.0)" title="Sale Order" author="Andreas Brückl" allowSplitting="20"> | ||||
| <document filename="Auftrag.pdf"> | ||||
|   <template pageSize="(595.0,842.0)" title="Sale Order" author="Camadeus Consulting" allowSplitting="20"> | ||||
|     <pageTemplate id="first"> | ||||
|       <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/> | ||||
|     </pageTemplate> | ||||
|   </template> | ||||
| 
 | ||||
|   <story> | ||||
|   	 | ||||
|     <para> | ||||
|       <seqReset id="L1"/> | ||||
|     </para> | ||||
|     <para>[[repeatIn(objects,'o')]] [[ setLang(o.partner_id.commercial_partner_id.lang)]]</para> | ||||
|      | ||||
|     <para style="fett">[[ o.partner_id.commercial_partner_id.name ]]</para> | ||||
|     <para style="normal">[[ (o.partner_id.commercial_partner_id.id != o.partner_id.id and o.partner_id.name) or '' ]] </para> | ||||
|     <para style="normal">[[ (o.partner_id.street ) or '']]</para> | ||||
|     <para style="normal">[[ (o.partner_id.street2) or removeParentNode('para') ]]</para> | ||||
|     <para style="normal">[[ (o.partner_id.zip) or '' ]] [[ (o.partner_id and o.partner_id.city) or '' ]]</para> | ||||
|     <para style="normal">[[ (o.partner_id.state_id and o.partner_id.state_id.name) or removeParentNode('para')]]</para> | ||||
|     <para style="normal">[[ (o.partner_id.country_id and o.partner_id.country_id.name) or '' ]]</para> | ||||
| 
 | ||||
| 
 | ||||
|     <blockTable colWidths="100,110" style="Struktur" hAlign="RIGHT"> | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para style="normal">Ihre Referenz:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ o.client_order_ref ]]</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para style="normal">Ansprechpartner:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ (o.user_id and o.user_id.name) or '' ]]</para> | ||||
|         </td> | ||||
|       </tr>   | ||||
|       <tr> [[ o.user_id and o.user_id.phone or removeParentNode('tr') ]] | ||||
|         <td> | ||||
|             <para style="normal">Tel.:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ (o.user_id and o.user_id.phone) or '' ]]</para> | ||||
|         </td> | ||||
|       </tr>       | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para style="normal">Ihre UID:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ o.partner_id.commercial_partner_id and o.partner_id.commercial_partner_id.vat or '' ]]</para> | ||||
|         </td> | ||||
|       </tr>                                                                                                      | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para style="normal">Angebotsdatum:[[ o.state not in ['draft','sent'] and removeParentNode('para') ]]</para> | ||||
|             <para style="normal">Bestelldatum:[[ o.state in ['draft','sent'] and removeParentNode('para') ]]</para> | ||||
|         </td> | ||||
|         <td> | ||||
|             <para style="normal">[[ formatLang(o.date_order,date = True)  ]]</para> | ||||
|         </td> | ||||
|       </tr>                                             | ||||
|     </blockTable> | ||||
| 	<blockTable colWidths="270,85,145" style="Struktur"> | ||||
| 		<tr> | ||||
| 			<td> | ||||
| 				<section>   | ||||
| 				    <para style="fett">[[ o.partner_id.commercial_partner_id.name ]]</para> | ||||
|                     <para style="normal">[[ (o.partner_id.commercial_partner_id.id != o.partner_id.id and o.partner_id.name) or '' ]] </para> | ||||
| 				    <para style="normal">[[ (o.partner_id.street ) or '']]</para> | ||||
| 				    <para style="normal">[[ (o.partner_id.street2) or removeParentNode('para') ]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_id.zip) or '' ]] [[ (o.partner_id and o.partner_id.city) or '' ]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_id.state_id and o.partner_id.state_id.name) or removeParentNode('para')]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_id.country_id and o.partner_id.country_id.name) or '' ]]</para> | ||||
| 				    <!-- Für Sichtfenster --> | ||||
| 				    <section>[[ not (o.partner_id.commercial_partner_id and o.partner_id.commercial_partner_id.ref) or removeParentNode('section') ]] | ||||
| 					    <para style="normal"> </para> | ||||
| 				    </section> 				     | ||||
| 				</section> | ||||
| 				<para></para>    				     | ||||
|     		</td> | ||||
|     		<td> | ||||
|             	<para style="normal">Angebotsdatum:[[ o.state not in ['draft','sent'] and removeParentNode('para') ]]</para> | ||||
|             	<para style="normal">Bestelldatum:[[ o.state in ['draft','sent'] and removeParentNode('para') ]]</para> | ||||
| 			    <para style="normal">Quelldokument:</para> | ||||
| 			    <para style="normal">Referenz:</para> | ||||
| 			    <!--<para style="normal">Kundennummer:</para>--> | ||||
| 			    <para style="normal">Kunde UID Nr.:</para> | ||||
| 				<para style="normal">Ansprechpartner:</para> | ||||
| 			</td> | ||||
|     		<td> | ||||
| 			    <para style="normal">[[ formatLang(o.date_order,date = True) ]] </para> | ||||
| 			    <para style="normal">[[ o.origin ]] </para> | ||||
| 			    <para style="normal">[[ o.client_order_ref ]] </para> | ||||
| 			    <!--<para style="normal">[[ o.partner_id.commercial_partner_id.ref ]] </para>--> | ||||
| 			    <para style="normal">[[ o.partner_id.commercial_partner_id and o.partner_id.commercial_partner_id.vat or '' ]] </para>    | ||||
| 				<para style="normal">[[ (o.user_id and o.user_id.name) or '' ]] </para> | ||||
| 			</td> | ||||
| 		</tr>     | ||||
| 		<!--   | ||||
| 		<tr> | ||||
| 			<td> | ||||
|     			<section>[[ (o.partner_shipping_id and o.partner_shipping_id.id != o.partner_id.id) or removeParentNode('section')]]     | ||||
|                     <spacer length="0.5cm"/>  | ||||
| 				    <para style="normal">Lieferadresse:</para> | ||||
| 				    <para style="normal">[[ o.partner_shipping_id.commercial_partner_id.name ]]</para> | ||||
|                     <para style="normal">[[ (o.partner_shipping_id.commercial_partner_id.id != o.partner_shipping_id.id and o.partner_shipping_id.name) or '' ]] </para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.street ) or '']]</para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.street2) or removeParentNode('para') ]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.zip) or '' ]] [[ (o.partner_shipping_id and o.partner_shipping_id.city) or '' ]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name) or removeParentNode('para')]]</para> | ||||
| 				    <para style="normal">[[ (o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name) or '' ]]</para>     | ||||
| 				</section> | ||||
| 				<para style="normal"> </para> | ||||
|     		</td> | ||||
|     		<td> | ||||
|             	<para style="normal"> </para> | ||||
| 			</td> | ||||
|     		<td> | ||||
|             	<para style="normal"> </para> | ||||
| 			</td> | ||||
| 		</tr>    | ||||
| 		-->		 | ||||
| 	</blockTable> | ||||
|      | ||||
|    <spacer length="1.0cm"/> | ||||
|     | ||||
|     <section> | ||||
|        <para style="ueberschrift"><b>[[ o.state not in ['draft','sent'] and removeParentNode('para') ]] Angebot [[ o.name ]]</b></para> | ||||
|        <para style="ueberschrift"><b>[[ o.state in ['draft','sent'] and removeParentNode('para') ]] Bestellbestätigung [[ o.name ]]</b></para> | ||||
|        <para style="ueberschrift2"><b>[[ o.state not in ['draft','sent'] and removeParentNode('para') ]] Angebot [[ o.name ]]</b></para> | ||||
|        <para style="ueberschrift2"><b>[[ o.state in ['draft','sent'] and removeParentNode('para') ]] Bestellbestätigung [[ o.name ]]</b></para> | ||||
|     </section> | ||||
| 
 | ||||
|     <spacer length="0.5cm"/> | ||||
|      | ||||
|     <blockTable colWidths="30,57,213,45,50,40,75" repeatRows="1" style="TabelleHaupt" hAlign="LEFT"> | ||||
|     <blockTable colWidths="30,57,170,75,63,40,75" repeatRows="1" style="TabelleHaupt" hAlign="LEFT"> | ||||
|       <tr> | ||||
|         <td> | ||||
|           <para style="tabelle_header">Pos</para> | ||||
|  | @ -91,10 +96,10 @@ | |||
|           <para style="tabelle_header_links">Bezeichnung</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="tabelle_header">Menge</para> | ||||
|           <para style="tabelle_header_links">Menge</para> | ||||
|         </td>  | ||||
|         <td> | ||||
|           <para style="tabelle_header_rechts">E-Preis</para> | ||||
|           <para style="tabelle_header_rechts">Einzelpreis</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="tabelle_header"></para> | ||||
|  | @ -120,9 +125,8 @@ | |||
|                 <para style="tabelle_daten_links">[[ paragraphs ]]</para>    | ||||
|             </section>            | ||||
|         </td> | ||||
|             | ||||
|         <td> | ||||
|           <para style="tabelle_daten_center">[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty, digits=0) ]]</para> | ||||
|           <para style="tabelle_daten_links">[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty, digits=0) ]] [[ line.product_uom.name ]]</para> | ||||
|         </td>    | ||||
|         <td> | ||||
|           <para style="tabelle_daten_rechts">[[ formatLang(line.price_unit,digits=2) ]]</para> | ||||
|  | @ -170,6 +174,17 @@ | |||
|           <para style="schlussrechnung_fett">[[ formatLang(o.amount_total,digits=2 ) ]]</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr> | ||||
|         <td> | ||||
|             <para></para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="schlussrechnung">Rechnungsbetrag inkl. Skonto in €</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="schlussrechnung">[[ (o.skonto_betrag_inkl and formatLang(o.skonto_betrag_inkl,digits=2)) or removeParentNode('tr') ]]</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|     </blockTable> | ||||
| 
 | ||||
|     <spacer length="0.5cm"/> | ||||
|  | @ -182,10 +197,10 @@ | |||
| 
 | ||||
|     <spacer length="0.5cm"/> | ||||
|      | ||||
|     <blockTable colWidths="110,300" style="Struktur" hAlign="LEFT"> | ||||
| 	<blockTable colWidths="110,390" style="Struktur" hAlign="LEFT"> | ||||
|       <tr> | ||||
|         <td> | ||||
|           <para style="normal">Zahlungsziele:</para> | ||||
|           <para style="normal">Zahlungsbedingungen:</para> | ||||
|         </td> | ||||
|         <td> | ||||
|           <para style="normal">[[ (o.payment_term and o.payment_term.note) or removeParentNode('blockTable') ]]</para> | ||||
|  | @ -193,7 +208,27 @@ | |||
|       </tr> | ||||
|     </blockTable> | ||||
|      | ||||
|     <!--  | ||||
|     <spacer length="0.5cm"/> | ||||
| 
 | ||||
|     <blockTable colWidths="500" style="Struktur" hAlign="LEFT"> | ||||
|       <tr> | ||||
|         <td> | ||||
|           <para style="normal"></para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr>[[ o.date_due and o.payment_term and o.payment_term.skonto_prozent or removeParentNode('tr') ]] | ||||
|         <td> | ||||
|           <para style="normal">Zahlbar bis [[ formatLang(o.skonto_faelligkeit,date = True) ]] abzüglich [[ formatLang(o.payment_term.skonto_prozent,digits=2) ]]% beträgt [[ formatLang(o.skonto_betrag_inkl,digits=2) ]]€.</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|       <tr>[[ o.date_due or removeParentNode('tr') ]] | ||||
|         <td> | ||||
|           <para style="normal">Zahlbar bis [[ formatLang(o.date_due,date = True) ]] ohne Abzug.</para> | ||||
|         </td> | ||||
|       </tr> | ||||
|     </blockTable> | ||||
|     --> | ||||
|      | ||||
|   </story> | ||||
| </document> | ||||
|  |  | |||
|  | @ -1,68 +1,52 @@ | |||
| <?xml version="1.0"?> | ||||
| <!--   | ||||
|     <reports> | ||||
|         <report>stock.report_picking</report> | ||||
|     </reports> | ||||
| --> | ||||
| 
 | ||||
| <document filename="test.pdf"> | ||||
|   <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20"> | ||||
| <document filename="Lieferschein.pdf"> | ||||
|   <template pageSize="(595.0,842.0)" title="Sale Order" author="Camadeus Consulting" allowSplitting="20"> | ||||
|     <pageTemplate id="first"> | ||||
|       <frame id="first" x1="34.0" y1="57.0" width="504" height="728"/> | ||||
|       <frame id="first" x1="15.0" y1="42.0" width="539" height="758"/> | ||||
|     </pageTemplate> | ||||
|   </template> | ||||
|   | ||||
|   <story> | ||||
|   	 | ||||
|     <para> | ||||
|       <seqReset id="L1"/> | ||||
|     </para>   | ||||
|      | ||||
|     <para>[[ repeatIn(objects,'picking') ]] [[ picking.partner_id and setLang(picking.partner_id.lang) ]]</para> | ||||
| 
 | ||||
|     <para style="fett">[[ picking.partner_id.commercial_partner_id.name ]]</para> | ||||
|     <para style="normal">[[ (picking.partner_id.commercial_partner_id.id != picking.partner_id.id and picking.partner_id.name) or '' ]] </para> | ||||
|     <para style="normal">[[ (picking.partner_id and picking.partner_id.street ) or '']]</para> | ||||
|     <para style="normal">[[ (picking.partner_id and picking.partner_id.street2) or removeParentNode('para') ]]</para> | ||||
|     <para style="normal">[[ (picking.partner_id and picking.partner_id.zip) or '' ]] [[ (picking.partner_id and picking.partner_id.city) or '' ]]</para> | ||||
|     <para style="normal">[[ (picking.partner_id and picking.partner_id.state_id and picking.partner_id.state_id.name) or removeParentNode('para')]]</para> | ||||
|     <para style="normal">[[ (picking.partner_id and picking.partner_id.country_id and picking.partner_id.country_id.name) or '' ]]</para> | ||||
| 	<blockTable colWidths="270,85,145" style="Struktur"> | ||||
| 		<tr> | ||||
| 			<td> | ||||
| 				<section>   | ||||
| 				    <para style="fett">[[ picking.partner_id.commercial_partner_id.name ]]</para> | ||||
|                     <para style="normal">[[ (picking.partner_id.commercial_partner_id.id != picking.partner_id.id and picking.partner_id.name) or '' ]] </para> | ||||
| 				    <para style="normal">[[ (picking.partner_id.street ) or '']]</para> | ||||
| 				    <para style="normal">[[ (picking.partner_id.street2) or removeParentNode('para') ]]</para> | ||||
| 				    <para style="normal">[[ (picking.partner_id.zip) or '' ]] [[ (picking.partner_id and picking.partner_id.city) or '' ]]</para> | ||||
| 				    <para style="normal">[[ (picking.partner_id.state_id and picking.partner_id.state_id.name) or removeParentNode('para')]]</para> | ||||
| 				    <para style="normal">[[ (picking.partner_id.country_id and picking.partner_id.country_id.name) or '' ]]</para> | ||||
| 				    <!-- Für Sichtfenster --> | ||||
| 				    <section>[[ not (picking.partner_id.commercial_partner_id and picking.partner_id.commercial_partner_id.ref) or removeParentNode('section') ]] | ||||
| 					    <para style="normal"> </para> | ||||
| 				    </section> 				     | ||||
| 				</section> | ||||
| 				<para></para>    				     | ||||
|     		</td> | ||||
|     		<td> | ||||
| 			    <para style="normal">Datum:</para> | ||||
| 			    <para style="normal">Bestellung:</para> | ||||
| 			    <para style="normal">Kundenreferenz:</para> | ||||
| 			    <para style="normal">Kundennr.:</para>    | ||||
| 			</td> | ||||
|     		<td> | ||||
| 			    <para style="normal">[[ formatLang(picking.date_done, date=True) or formatLang(time.strftime('%Y-%m-%d'),date=True) ]] </para> | ||||
| 			    <para style="normal">[[ picking.origin ]] </para> | ||||
| 			    <para style="normal">[[ picking.sale_id and picking.sale_id.client_order_ref or '' ]] </para> | ||||
| 			    <para style="normal">[[ picking.partner_id and picking.partner_id.commercial_partner_id and picking.partner_id.commercial_partner_id.ref or '' ]] </para>    | ||||
| 			</td> | ||||
| 		</tr>     | ||||
| 	</blockTable> | ||||
|        | ||||
|      | ||||
|     <blockTable colWidths="100,110" style="Struktur" hAlign="RIGHT">          | ||||
|        <tr> | ||||
|          <td> | ||||
|              <para style="normal">Bestellung:</para> | ||||
|          </td> | ||||
|          <td> | ||||
|              <para style="normal">[[ picking.origin ]]</para> | ||||
|          </td> | ||||
|        </tr>           | ||||
|        <tr> | ||||
|          <td> | ||||
|              <para style="normal">Datum:</para> | ||||
|          </td> | ||||
|          <td> | ||||
|              <para style="normal">[[ formatLang(picking.date_done, date=True) or formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para> | ||||
|          </td> | ||||
|        </tr>         | ||||
|        <tr> | ||||
|          <td> | ||||
|              <para style="normal">Referenz:</para> | ||||
|          </td> | ||||
|          <td> | ||||
|              <para style="normal">[[ picking.sale_id and picking.sale_id.client_order_ref or '' ]]</para> | ||||
|          </td> | ||||
|        </tr>  | ||||
|        <tr> | ||||
|          <td> | ||||
|              <para style="normal">Kundennr.:</para> | ||||
|          </td> | ||||
|          <td> | ||||
|              <para style="normal">[[ picking.partner_id and picking.partner_id.commercial_partner_id and picking.partner_id.commercial_partner_id.ref or '' ]]</para> | ||||
|          </td> | ||||
|        </tr>                     | ||||
|                                                       | ||||
|     </blockTable>     | ||||
|    <spacer length="1.0cm"/> | ||||
|       | ||||
|     <para style="ueberschrift">Lieferschein [[ picking.name ]]</para> | ||||
|   	 | ||||
|  |  | |||
|  | @ -97,11 +97,21 @@ class Config(): | |||
| #                 'prefix': 'AS-', | ||||
| #                 'padding': 5, | ||||
| #             },                            | ||||
| # FEHLER da gleich für alle Vorgangstypen!!!            'picking.out':  {  | ||||
| #                 'number_next_actual': 1,  | ||||
| #                 'prefix': 'L-', | ||||
| #                 'padding': 5, | ||||
| #             }, | ||||
| #            'picking.out':  {  | ||||
| #                #'number_next_actual': 1,  | ||||
| #                'prefix': 'LS/', | ||||
| #                'padding': 4, | ||||
| #            }, | ||||
| #            'picking.in':  {  | ||||
| #                #'number_next_actual': 1,  | ||||
| #                'prefix': 'LS/IN/', | ||||
| #                'padding': 4, | ||||
| #            },                    | ||||
| #            'picking.int':  {  | ||||
| #                #'number_next_actual': 1,  | ||||
| #                'prefix': 'LS/INT/', | ||||
| #                'padding': 4, | ||||
| #            }, | ||||
| #             'purchase.order':  {  | ||||
| #                 'number_next_actual': 1,  | ||||
| #                 'prefix': 'B-', | ||||
|  |  | |||
|  | @ -203,18 +203,33 @@ class CamadeusFunctions(): | |||
|         res = self._execute('base.module.upgrade', 'upgrade_module', modules_to_install) | ||||
|         return True | ||||
| 
 | ||||
|     def _set_picking_sequence_prefix(self, code, value): | ||||
|         seq_dict = self.config.sequences | ||||
|          | ||||
|         #Hauptsequenz des Picking Types mit diesem code anpassen | ||||
|         picking_type_id = self._execute('stock.picking.type', 'search', [('code','=',code)], 0, 1, 'id')[0] | ||||
|         picking_type = self._execute('stock.picking.type', 'read', picking_type_id, ['sequence_id']) | ||||
|         s_id = picking_type['sequence_id'][0] | ||||
|         if not self._execute('ir.sequence', 'write', s_id, seq_dict.get(value)): | ||||
|             return False | ||||
|          | ||||
|         #Allen Picking Types mit diesem code die Haupsequenz geben | ||||
|         picking_type_ids = self._execute('stock.picking.type', 'search', [('code','=',code)]) | ||||
|         if not self._execute('stock.picking.type', 'write', picking_type_ids, {'sequence_id': s_id}): | ||||
|             return False | ||||
| 
 | ||||
|     def set_dokumentennummern(self): | ||||
|         """Dokumentennummern setzen""" | ||||
|          | ||||
|         seq_dict = self.config.sequences | ||||
|          | ||||
|          # Lieferschein | ||||
|         # Lieferschein | ||||
|         if seq_dict.get('picking.out',False):    | ||||
|             picking_type_ids = self._execute('stock.picking.type', 'search', [('code','=','outgoing')]) | ||||
|             picking_types = self._execute('stock.picking.type', 'read', picking_type_ids, ['sequence_id']) | ||||
|             s_ids = [t['sequence_id'][0] for t in picking_types] | ||||
|             if not self._execute('ir.sequence', 'write', s_ids, seq_dict.get('picking.out')): | ||||
|                 return False | ||||
|             self._set_picking_sequence_prefix('outgoing', 'picking.out') | ||||
|         if seq_dict.get('picking.in',False):      | ||||
|             self._set_picking_sequence_prefix('incoming', 'picking.in')       | ||||
|         if seq_dict.get('picking.int',False):       | ||||
|             self._set_picking_sequence_prefix('internal', 'picking.int') | ||||
|          | ||||
|         # Angebot | ||||
|         if seq_dict.get('sale.order',False): | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue