[IMP] add module for hiding unwanted feature

This commit is contained in:
Sébastien BEAU
2020-09-17 00:40:32 +02:00
parent d7f3a70d48
commit a9a0a2a999
10 changed files with 146 additions and 0 deletions

View File

View 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": [
]
}

View 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>

View 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>