[MIG] sale_disable_product_creation_in_sale: migration to 18.0

This commit is contained in:
Stéphan Sainléger
2026-03-29 15:47:58 +02:00
parent b6cfe0b027
commit 438dcbeaf0
4 changed files with 44 additions and 52 deletions

View File

@@ -0,0 +1,42 @@
# Sale - Disable Product Creation in Sale
Prevents users from creating new products directly from sale order lines.
## Description
By default, Odoo allows users to create new products on-the-fly when filling
in sale order lines via the *Product* field. This can lead to duplicate or
poorly configured products when the catalog should be managed centrally.
This module adds the `no_create` option to the `product_template_id` field in
the sale order line tree view, so users can only select existing products from
the catalog.
## Usage
Once installed, the *Create and edit…* and *Create* options are removed from
the product dropdown in sale order lines. Users must pick a product that
already exists in the product catalog.
No configuration is required.
## Installation
Install via the standard Odoo module installation procedure.
**Dependencies:** `base`, `sale`
## Credits
### Authors
- [Elabore](https://elabore.coop)
### Maintainer
This module is maintained by [Elabore](https://elabore.coop).
## License
This module is licensed under **AGPL-3**. See the [LICENSE](LICENSE) file for
full details.

View File

@@ -1,50 +0,0 @@
===============
sale_usability_misc
===============
Various improves for Sales app
Installation
============
Use Odoo normal module installation procedure to install
``sale_usability_misc``.
Description
===========
- Allow group sales administores to see date_order field event if not in developper mode
Known issues / Roadmap
======================
None yet.
Bug Tracker
===========
Bugs are tracked on `our issues website <https://github.com/elabore-coop/sale_usability_misc/issues>`_. In case of
trouble, please check there if your issue has already been
reported. If you spotted it first, help us smashing it by providing a
detailed and welcomed feedback.
Credits
=======
Contributors
------------
* `Elabore <mailto:laetitia.dacosta@elabore.coop>`
Funders
-------
The development of this module has been financially supported by:
* Elabore (https://elabore.coop)
Maintainer
----------
This module is maintained by Elabore.

View File

@@ -3,7 +3,7 @@
{
"name": "sale_disable_product_creation_in_sale",
"version": "16.0.1.0.0",
"version": "18.0.1.0.0",
"author": "Elabore",
"website": "https://elabore.coop",
"maintainer": "Elabore",

View File

@@ -6,7 +6,7 @@
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='order_line']/tree//field[@name='product_template_id']" position="attributes">
<xpath expr="//field[@name='order_line']/list//field[@name='product_template_id']" position="attributes">
<attribute name="options">{'no_create': True}</attribute>
</xpath>
</field>