Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions product_odoo_module/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
===================
Product Odoo Module
===================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a2e456066195696d9c952d975a122eb0a6724401937219b667aea7525c4caab4
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2Fqrtl--custom-lightgray.png?logo=github
:target: https://github.com/qrtl/qrtl-custom/tree/16.0/product_odoo_module
:alt: qrtl/qrtl-custom

|badge1| |badge2| |badge3|

This module adds attributes to product.template and product.product that
are required for module products.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/qrtl/qrtl-custom/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/qrtl/qrtl-custom/issues/new?body=module:%20product_odoo_module%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Quartile

Maintainers
-----------

This module is part of the `qrtl/qrtl-custom <https://github.com/qrtl/qrtl-custom/tree/16.0/product_odoo_module>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions product_odoo_module/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions product_odoo_module/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2024-2025 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Odoo Module",
"version": "16.0.1.0.0",
"category": "Product",
"author": "Quartile",
"website": "https://www.quartile.co",
"license": "AGPL-3",
"depends": ["product"],
"data": [
"data/menuitem_data.xml",
"security/ir.model.access.csv",
"views/product_odoo_version_views.xml",
"views/product_template_views.xml",
"views/res_company_views.xml",
],
}
8 changes: 8 additions & 0 deletions product_odoo_module/data/menuitem_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<odoo>
<menuitem
id="menu_odoo_module_in_config_sales"
name="Odoo Modules"
parent="sale.menu_sales_config"
sequence="40"
/>
</odoo>
3 changes: 3 additions & 0 deletions product_odoo_module/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import product_odoo_version
from . import product_template
from . import res_company
13 changes: 13 additions & 0 deletions product_odoo_module/models/product_odoo_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2025 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ProductOdooVersion(models.Model):
_name = "product.odoo.version"
_description = "Odoo Version"
_order = "name desc"

name = fields.Char(required=True)
active = fields.Boolean(default=True)
26 changes: 26 additions & 0 deletions product_odoo_module/models/product_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2024-2025 Quartile (https://www.quartile.co)
# 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"

is_odoo_module = fields.Boolean()
odoo_version_id = fields.Many2one("product.odoo.version")
license_type = fields.Selection(
[("agpl-3", "AGPL-3"), ("lgpl-3", "LGPL-3"), ("other", "Other proprietary")],
help="Select the type of license",
)
Comment on lines +12 to +15

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have this field in product.template?

complexity = fields.Selection([("high", "High"), ("mid", "Mid"), ("low", "Low")])
popularity_factor = fields.Float()
loc = fields.Integer(string="Lines of Code")
amount = fields.Float(compute="_compute_amount", store=True)
amount_incl_mig = fields.Float(compute="_compute_amount", store=True)

@api.depends("list_price", "popularity_factor", "loc")
def _compute_amount(self):
for rec in self:
rec.amount = rec.list_price * rec.loc * rec.popularity_factor
rec.amount_incl_mig = rec.amount * 2
13 changes: 13 additions & 0 deletions product_odoo_module/models/res_company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2025 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class ResCompany(models.Model):
_inherit = "res.company"

price_module_maint = fields.Float(
"Module Maintenance Price",
help="Standard maintenance cost per LOC (line of code).",
)
2 changes: 2 additions & 0 deletions product_odoo_module/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module adds attributes to product.template and product.product that
are required for module products.
3 changes: 3 additions & 0 deletions product_odoo_module/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_product_odoo_version_user,product.odoo.version.user,model_product_odoo_version,base.group_user,1,0,0,0
access_product_odoo_version_manager,product.odoo.version.manager,model_product_odoo_version,base.group_system,1,1,1,1
Loading