You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

214 lines
10 KiB

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!--FORM-->
<record model="ir.ui.view" id="sale_order_form_sweep">
<field name="name">sale.order.form.inherited.sweep</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//header[1]/button[@name='action_button_confirm']" position="attributes">
<attribute name="string">Confirm</attribute>
</xpath>
<xpath expr="//header[1]/button[@name='cancel']" position="attributes">
<attribute name="string">Cancel</attribute>
</xpath>
<xpath expr="//header[1]/button[@name='copy_quotation']" position="attributes">
<attribute name="string">New Copy</attribute>
</xpath>
<xpath expr="//header[1]/button[@name='action_cancel']" position="attributes">
<attribute name="string">Cancel</attribute>
</xpath>
<xpath expr="//header[1]/button[@name='invoice_cancel']" position="attributes">
<attribute name="string">Cancel</attribute>
</xpath>
<xpath expr="//h1[1]" position="replace">
<h1>
<label string=" " attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
<label string=" " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
<field name="name" class="oe_inline" readonly="1"/>
</h1>
</xpath>
<xpath expr="//page[1]" position="attributes">
<attribute name="string">Booking Items</attribute>
</xpath>
<xpath expr="//page[1]//tree[1]//field[@name='product_id']" position="attributes">
<attribute name="string">Service</attribute>
</xpath>
<xpath expr="//page[2]" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
<!--TREE-->
<record id="sale.view_order_tree" model="ir.ui.view">
<field name="name">sale.order.tree</field>
<field name="model">sale.order</field>
<field name="priority">1</field>
<field name="arch" type="xml">
<tree string="Sales Orders" fonts="bold:message_unread==True" colors="grey:state=='cancel';blue:state in ('waiting_date','manual');red:state in ('invoice_except','shipping_except')">
<field name="message_unread" invisible="1"/>
<field name="name" string="Booking Number"/>
<field name="date_order"/>
<field name="partner_id"/>
<field name="user_id" string="Scheduled By"/>
<field name="amount_total" sum="Total Tax Included"/>
<field name="state"/>
</tree>
</field>
</record>
<!-- REPORT-->
<template id="report_booking_document">
<t t-call="report.external_layout">
<div class="page">
<div class="oe_structure"/>
<div class="row">
<div class="col-xs-6">
<strong t-if="o.partner_shipping_id == o.partner_invoice_id">Invoice and Customer address:</strong>
<strong t-if="o.partner_shipping_id != o.partner_invoice_id">Invoice address:</strong>
<div t-field="o.partner_invoice_id"
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
<p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>
<div t-if="o.partner_shipping_id != o.partner_invoice_id" class="mt8">
<strong>Customer address:</strong>
<div t-field="o.partner_shipping_id"
t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
<p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>
</div>
</div>
<div class="col-xs-5 col-xs-offset-1">
<div t-field="o.partner_id"
t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' />
</div>
</div>
<h2>
<span t-if="o.state not in ['draft','sent']">Booking No </span>
<span t-if="o.state in ['draft','sent']">Booking No </span>
<span t-field="o.name"/>
</h2>
<div class="row mt32 mb32" id="informations">
<div t-if="o.client_order_ref" class="col-xs-3">
<strong>Your Reference:</strong>
<p t-field="o.client_order_ref"/>
</div>
<div t-if="o.date_order" class="col-xs-3">
<strong t-if="o.state not in ['draft','sent']">Date:</strong>
<strong t-if="o.state in ['draft','sent']">Date:</strong>
<p t-field="o.date_order"/>
</div>
<div t-if="o.user_id.name" class="col-xs-3">
<strong>Scheduled By: </strong>
<p t-field="o.user_id.name"/></div>
<!--<div t-if="o.payment_term" class="col-xs-3">-->
<!--<strong>Payment Term:</strong>-->
<!--<p t-field="o.payment_term"/>-->
<!--</div>-->
</div>
<table class="table table-condensed">
<thead>
<tr>
<th>Booking Item</th>
<th>Taxes</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
<th groups="sale.group_discount_per_so_line">Disc.(%)</th>
<th class="text-right">Price</th>
</tr>
</thead>
<tbody class="sale_tbody">
<tr t-foreach="o.order_line" t-as="l">
<td>
<span t-field="l.name"/>
</td>
<td>
<span t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>
</td>
<td class="text-right">
<span t-field="l.product_uom_qty"/>
<span groups="product.group_uom" t-field="l.product_uom"/>
</td>
<td class="text-right">
<span t-field="l.price_unit"/>
</td>
<td groups="sale.group_discount_per_so_line">
<span t-field="l.discount"/>
</td>
<td class="text-right">
<span t-field="l.price_subtotal"
t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
</td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-xs-4 pull-right">
<table class="table table-condensed">
<tr class="border-black">
<td><strong>Total Without Taxes</strong></td>
<td class="text-right">
<span t-field="o.amount_untaxed"
t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr>
<td>Taxes</td>
<td class="text-right">
<span t-field="o.amount_tax"
t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
</td>
</tr>
<tr class="border-black">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-field="o.amount_total"
t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
</td>
</tr>
</table>
</div>
</div>
<p t-field="o.note" />
<p t-if="o.payment_term.note">
<strong>Payment Term:</strong>
<span t-field="o.payment_term.note"/>
</p>
<div class="oe_structure"/>
</div>
</t>
</template>
<template id="report_booking">
<t t-call="report.html_container">
<t t-foreach="doc_ids" t-as="doc_id">
<t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'salon_operation.report_booking_document')"/>
</t>
</t>
</template>
<report
id="sale.report_sale_order"
string="Booking"
model="sale.order"
report_type="qweb-pdf"
file="salon_operation.sweep_sale_order"
name="salon_operation.report_booking"
menu="False"
/>
</data>
</openerp>