Merge branch 'master' of git:~/gitrepos/cam-template
commit
28c5d8878a
|
|
@ -13,7 +13,7 @@
|
||||||
</para>
|
</para>
|
||||||
<para>[[repeatIn(objects,'o')]] [[ setLang(o.partner_id.commercial_partner_id.lang)]]</para>
|
<para>[[repeatIn(objects,'o')]] [[ setLang(o.partner_id.commercial_partner_id.lang)]]</para>
|
||||||
|
|
||||||
<blockTable colWidths="270,85,145" style="Struktur">
|
<blockTable colWidths="270,230" style="Struktur">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<section>
|
<section>
|
||||||
|
|
@ -25,28 +25,69 @@
|
||||||
<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.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>
|
<para style="normal">[[ (o.partner_id.country_id and o.partner_id.country_id.name) or '' ]]</para>
|
||||||
<!-- Für Sichtfenster -->
|
<!-- Für Sichtfenster -->
|
||||||
|
|
||||||
<section>[[ not (o.partner_id.commercial_partner_id and o.partner_id.commercial_partner_id.ref) or removeParentNode('section') ]]
|
<section>[[ not (o.partner_id.commercial_partner_id and o.partner_id.commercial_partner_id.ref) or removeParentNode('section') ]]
|
||||||
<para style="normal"> </para>
|
<para style="normal"> </para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>[[ (o.partner_shipping_id and o.partner_shipping_id.id != o.partner_id.id) or removeParentNode('section')]]
|
||||||
|
<spacer length="1.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>
|
||||||
</section>
|
</section>
|
||||||
<para></para>
|
<para></para>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<blockTable colWidths="85,145" style="Struktur">
|
||||||
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<para style="normal">Angebotsdatum:[[ o.state not in ['draft','sent'] and removeParentNode('para') ]]</para>
|
<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">Bestelldatum:[[ o.state in ['draft','sent'] and removeParentNode('para') ]]</para>
|
||||||
<para style="normal">Quelldokument:</para>
|
</td>
|
||||||
<para style="normal">Referenz:</para>
|
<td>
|
||||||
<!--<para style="normal">Kundennummer:</para>-->
|
<para style="normal">[[ formatLang(o.date_order,date = True) ]]</para>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<para style="normal">Quelldokument:[[ o.state not in ['draft','sent'] and removeParentNode('tr') ]]</para>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<para style="normal">[[ o.origin ]]</para>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<para style="normal">Kundennummer:</para>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<para style="normal">[[ o.client_order_ref ]]</para>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
<para style="normal">Kunde UID Nr.:</para>
|
<para style="normal">Kunde UID Nr.:</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">Ansprechpartner:</para>
|
<para style="normal">Ansprechpartner:</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="normal">[[ formatLang(o.date_order,date = True) ]] </para>
|
<para style="normal">[[ (o.user_id and o.user_id.name) or '' ]]</para>
|
||||||
<para style="normal">[[ o.origin ]] </para>
|
</td>
|
||||||
<para style="normal">[[ o.client_order_ref ]] </para>
|
</tr>
|
||||||
<!--<para style="normal">[[ o.partner_id.commercial_partner_id.ref ]] </para>-->
|
</blockTable>
|
||||||
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!--
|
<!--
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ def main():
|
||||||
'set_decimal_price',
|
'set_decimal_price',
|
||||||
|
|
||||||
'set_translations',
|
'set_translations',
|
||||||
|
'set_default_removal_strategy',
|
||||||
]
|
]
|
||||||
|
|
||||||
if cmd == 'rollout':
|
if cmd == 'rollout':
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ class Config():
|
||||||
'group_stock_packaging': False, # Ermöglicht die Auswahl einer Verpackung
|
'group_stock_packaging': False, # Ermöglicht die Auswahl einer Verpackung
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.removal_strategy = 'fefo' #[fifo], [lifo], [fefo]
|
||||||
|
|
||||||
self.stock_cost_method = 'average' # [standard], [average], [real]
|
self.stock_cost_method = 'average' # [standard], [average], [real]
|
||||||
|
|
||||||
# Wenn gesetzt, teilen sich Gutschriften und Rechnungen den selben Nummernkreis
|
# Wenn gesetzt, teilen sich Gutschriften und Rechnungen den selben Nummernkreis
|
||||||
|
|
|
||||||
|
|
@ -583,3 +583,17 @@ class CamadeusFunctions():
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def set_default_removal_strategy(self):
|
||||||
|
"""Default Entnahmestrategie für Lager setzen"""
|
||||||
|
if hasattr(self.config, 'removal_strategy'):
|
||||||
|
method = self.config.removal_strategy
|
||||||
|
strategy_ids = self._execute('product.removal', 'search', [('method','=',method)])
|
||||||
|
if not strategy_ids:
|
||||||
|
return False
|
||||||
|
|
||||||
|
stock_id = self._execute('ir.model.data', 'xmlid_to_res_id', 'stock.stock_location_stock')
|
||||||
|
if not stock_id:
|
||||||
|
return False
|
||||||
|
|
||||||
|
return self._execute('stock.location', 'write', stock_id,{'removal_strategy_id':strategy_ids[0]})
|
||||||
|
return False
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue