Skip to content

Commit

Permalink
[ADD] new grap_index module
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Mar 28, 2023
1 parent 684a0df commit feeb6b2
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 0 deletions.
Empty file added grap_index/README.rst
Empty file.
Empty file added grap_index/__init__.py
Empty file.
19 changes: 19 additions & 0 deletions grap_index/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2023 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "GRAP - Custom Index",
"summary": "Add Extra postgresql Indexes",
"version": "12.0.1.0.1",
"category": "GRAP - Custom",
"author": "GRAP",
"website": "https://github.com/grap/grap-odoo-custom",
"license": "AGPL-3",
"depends": [
# Odoo
"purchase",
"stock",
],
"installable": True,
}
Empty file added grap_index/i18n/fr.po
Empty file.
3 changes: 3 additions & 0 deletions grap_index/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import stock_move
from . import stock_move_line
from . import stock_picking
11 changes: 11 additions & 0 deletions grap_index/models/stock_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (C) 2023 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class StockMove(models.Model):
_name = "stock.move"

created_purchase_line_id = fields.Many2one(index=True)
11 changes: 11 additions & 0 deletions grap_index/models/stock_move_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (C) 2023 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class StockMoveLine(models.Model):
_name = "stock.move.line"

picking_id = fields.Many2one(index=True)
11 changes: 11 additions & 0 deletions grap_index/models/stock_picking.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (C) 2023 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class StockPicking(models.Model):
_name = "stock.picking"

group_id = fields.Many2one(index=True)
1 change: 1 addition & 0 deletions grap_index/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Sylvain LE GAL (https://www.twitter.com/legalsylvain)
1 change: 1 addition & 0 deletions grap_index/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module add extra postgresql indexes to speed up SELECT queries.
1 change: 1 addition & 0 deletions setup/grap_index/odoo/addons/grap_index
6 changes: 6 additions & 0 deletions setup/grap_index/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit feeb6b2

Please sign in to comment.