-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove ref_id to replace with unique_id.
- Loading branch information
Showing
18 changed files
with
274 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Part of OpenG2P Registry. See LICENSE file for full copyright and licensing details. | ||
from . import models | ||
|
||
|
||
def post_init_hook(env): | ||
partners = env["res.partner"].search([("is_registrant", "=", True), ("ref_id", "=", False)]) | ||
partners = env["res.partner"].search([("is_registrant", "=", True), ("unique_id", "=", False)]) | ||
for partner in partners: | ||
env["g2p.pending.reference_id"].create({"registrant_id": partner.id, "status": "failed"}) | ||
env["g2p.pending.reference_id"].create({"registrant_id": partner.id, "id_generation_request_status": "pending", | ||
"id_generation_update_status": "not_applicable"}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# Part of OpenG2P. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import region | ||
from . import ref_id_config | ||
from . import res_config_settings | ||
from . import registrant | ||
from . import pending_ref_id | ||
from . import g2p_que_id_generation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
from odoo import models, fields, api | ||
from datetime import datetime | ||
|
||
|
||
class G2PQueIDGeneration(models.Model): | ||
_name = "g2p.que.id.generation" | ||
_description = "G2P Queue ID Generation" | ||
|
||
registrant_id = fields.Char( | ||
string="Registrant ID", | ||
required=True, | ||
unique=True, | ||
) | ||
|
||
id_generation_request_status = fields.Selection( | ||
selection=[ | ||
('pending', 'Pending'), | ||
('approved', 'Approved'), | ||
('rejected', 'Rejected'), | ||
], | ||
string="ID Generation Request Status", | ||
required=True, | ||
default='pending', | ||
) | ||
|
||
id_generation_update_status = fields.Selection( | ||
selection=[ | ||
('not_applicable', 'Not Applicable'), | ||
('in_progress', 'In Progress'), | ||
('completed', 'Completed'), | ||
], | ||
string="ID Generation Update Status", | ||
required=True, | ||
default='not_applicable', | ||
) | ||
|
||
queued_datetime = fields.Datetime( | ||
string="Queued Datetime", | ||
required=True, | ||
default=fields.Datetime.now, | ||
) | ||
|
||
number_of_attempts_request = fields.Integer( | ||
string="Number of Attempts (Request)", | ||
required=True, | ||
default=0, | ||
) | ||
|
||
number_of_attempts_update = fields.Integer( | ||
string="Number of Attempts (Update)", | ||
required=True, | ||
default=0, | ||
) | ||
|
||
last_attempt_error_code_request = fields.Char( | ||
string="Last Attempt Error Code (Request)" | ||
) | ||
|
||
last_attempt_error_code_update = fields.Char( | ||
string="Last Attempt Error Code (Update)" | ||
) | ||
|
||
last_attempt_datetime_request = fields.Datetime( | ||
string="Last Attempt Datetime (Request)" | ||
) | ||
|
||
last_attempt_datetime_update = fields.Datetime( | ||
string="Last Attempt Datetime (Update)" | ||
) | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# Part of OpenG2P Social Registry. See LICENSE file for full copyright and licensing details. | ||
|
||
from . import test_ref_id_config | ||
from . import test_res_config_settings | ||
from . import test_pending_ref_id | ||
from . import test_g2p_que_id_generation |
Oops, something went wrong.