[IMP] *: sale order report: add demo data
Add Demo data in the Sale Order report to make edition more natural. *: account, sale, sale_management, web Part-of: odoo/odoo#128228
This commit is contained in:
@@ -297,13 +297,13 @@
|
||||
-->
|
||||
<t t-foreach="tax_totals['subtotals']" t-as="subtotal">
|
||||
<tr class="border-black o_subtotal">
|
||||
<td><strong t-out="subtotal['name']"/></td>
|
||||
<td><strong t-out="subtotal['name']">Untaxed Amount</strong></td>
|
||||
|
||||
<td class="text-end">
|
||||
<span
|
||||
t-att-class="oe_subtotal_footer_separator"
|
||||
t-out="subtotal['formatted_amount']"
|
||||
/>
|
||||
>9</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
<tr t-if="'formatted_rounding_amount' in tax_totals and tax_totals['rounding_amount'] != 0">
|
||||
<td>Rounding</td>
|
||||
<td class="text-end">
|
||||
<span t-out="tax_totals['formatted_rounding_amount']"/>
|
||||
<span t-out="tax_totals['formatted_rounding_amount']">9 Eur</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -322,7 +322,7 @@
|
||||
<tr class="border-black o_total">
|
||||
<td><strong>Total</strong></td>
|
||||
<td class="text-end">
|
||||
<span t-out="tax_totals['formatted_amount_total']"/>
|
||||
<span t-out="tax_totals['formatted_amount_total']">10.4 Eur</span>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -342,19 +342,19 @@
|
||||
<tr>
|
||||
<t t-if="tax_totals['display_tax_base']">
|
||||
<td>
|
||||
<span t-out="amount_by_group['tax_group_name']"/>
|
||||
<span t-out="amount_by_group['tax_group_name']">VAT 21%</span>
|
||||
<span class="text-nowrap"> on
|
||||
<t t-out="amount_by_group['formatted_tax_group_base_amount']"/>
|
||||
<t t-out="amount_by_group['formatted_tax_group_base_amount']">9 Eur</t>
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-end o_price_total">
|
||||
<span class="text-nowrap" t-out="amount_by_group['formatted_tax_group_amount']"/>
|
||||
<span class="text-nowrap" t-out="amount_by_group['formatted_tax_group_amount']">1.4 Eur</span>
|
||||
</td>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<td><span class="text-nowrap" t-out="amount_by_group['tax_group_name']"/></td>
|
||||
<td><span class="text-nowrap" t-out="amount_by_group['tax_group_name']">VAT 21%</span></td>
|
||||
<td class="text-end o_price_total">
|
||||
<span class="text-nowrap" t-out="amount_by_group['formatted_tax_group_amount']" />
|
||||
<span class="text-nowrap" t-out="amount_by_group['formatted_tax_group_amount']">1.4 Eur</span>
|
||||
</td>
|
||||
</t>
|
||||
</tr>
|
||||
|
||||
@@ -40,28 +40,28 @@
|
||||
<span t-if="env.context.get('proforma', False) or is_pro_forma">Pro-Forma Invoice # </span>
|
||||
<span t-elif="doc.state in ['draft','sent']">Quotation # </span>
|
||||
<span t-else="">Order # </span>
|
||||
<span t-field="doc.name"/>
|
||||
<span t-field="doc.name">SO0000</span>
|
||||
</h2>
|
||||
|
||||
<div class="row mt-4 mb-4" id="informations">
|
||||
<div t-if="doc.client_order_ref" class="col-auto col-3 mw-100 mb-2" name="informations_reference">
|
||||
<strong>Your Reference:</strong>
|
||||
<p class="m-0" t-field="doc.client_order_ref"/>
|
||||
<p class="m-0" t-field="doc.client_order_ref">S:0000</p>
|
||||
</div>
|
||||
<div t-if="doc.date_order" class="col-auto col-3 mw-100 mb-2" name="informations_date">
|
||||
<strong t-if="doc.state in ['draft', 'sent']">Quotation Date:</strong>
|
||||
<strong t-else="">Order Date:</strong>
|
||||
<p class="m-0" t-field="doc.date_order" t-options='{"widget": "date"}'/>
|
||||
<p class="m-0" t-field="doc.date_order" t-options='{"widget": "date"}'>2023-07-10</p>
|
||||
</div>
|
||||
<div t-if="doc.validity_date and doc.state in ['draft', 'sent']"
|
||||
class="col-auto col-3 mw-100 mb-2"
|
||||
name="expiration_date">
|
||||
<strong>Expiration:</strong>
|
||||
<p class="m-0" t-field="doc.validity_date"/>
|
||||
<p class="m-0" t-field="doc.validity_date">2023-07-10</p>
|
||||
</div>
|
||||
<div t-if="doc.user_id.name" class="col-auto col-3 mw-100 mb-2">
|
||||
<strong>Salesperson:</strong>
|
||||
<p class="m-0" t-field="doc.user_id"/>
|
||||
<p class="m-0" t-field="doc.user_id">Mitchell Admin</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -99,37 +99,39 @@
|
||||
|
||||
<tr t-att-class="'bg-200 fw-bold o_line_section' if line.display_type == 'line_section' else 'fst-italic o_line_note' if line.display_type == 'line_note' else ''">
|
||||
<t t-if="not line.display_type">
|
||||
<td name="td_name"><span t-field="line.name"/></td>
|
||||
<td name="td_name"><span t-field="line.name">Awesome Product</span></td>
|
||||
<td name="td_quantity" class="text-end">
|
||||
<span t-field="line.product_uom_qty"/>
|
||||
<span t-field="line.product_uom"/>
|
||||
<span t-field="line.product_uom_qty">3</span>
|
||||
<span t-field="line.product_uom">mm</span>
|
||||
</td>
|
||||
<td name="td_priceunit" class="text-end">
|
||||
<span t-field="line.price_unit"/>
|
||||
<span t-field="line.price_unit">3</span>
|
||||
</td>
|
||||
<td t-if="display_discount" class="text-end" groups="product.group_discount_per_so_line">
|
||||
<span t-field="line.discount"/>
|
||||
<span t-field="line.discount">4%</span>
|
||||
</td>
|
||||
<td name="td_taxes" class="text-end">
|
||||
<span t-out="', '.join(map(lambda x: (x.description or x.name), line.tax_id))"/>
|
||||
<span t-out="', '.join(map(lambda x: (x.description or x.name), line.tax_id))">
|
||||
VAT 21%
|
||||
</span>
|
||||
</td>
|
||||
<td t-if="not line.is_downpayment" name="td_subtotal" class="text-end o_price_total">
|
||||
<span t-field="line.price_subtotal"/>
|
||||
<span t-field="line.price_subtotal">9</span>
|
||||
</td>
|
||||
<td name="td_total" class="text-end o_price_total" t-if="doc.company_id.tax_calculation_rounding_method == 'round_per_line'" >
|
||||
<span t-field="line.price_total"/>
|
||||
<span t-field="line.price_total">9</span>
|
||||
</td>
|
||||
</t>
|
||||
<t t-elif="line.display_type == 'line_section'">
|
||||
<td name="td_section_line" colspan="99">
|
||||
<span t-field="line.name"/>
|
||||
<span t-field="line.name">Awesome Services</span>
|
||||
</td>
|
||||
<t t-set="current_section" t-value="line"/>
|
||||
<t t-set="current_subtotal" t-value="0"/>
|
||||
</t>
|
||||
<t t-elif="line.display_type == 'line_note'">
|
||||
<td name="td_note_line" colspan="99">
|
||||
<span t-field="line.name"/>
|
||||
<span t-field="line.name">The previous product should be shipped with additional love</span>
|
||||
</td>
|
||||
</t>
|
||||
</tr>
|
||||
@@ -141,7 +143,7 @@
|
||||
<span
|
||||
t-out="current_subtotal"
|
||||
t-options='{"widget": "monetary", "display_currency": doc.currency_id}'
|
||||
/>
|
||||
>9</span>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
@@ -169,19 +171,19 @@
|
||||
<img t-att-src="image_data_uri(doc.signature)" style="max-height: 4cm; max-width: 8cm;"/>
|
||||
</div>
|
||||
<div class="offset-8 text-center">
|
||||
<p t-field="doc.signed_by"/>
|
||||
<p t-field="doc.signed_by">Oscar Morgan</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p t-field="doc.note" name="order_note"/>
|
||||
<p t-if="not is_html_empty(doc.payment_term_id.note)">
|
||||
<span t-field="doc.payment_term_id.note"/>
|
||||
<span t-field="doc.payment_term_id.note">The payment should also be transmitted with love</span>
|
||||
</p>
|
||||
<p t-if="doc.fiscal_position_id and not is_html_empty(doc.fiscal_position_id.sudo().note)"
|
||||
id="fiscal_position_remark">
|
||||
<strong>Fiscal Position Remark:</strong>
|
||||
<span t-field="doc.fiscal_position_id.sudo().note"/>
|
||||
<span t-field="doc.fiscal_position_id.sudo().note">No further requirements for this payment</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
<tbody class="sale_tbody">
|
||||
<tr t-foreach="doc.sale_order_option_ids" t-as="option">
|
||||
<td name="td_option_name">
|
||||
<span t-field="option.name"/>
|
||||
<span t-field="option.name">Awesome Product's extended warranty</span>
|
||||
</td>
|
||||
<td t-if="has_option_discount" name="td_option_discount" groups="product.group_discount_per_so_line">
|
||||
<strong t-if="option.discount != 0.0" class="text-info">
|
||||
<t t-out="((option.discount % 1) and '%s' or '%d') % option.discount"/>%
|
||||
<t t-out="((option.discount % 1) and '%s' or '%d') % option.discount">3</t>%
|
||||
</strong>
|
||||
</td>
|
||||
<td name="td_option_price_unit">
|
||||
@@ -30,9 +30,9 @@
|
||||
<div t-field="option.price_unit"
|
||||
t-options='{"widget": "monetary", "display_currency": doc.currency_id}'
|
||||
t-att-style="option.discount and 'text-decoration: line-through' or None"
|
||||
t-att-class="option.discount and 'text-danger' or None"/>
|
||||
t-att-class="option.discount and 'text-danger' or None">150 Eur</div>
|
||||
<div t-if="option.discount">
|
||||
<t t-out="'%.2f' % ((1-option.discount / 100.0) * option.price_unit)"/>
|
||||
<t t-out="'%.2f' % ((1-option.discount / 100.0) * option.price_unit)">145.50 Eur</t>
|
||||
</div>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
@@ -296,11 +296,28 @@
|
||||
<t t-if="information_block">
|
||||
<t t-set="colclass" t-value="'col-5 offset-1'"/>
|
||||
<div name="information_block" class="col-6">
|
||||
<t t-out="information_block"/>
|
||||
<t t-out="information_block or None">
|
||||
<strong>Invoicing address</strong>
|
||||
<div>
|
||||
<div>Gemini Furniture, Oscar Morgan</div>
|
||||
<div>317 Fairchild Dr</div>
|
||||
<div>Fairfield CA 94535</div>
|
||||
<div>United States</div>
|
||||
<div>(561)-239-1744</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
<div name="address" t-att-class="colclass">
|
||||
<t t-esc="address"/>
|
||||
<t t-esc="address or None">
|
||||
<div>
|
||||
<div>Gemini Furniture, Oscar Morgan</div>
|
||||
<div>317 Fairchild Dr</div>
|
||||
<div>Fairfield CA 94535</div>
|
||||
<div>United States</div>
|
||||
<div>Tax ID: 0000000000-9999999999</div>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user