Skip to content

Commit

Permalink
Merge pull request #155 from dibik96/17.0-develop
Browse files Browse the repository at this point in the history
G2P-2717: Added enumerator as a separate package
  • Loading branch information
shibu-narayanan authored Aug 5, 2024
2 parents aac75e5 + c9fd04f commit c9db4f7
Show file tree
Hide file tree
Showing 14 changed files with 605 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ addon | version | maintainers | summary
--- | --- | --- | ---
[g2p_bank](g2p_bank/) | 17.0.1.0.0 | | G2P Registry: Bank Details
[g2p_bank_rest_api](g2p_bank_rest_api/) | 17.0.1.0.0 | | G2P Registry: Bank Details Rest API
[g2p_enumerator](g2p_enumerator/) | 17.0.1.0.0 | | G2P Enumerator
[g2p_registry_addl_info](g2p_registry_addl_info/) | 17.0.1.0.0 | | G2P Registry: Additional Info
[g2p_registry_base](g2p_registry_base/) | 17.0.1.0.0 | | G2P Registry: Base
[g2p_registry_documents](g2p_registry_documents/) | 17.0.1.0.0 | | G2P Registry: Documents
Expand Down
57 changes: 57 additions & 0 deletions g2p_enumerator/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
==============
G2P Enumerator
==============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:925a4bc0a62b70aa19178851792a6a4900f707189dd64fbe37d9323cf52de1d7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/github-OpenG2P%2Fopeng2p--registry-lightgray.png?logo=github
:target: https://github.com/OpenG2P/openg2p-registry/tree/17.0-develop/g2p_enumerator
:alt: OpenG2P/openg2p-registry

|badge1| |badge2|

G2P Enumerator

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OpenG2P/openg2p-registry/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/OpenG2P/openg2p-registry/issues/new?body=module:%20g2p_enumerator%0Aversion:%2017.0-develop%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
~~~~~~~

* OpenG2P

Contributors
~~~~~~~~~~~~

`OpenG2P <https://openg2p.org>`__ donated the original code to the project.

Maintainers
~~~~~~~~~~~

This module is part of the `OpenG2P/openg2p-registry <https://github.com/OpenG2P/openg2p-registry/tree/17.0-develop/g2p_enumerator>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions g2p_enumerator/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
19 changes: 19 additions & 0 deletions g2p_enumerator/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "G2P Enumerator",
"category": "G2P",
"version": "17.0.1.0.0",
"sequence": 1,
"author": "OpenG2P",
"website": "https://openg2p.org",
"license": "Other OSI approved licence",
"depends": ["g2p_registry_group"],
"data": ["security/ir.model.access.csv", "views/g2p_enumerator_view.xml", "views/group_view.xml"],
"assets": {
"web.assets_frontend": [],
"web.assets_common": [],
"website.assets_wysiwyg": [],
},
"application": True,
"installable": True,
"auto_install": False,
}
2 changes: 2 additions & 0 deletions g2p_enumerator/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import g2p_enumerator
from . import res_partner
18 changes: 18 additions & 0 deletions g2p_enumerator/models/g2p_enumerator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from odoo import fields, models


class G2PEnumerator(models.Model):
_name = "g2p.enumerator"

# Enum Details
enumerator_name = fields.Char()
enumerator_id = fields.Char()
data_collection_date = fields.Date()

# Location
enum_latitude = fields.Float(string="Latitude", digits=(10, 7))
enum_longitude = fields.Float(string="Longitude", digits=(10, 7))
enum_altitude = fields.Float(string="Altitude")
enum_accuracy = fields.Float(string="Accuracy")

partner_id = fields.Many2one("res.partner")
8 changes: 8 additions & 0 deletions g2p_enumerator/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Part of OpenG2P Registry. See LICENSE file for full copyright and licensing details.
from odoo import fields, models


class G2PRegistrant(models.Model):
_inherit = "res.partner"

enumerator_ids = fields.One2many("g2p.enumerator", "partner_id")
3 changes: 3 additions & 0 deletions g2p_enumerator/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions g2p_enumerator/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`OpenG2P <https://openg2p.org>`__ donated the original code to the project.
1 change: 1 addition & 0 deletions g2p_enumerator/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
G2P Enumerator
2 changes: 2 additions & 0 deletions g2p_enumerator/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_g2p_enum,g2p_enumerator_name,model_g2p_enumerator,,1,1,1,1
Loading

0 comments on commit c9db4f7

Please sign in to comment.