[IMP] add module for hiding unwanted feature
This commit is contained in:
0
sale_no_configurator_button/__init__.py
Normal file
0
sale_no_configurator_button/__init__.py
Normal file
31
sale_no_configurator_button/__manifest__.py
Normal file
31
sale_no_configurator_button/__manifest__.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Copyright 2020 Akretion (https://www.akretion.com).
|
||||||
|
# @author Sébastien BEAU <sebastien.beau@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Sale no configurator button",
|
||||||
|
"summary": "Hide 'configure a product' from sale line",
|
||||||
|
"version": "12.0.1.0.0",
|
||||||
|
"category": "Usabability",
|
||||||
|
"website": "www.akretion.com",
|
||||||
|
"author": " Akretion",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"application": False,
|
||||||
|
"installable": True,
|
||||||
|
"external_dependencies": {
|
||||||
|
"python": [],
|
||||||
|
"bin": [],
|
||||||
|
},
|
||||||
|
"depends": [
|
||||||
|
"sale",
|
||||||
|
],
|
||||||
|
"data": [
|
||||||
|
"views/sale_view.xml",
|
||||||
|
],
|
||||||
|
"demo": [
|
||||||
|
],
|
||||||
|
"qweb": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
12
sale_no_configurator_button/views/sale_view.xml
Normal file
12
sale_no_configurator_button/views/sale_view.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="sale_order_view_form" model="ir.ui.view">
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//control/create[@groups='product.group_product_variant']" position="replace"/>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
0
sale_no_optional_product/__init__.py
Normal file
0
sale_no_optional_product/__init__.py
Normal file
30
sale_no_optional_product/__manifest__.py
Normal file
30
sale_no_optional_product/__manifest__.py
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# Copyright 2020 Akretion (https://www.akretion.com).
|
||||||
|
# @author Sébastien BEAU <sebastien.beau@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Sale no optional product",
|
||||||
|
"summary": "Hide optional product",
|
||||||
|
"version": "12.0.1.0.0",
|
||||||
|
"category": "Usability",
|
||||||
|
"website": "www.akretion.com",
|
||||||
|
"author": " Akretion",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"application": False,
|
||||||
|
"installable": True,
|
||||||
|
"external_dependencies": {
|
||||||
|
"python": [],
|
||||||
|
"bin": [],
|
||||||
|
},
|
||||||
|
"depends": [
|
||||||
|
"sale_management",
|
||||||
|
],
|
||||||
|
"data": [
|
||||||
|
"views/product_template_view.xml",
|
||||||
|
"views/sale_order_view.xml",
|
||||||
|
],
|
||||||
|
"demo": [
|
||||||
|
],
|
||||||
|
"qweb": [
|
||||||
|
]
|
||||||
|
}
|
||||||
14
sale_no_optional_product/views/product_template_view.xml
Normal file
14
sale_no_optional_product/views/product_template_view.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="product_template_view_form" model="ir.ui.view">
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="sale.product_template_form_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<group name="options" position="attributes">
|
||||||
|
<attribute name="invisible"/>
|
||||||
|
</group>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
14
sale_no_optional_product/views/sale_order_view.xml
Normal file
14
sale_no_optional_product/views/sale_order_view.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="sale_order_form_quote" model="ir.ui.view">
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale_management.sale_order_form_quote"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='sale_order_option_ids']/.." position="attributes">
|
||||||
|
<attribute name="invisible">1</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
0
sale_no_preview_button/__init__.py
Normal file
0
sale_no_preview_button/__init__.py
Normal file
31
sale_no_preview_button/__manifest__.py
Normal file
31
sale_no_preview_button/__manifest__.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Copyright 2020 Akretion (https://www.akretion.com).
|
||||||
|
# @author Sébastien BEAU <sebastien.beau@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "Sale no preview button",
|
||||||
|
"summary": "Hide 'preview' from sale",
|
||||||
|
"version": "12.0.1.0.0",
|
||||||
|
"category": "Usabability",
|
||||||
|
"website": "www.akretion.com",
|
||||||
|
"author": " Akretion",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"application": False,
|
||||||
|
"installable": True,
|
||||||
|
"external_dependencies": {
|
||||||
|
"python": [],
|
||||||
|
"bin": [],
|
||||||
|
},
|
||||||
|
"depends": [
|
||||||
|
"sale",
|
||||||
|
],
|
||||||
|
"data": [
|
||||||
|
"views/sale_view.xml",
|
||||||
|
],
|
||||||
|
"demo": [
|
||||||
|
],
|
||||||
|
"qweb": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
14
sale_no_preview_button/views/sale_view.xml
Normal file
14
sale_no_preview_button/views/sale_view.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="view_order_form" model="ir.ui.view">
|
||||||
|
<field name="model">sale.order</field>
|
||||||
|
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<button name="preview_sale_order" position="attributes">
|
||||||
|
<attribute name="invisible">1</attribute>
|
||||||
|
</button>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user