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.
 
 
 
 
 

61 lines
3.0 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Inherit the view of pos.order to add ribbon and fields -->
<record id="view_pos_pos_form" model="ir.ui.view">
<field name="name">pos.order.view.form.inherit.pos.partial.payment.odoo</field>
<field name="model">pos.order</field>
<field name="inherit_id" ref="point_of_sale.view_pos_pos_form"/>
<field name="arch" type="xml">
<xpath expr="//div[hasclass('oe_button_box')]" position="after">
<widget name="web_ribbon" title="Partial"
bg_color="bg-success"
invisible="not is_partial_payment"/>
</xpath>
<xpath expr="//group[@name='order_total']" position="replace">
<group class="oe_subtotal_footer oe_right" colspan="2"
name="order_total">
<field name="is_partial_payment" invisible="1"/>
<field name="amount_tax"
force_save="1"
widget="monetary"/>
<div class="oe_subtotal_footer_separator oe_inline o_td_label">
<label for="amount_total"/>
<button name="button_dummy"
invisible="state != 'draft'" string="(update)"
class="oe_edit_only oe_link"/>
</div>
<field name="amount_total"
force_save="1"
nolabel="1"
class="oe_subtotal_footer_separator"
widget="monetary"/>
<field name="amount_paid"
string="Total Paid (with rounding)"
class="oe_subtotal_footer_separator"
widget="monetary"
invisible="amount_paid == amount_total"/>
<field name="due_amount"
string="Due Amount"
class="oe_subtotal_footer_separator"
widget="monetary"
invisible="not is_partial_payment"/>
<label for="margin"/>
<div class="text-nowrap">
<field name="margin" class="oe_inline"
invisible="not is_total_cost_computed"/>
<span class="oe_inline"
invisible="not is_total_cost_computed">
(<field name="margin_percent" nolabel="1"
class="oe_inline" widget="percentage"/>)
</span>
<span invisible="not is_total_cost_computed">
TBD
</span>
</div>
<field name="is_total_cost_computed" invisible="1"/>
<field name="currency_id" invisible="1"/>
</group>
</xpath>
</field>
</record>
</odoo>