Dokumentenvorlagen: Angebot/Auftrag und Rechnung Feedback
parent
9fbe0c0f1e
commit
440889d56a
|
|
@ -20,3 +20,22 @@ class SaleOrder(models.AbstractModel):
|
|||
'field_set_in_lines': self._field_set_in_lines,
|
||||
'formatLang': self._formatLang,
|
||||
}
|
||||
|
||||
|
||||
class SaleOrderProForma(models.AbstractModel):
|
||||
_name = 'report.sale.report_saleorder_pro_forma'
|
||||
_inherit = 'report.abstract_report'
|
||||
_template = 'sale.report_saleorder_pro_forma'
|
||||
|
||||
@api.model
|
||||
def get_report_values(self, docids, data=None):
|
||||
model = 'sale.order'
|
||||
docs = self.env[model].browse(docids)
|
||||
return {
|
||||
'doc_ids': docids,
|
||||
'doc_model': model,
|
||||
'docs': docs,
|
||||
'data': data,
|
||||
'field_set_in_lines': self._field_set_in_lines,
|
||||
'formatLang': self._formatLang,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
<!-- Sale Order Body -->
|
||||
<template id="report_saleorder_document">
|
||||
<t t-call="web.external_layout">
|
||||
|
|
@ -41,7 +40,7 @@
|
|||
<br/>
|
||||
<span t-esc="o.partner_shipping_id.country_id.name"/>
|
||||
</div>
|
||||
<div class="text-right" style="width:38%;float: left;margin-top: 80px;">
|
||||
<div class="text-right" style="width:38%;float: left;;">
|
||||
<div class="row" style="margin-right:0px;" t-if="o.partner_id.ref">
|
||||
<span class="col-xs-6 text-left">Kundennr.:</span>
|
||||
<span class="col-xs-6" t-field="o.partner_id.ref"/>
|
||||
|
|
@ -64,12 +63,14 @@
|
|||
<span class="col-xs-6" t-field="o.earliest_scheduled_date"
|
||||
t-options='{"format": "dd.MM.yyyy"}'/>
|
||||
</div>
|
||||
<div class="row" style="margin-right:0px;" t-if="o.state in ['draft','sent'] and o.validity_date">
|
||||
<div class="row" style="margin-right:0px;"
|
||||
t-if="o.state in ['draft','sent'] and o.validity_date">
|
||||
<span class="col-xs-6 text-left">Gültig bis:</span>
|
||||
<span class="col-xs-6" t-field="o.validity_date"
|
||||
t-options='{"format": "dd.MM.yyyy"}'/>
|
||||
</div>
|
||||
<div class="row" style="margin-right:0px;" t-if="o.state not in ['draft','sent'] and o.confirmation_date">
|
||||
<div class="row" style="margin-right:0px;"
|
||||
t-if="o.state not in ['draft','sent'] and o.confirmation_date">
|
||||
<span class="col-xs-6 text-left">Bestelldatum:</span>
|
||||
<span class="col-xs-6" t-field="o.confirmation_date"
|
||||
t-options='{"format": "dd.MM.yyyy"}'/>
|
||||
|
|
@ -86,12 +87,12 @@
|
|||
<span class="col-xs-6 text-left">Telefon:</span>
|
||||
<span class="col-xs-6" t-field="o.user_id.phone"/>
|
||||
</div>
|
||||
<div class="row oe_mt16" style="margin-right:0px;" >
|
||||
<span class="col-xs-offset-2 col-xs-4 text-left">Positionen:</span>
|
||||
<div class="row oe_mt16" style="margin-right:0px;">
|
||||
<span class="col-xs-6 text-left">Positionen:</span>
|
||||
<span class="col-xs-6" t-field="o.positions"/>
|
||||
</div>
|
||||
<div class="row" style="margin-right:0px;" >
|
||||
<span class="col-xs-offset-2 col-xs-4 text-left">Artikel:</span>
|
||||
<div class="row" style="margin-right:0px;">
|
||||
<span class="col-xs-6 text-left">Artikel:</span>
|
||||
<span class="col-xs-6" t-field="o.num_items"/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -100,8 +101,13 @@
|
|||
<div class="row oe_mt32">
|
||||
<div class="col-xs-12 text-left">
|
||||
<h4>
|
||||
<t t-if="not (env.context.get('proforma', False) or is_pro_forma)">
|
||||
<span t-if="o.state not in ['draft','sent']">Auftragsbestätigung</span>
|
||||
<span t-if="o.state in ['draft','sent']">Angebot</span>
|
||||
</t>
|
||||
<t t-if="env.context.get('proforma', False) or is_pro_forma">
|
||||
<span>Proformarechnung</span>
|
||||
</t>
|
||||
<span t-field="o.quote_name"/>
|
||||
</h4>
|
||||
</div>
|
||||
|
|
@ -133,6 +139,7 @@
|
|||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="order_line.product_id.weight"/>
|
||||
<span t-field="order_line.product_uom"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="order_line.price_unit"/>
|
||||
|
|
@ -213,6 +220,7 @@
|
|||
<br/>
|
||||
</p>
|
||||
<p class="col-xs-12" t-if="o.payment_term_id.note">
|
||||
Zahlungskonditionen:
|
||||
<span t-esc="o.payment_term_id.note"/>
|
||||
<br/>
|
||||
</p>
|
||||
|
|
@ -229,10 +237,20 @@
|
|||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
</data>
|
||||
<template id="sale.report_saleorder_pro_forma">
|
||||
<t t-call="web.html_container">
|
||||
<t t-set="is_pro_forma" t-value="True"/>
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="dp_reports_sale.report_saleorder_document" t-lang="o.partner_id.lang"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<record id="sale.action_report_saleorder" model="ir.actions.report">
|
||||
<field name="paperformat_id" ref="dp_reports.paperformat_a4_european"/>
|
||||
</record>
|
||||
|
||||
<record id="sale.action_report_pro_forma_invoice" model="ir.actions.report">
|
||||
<field name="paperformat_id" ref="dp_reports.paperformat_a4_european"/>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
|
|||
Loading…
Reference in New Issue