mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[12.0][IMP] - option to decide if we automaticallt create contract a sale confirm
This commit is contained in:
31
product_contract/views/res_config_settings.xml
Normal file
31
product_contract/views/res_config_settings.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2019 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="res_config_settings_form_view">
|
||||
<field name="name">res.config.settings.form (in product_contract)
|
||||
</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="sale.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='sales_settings_invoicing_policy']/.."
|
||||
position="inside">
|
||||
<div class="col-12 col-lg-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="create_contract_at_sale_order_confirmation"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="create_contract_at_sale_order_confirmation"/>
|
||||
<div class="text-muted">
|
||||
Automatically Create Contracts At Sale Order Confirmation
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
@@ -12,6 +12,13 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="inside">
|
||||
<field name="need_contract_creation" invisible="1"/>
|
||||
<button name="action_create_contract"
|
||||
string="Create Contracts"
|
||||
type="object"
|
||||
class="oe_highlight" attrs="{'invisible': [('need_contract_creation', '=', False)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="action_show_contracts"
|
||||
type="object" icon="fa-book"
|
||||
|
||||
Reference in New Issue
Block a user