flectra/addons/sales_discount/views/res_config_settings_views.xml

51 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<record id="res_config_settings_view_discount_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.discount.sale</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="3"/>
<field name="inherit_id" ref="sale.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]/div[hasclass('app_settings_block')]/div[1]" position="after">
<h2>Sale Order Discount</h2>
<div class="row mt16 o_settings_container">
<div class="col-xs-12 col-md-12 o_setting_box">
<div class="o_setting_left_pane">
<field name="global_discount_per_so_invoice_line"/>
</div>
<div class="o_setting_right_pane">
<label for="global_discount_per_so_invoice_line"/>
<div class="text-muted">
Allow global discount on the sale order
</div>
<div attrs="{'invisible': [('global_discount_per_so_invoice_line' ,'=', False)]}">
<div class="o_setting_left_pane">
<field name="global_discount_apply"/>
</div>
<div class="o_setting_right_pane">
<label for="global_discount_apply"/>
</div>
</div>
<div attrs="{'invisible': [('global_discount_apply' ,'=', False)]}">
<div class="o_setting_right_pane">
<label for="global_discount_fix_amount"/>
<field name="global_discount_fix_amount" attrs="{'required': [('global_discount_apply', '=', True)]}"/>
</div>
<div class="o_setting_right_pane">
<label for="global_discount_percentage"/>
<field name="global_discount_percentage" attrs="{'required': [('global_discount_apply', '=', True)]}"/>
</div>
</div>
<div class="content-group" attrs="{'invisible': [('global_discount_apply','=',False)]}">
<div class="mt16">
<button name="%(sales_discount.action_sale_discount_config)d" icon="fa-arrow-right" type="action" string="Group Leval Discount Configuration" class="btn-link"/>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</flectra>