[IMP] sale*: Improve the settings form view
This commit is contained in:
committed by
Yannick Tivisse
parent
5260d22c4d
commit
94066b25f5
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import sale_config_settings
|
||||
import sale_coupon
|
||||
import sale_coupon_reward
|
||||
import sale_coupon_rules
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class SaleConfiguration(models.TransientModel):
|
||||
_inherit = 'sale.config.settings'
|
||||
|
||||
module_sale_coupon = fields.Boolean("Manage coupons and promotional offers")
|
||||
@@ -1,18 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="sale_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">sale settings</field>
|
||||
|
||||
<record id="sale_config_settings_view_form_inherit_sale_coupon" model="ir.ui.view">
|
||||
<field name="name">sale.config.settings.inherit.sale.coupon</field>
|
||||
<field name="model">sale.config.settings</field>
|
||||
<field name="inherit_id" ref="sales_team.view_sale_config_settings"/>
|
||||
<field name="inherit_id" ref="sale.sale_config_settings_view_form_inherit_sale"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='quotations_sales']" position="inside">
|
||||
<label for="id" string="Coupons"/>
|
||||
<xpath expr="//div[@id='sale_coupon']" position="replace">
|
||||
<div class="mt16">
|
||||
<button name="%(sale_coupon.sale_coupon_program_action_promo_program)d" icon="fa-arrow-right" type="action" string="Promotion Programs" class="btn-link"/>
|
||||
</div>
|
||||
<div>
|
||||
<field name="module_sale_coupon" class="oe_inline" widget="upgrade_boolean"/>
|
||||
<label for="module_sale_coupon"/>
|
||||
<a href="https://www.odoo.com/fr_FR/" target="_blank"> More Info</a>
|
||||
<button name="%(sale_coupon.sale_coupon_program_action_coupon_program)d" icon="fa-arrow-right" type="action" string="Coupon Programs" class="btn-link"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user