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 custom_module_management/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
========================
Custom Module Management
========================

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

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-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/custom_module_management
:alt: qrtl/qrtl-custom

|badge1| |badge2| |badge3|

This module is designed to add customer information to the Odoo module
product.

**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:%20custom_module_management%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 Limited

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

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

You are welcome to contribute.
1 change: 1 addition & 0 deletions custom_module_management/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions custom_module_management/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 Quartile Limited
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Custom Module Management",
"version": "16.0.1.0.0",
"category": "Subscription",
"author": "Quartile Limited",
"website": "https://www.quartile.co",
"license": "LGPL-3",
"depends": ["sale", "product_odoo_module"],
"data": [
"security/ir.model.access.csv",
"views/product_product_views.xml",
"views/customer_info_views.xml",
],
}
2 changes: 2 additions & 0 deletions custom_module_management/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import product_product
from . import customer_info
19 changes: 19 additions & 0 deletions custom_module_management/models/customer_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2024 Quartile Limited
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).

from odoo import fields, models


class CustomerInfo(models.Model):
_name = "custom.module.customerinfo"

partner_id = fields.Many2one("res.partner", required=True)
product_id = fields.Many2one(
"product.product",
ondelete="cascade",
required=True,
domain=[("is_odoo_module", "=", True)],
)
repo = fields.Char(string="Repository")
amount = fields.Float(related="product_id.amount", store=True)
amount_incl_mig = fields.Float(related="product_id.amount_incl_mig", store=True)
10 changes: 10 additions & 0 deletions custom_module_management/models/product_product.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2024 Quartile Limited
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).

from odoo import fields, models


class ProductProduct(models.Model):
_inherit = "product.product"

customer_infos = fields.One2many("custom.module.customerinfo", "product_id")
2 changes: 2 additions & 0 deletions custom_module_management/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module is designed to add customer information to the Odoo module
product.
2 changes: 2 additions & 0 deletions custom_module_management/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_custom_module_customerinfo,custom_module_customerinfo,model_custom_module_customerinfo,base.group_user,1,1,1,1
Loading
Loading