Add product_editable_sequence
This commit is contained in:
1
product_editable_sequence/__init__.py
Normal file
1
product_editable_sequence/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
26
product_editable_sequence/__manifest__.py
Normal file
26
product_editable_sequence/__manifest__.py
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Copyright 2024 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": "Product Editable Sequence",
|
||||||
|
"summary": "Make s=the sequence mass editable with a default value of 100",
|
||||||
|
"version": "14.0.1.0.0",
|
||||||
|
"development_status": "Alpha",
|
||||||
|
"category": "Uncategorized",
|
||||||
|
"website": "www.akretion.com",
|
||||||
|
"author": " Akretion",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"external_dependencies": {
|
||||||
|
"python": [],
|
||||||
|
"bin": [],
|
||||||
|
},
|
||||||
|
"depends": [
|
||||||
|
"product",
|
||||||
|
],
|
||||||
|
"data": [
|
||||||
|
"views/product_template_views.xml",
|
||||||
|
],
|
||||||
|
"demo": [
|
||||||
|
],
|
||||||
|
}
|
||||||
11
product_editable_sequence/models/product_template.py
Normal file
11
product_editable_sequence/models/product_template.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Copyright 2024 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).
|
||||||
|
|
||||||
|
from odoo import _, api, fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class ProductTemplate(models.Model):
|
||||||
|
_inherit = 'product.template'
|
||||||
|
|
||||||
|
sequence = fields.Integer(default=100)
|
||||||
16
product_editable_sequence/views/product_template_views.xml
Normal file
16
product_editable_sequence/views/product_template_views.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
|
||||||
|
<record id="product_template_view_tree" model="ir.ui.view">
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="product.product_template_tree_view" />
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="sequence" position="attributes">
|
||||||
|
<attribute name="widget"/>
|
||||||
|
<attribute name="readonly"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</odoo>
|
||||||
|
|
||||||
Reference in New Issue
Block a user