From 2eeca733072d8cd01be7945d9011837b58dd7e39 Mon Sep 17 00:00:00 2001 From: Edwin Gonzales Date: Thu, 1 Feb 2024 17:47:59 +0800 Subject: [PATCH 1/2] Fix issues with change_request --- spp_change_request/__manifest__.py | 5 +++-- spp_change_request/models/change_request.py | 4 ++-- spp_change_request/security/ir.model.access.csv | 14 -------------- .../__manifest__.py | 3 ++- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/spp_change_request/__manifest__.py b/spp_change_request/__manifest__.py index e6371066..521f5574 100644 --- a/spp_change_request/__manifest__.py +++ b/spp_change_request/__manifest__.py @@ -24,8 +24,6 @@ "spp_area", "spp_scan_id_document", "dms_field", - "spp_idqueue", - "spp_event_data", ], "data": [ "security/change_request_security.xml", @@ -59,3 +57,6 @@ "installable": True, "auto_install": False, } + +# "spp_idqueue", +# "spp_event_data", diff --git a/spp_change_request/models/change_request.py b/spp_change_request/models/change_request.py index ee01c2a7..96c5a1a6 100644 --- a/spp_change_request/models/change_request.py +++ b/spp_change_request/models/change_request.py @@ -67,7 +67,7 @@ class ChangeRequestBase(models.Model): "Applicant", domain=[("is_registrant", "=", True), ("is_group", "=", False)], ) #: Applicant who submitted the change request (In case the registrant is a group, the applicant is the individual) - applicant_id_domain = fields.Char( + applicant_id_domain = fields.Binary( compute="_compute_applicant_id_domain", readonly=True, store=False, @@ -233,7 +233,7 @@ def _compute_applicant_id_domain(self): if group_memberships: group_membership_ids = group_memberships.mapped("individual.id") domain = [("id", "in", group_membership_ids)] - rec.applicant_id_domain = json.dumps(domain) + rec.applicant_id_domain = domain @api.onchange("registrant_id") def _onchange_registrant_id(self): diff --git a/spp_change_request/security/ir.model.access.csv b/spp_change_request/security/ir.model.access.csv index 8277b895..570f4755 100644 --- a/spp_change_request/security/ir.model.access.csv +++ b/spp_change_request/security/ir.model.access.csv @@ -31,7 +31,6 @@ spp_change_request_g2p_group_membership_kind_validator,G2P Group Membership Kind spp_change_request_g2p_reg_rel_validator,G2P Registry Relationship CR Validator Access,g2p_registry_base.model_g2p_reg_rel,spp_change_request.group_spp_change_request_validator,1,1,1,0 spp_change_request_g2p_phone_number_validator,G2P Phone Number CR Validator Access,g2p_registry_base.model_g2p_phone_number,spp_change_request.group_spp_change_request_validator,1,1,1,0 spp_change_request_g2p_reg_id_validator,G2P Registrant ID CR Validator Access,g2p_registry_base.model_g2p_reg_id,spp_change_request.group_spp_change_request_validator,1,1,1,0 -spp_change_request_event_data_validator,SPP Event Data CR Validator Access,spp_event_data.model_spp_event_data,spp_change_request.group_spp_change_request_validator,1,0,0,0 spp_change_request_cancel_wizard_validator,Change Request Cancel Validator Access,spp_change_request.model_spp_change_request_cancel_wizard,spp_change_request.group_spp_change_request_validator,1,1,1,1 spp_dms_storage_validator,SPP DMS Storage Validator Access,dms.model_dms_storage,spp_change_request.group_spp_change_request_validator,1,0,0,0 @@ -45,8 +44,6 @@ spp_ir_model_validator,SPP IR Model Validator Access,base.model_ir_model,spp_cha spp_ir_model_fields_validator,SPP IR Model Fields Validator Access,base.model_ir_model_fields,spp_change_request.group_spp_change_request_validator,1,0,0,0 spp_ir_sequence_validator,SPP IR Sequence Validator Access,base.model_ir_sequence,spp_change_request.group_spp_change_request_validator,1,0,0,0 -spp_idqueue_validator,SPP ID Queue Validator Access,spp_idqueue.model_spp_print_queue_id,spp_change_request.group_spp_change_request_validator,1,1,1,0 - spp_change_request_hq_validator,Change Request HQ Validator Access,spp_change_request.model_spp_change_request,spp_change_request.group_spp_change_request_hq_validator,1,1,0,0 spp_change_request_validators_hq_validator,Change Request HQ Validator Applicator Access,spp_change_request.model_spp_change_request_validators,spp_change_request.group_spp_change_request_hq_validator,1,1,1,0 spp_change_request_validation_sequence_hq_validator,Change Request HQ Validator Sequence Applicator Access,spp_change_request.model_spp_change_request_validation_sequence,spp_change_request.group_spp_change_request_hq_validator,1,1,1,0 @@ -61,7 +58,6 @@ spp_change_request_g2p_group_membership_kind_hq_validator,G2P Group Membership K spp_change_request_g2p_reg_rel_hq_validator,G2P Registry Relationship CR HQ Validator Access,g2p_registry_base.model_g2p_reg_rel,spp_change_request.group_spp_change_request_hq_validator,1,0,0,0 spp_change_request_g2p_phone_number_hq_validator,G2P Phone Number CR HQ Validator Access,g2p_registry_base.model_g2p_phone_number,spp_change_request.group_spp_change_request_hq_validator,1,1,1,0 spp_change_request_g2p_reg_id_hq_validator,G2P Registrant ID CR HQ Validator Access,g2p_registry_base.model_g2p_reg_id,spp_change_request.group_spp_change_request_hq_validator,1,1,1,0 -spp_change_request_event_data_hq_validator,SPP Event Data CR HQ Validator Access,spp_event_data.model_spp_event_data,spp_change_request.group_spp_change_request_hq_validator,1,0,0,0 spp_change_request_cancel_wizard_hq_validator,Change Request Cancel HQ Validator Access,spp_change_request.model_spp_change_request_cancel_wizard,spp_change_request.group_spp_change_request_hq_validator,1,1,1,1 spp_dms_storage_hq_validator,SPP DMS Storage HQ Validator Access,dms.model_dms_storage,spp_change_request.group_spp_change_request_hq_validator,1,0,0,0 @@ -75,8 +71,6 @@ spp_ir_model_hq_validator,SPP IR Model HQ Validator Access,base.model_ir_model,s spp_ir_model_fields_hq_validator,SPP IR Model Fields HQ Validator Access,base.model_ir_model_fields,spp_change_request.group_spp_change_request_hq_validator,1,0,0,0 spp_ir_sequence_hq_validator,SPP IR Sequence HQ Validator Access,base.model_ir_sequence,spp_change_request.group_spp_change_request_hq_validator,1,1,1,0 -spp_idqueue_hq_validator,SPP ID Queue HQ Validator Access,spp_idqueue.model_spp_print_queue_id,spp_change_request.group_spp_change_request_hq_validator,1,1,1,0 - spp_change_request_administrator,Change Request Administrator Access,spp_change_request.model_spp_change_request,spp_change_request.group_spp_change_request_administrator,1,1,0,0 spp_change_request_validators_administrator,Change Request Validators Administrator Access,spp_change_request.model_spp_change_request_validators,spp_change_request.group_spp_change_request_administrator,1,1,1,0 spp_change_request_validation_sequence_administrator,Change Request Validation Sequence Administrator Access,spp_change_request.model_spp_change_request_validation_sequence,spp_change_request.group_spp_change_request_administrator,1,1,1,0 @@ -91,7 +85,6 @@ spp_change_request_g2p_group_membership_kind_administrator,G2P Group Membership spp_change_request_g2p_reg_rel_administrator,G2P Registry Relationship CR Administrator Access,g2p_registry_base.model_g2p_reg_rel,spp_change_request.group_spp_change_request_administrator,1,1,1,0 spp_change_request_g2p_phone_number_administrator,G2P Phone Number CR Administrator Access,g2p_registry_base.model_g2p_phone_number,spp_change_request.group_spp_change_request_administrator,1,1,1,0 spp_change_request_g2p_reg_id_administrator,G2P Registrant ID CR Administrator Access,g2p_registry_base.model_g2p_reg_id,spp_change_request.group_spp_change_request_administrator,1,1,1,0 -spp_change_request_event_data_administrator,SPP Event Data CR Administrator Access,spp_event_data.model_spp_event_data,spp_change_request.group_spp_change_request_administrator,1,1,1,0 spp_change_request_cancel_wizard_administrator,Change Request Cancel Administrator Access,spp_change_request.model_spp_change_request_cancel_wizard,spp_change_request.group_spp_change_request_administrator,1,1,1,1 spp_dms_storage_administrator,SPP DMS Storage Administrator Access,dms.model_dms_storage,spp_change_request.group_spp_change_request_administrator,1,1,1,0 @@ -105,8 +98,6 @@ spp_ir_model_administrator,SPP IR Model Administrator Access,base.model_ir_model spp_ir_model_fields_administrator,SPP IR Model Fields Administrator Access,base.model_ir_model_fields,spp_change_request.group_spp_change_request_administrator,1,0,0,0 spp_ir_sequence_administrator,SPP IR Sequence Administrator Access,base.model_ir_sequence,spp_change_request.group_spp_change_request_administrator,1,1,1,0 -spp_idqueue_administrator,SPP ID Queue Administrator Access,spp_idqueue.model_spp_print_queue_id,spp_change_request.group_spp_change_request_administrator,1,1,1,0 - spp_change_request_applicator,Change Request Applicator Access,spp_change_request.model_spp_change_request,spp_change_request.group_spp_change_request_applicator,1,1,0,0 spp_change_request_validators_applicator,Change Request Validators Applicator Access,spp_change_request.model_spp_change_request_validators,spp_change_request.group_spp_change_request_applicator,1,1,1,0 spp_change_request_validation_sequence_applicator,Change Request Validation Sequence Applicator Access,spp_change_request.model_spp_change_request_validation_sequence,spp_change_request.group_spp_change_request_applicator,1,1,1,0 @@ -121,7 +112,6 @@ spp_change_request_g2p_group_membership_kind_applicator,G2P Group Membership Kin spp_change_request_g2p_reg_rel_applicator,G2P Registry Relationship CR Applicator Access,g2p_registry_base.model_g2p_reg_rel,spp_change_request.group_spp_change_request_applicator,1,0,0,0 spp_change_request_g2p_phone_number_applicator,G2P Phone Number CR Applicator Access,g2p_registry_base.model_g2p_phone_number,spp_change_request.group_spp_change_request_applicator,1,1,1,0 spp_change_request_g2p_reg_id_applicator,G2P Registrant ID CR Applicator Access,g2p_registry_base.model_g2p_reg_id,spp_change_request.group_spp_change_request_applicator,1,1,1,0 -spp_change_request_event_data_applicator,SPP Event Data CR Applicator Access,spp_event_data.model_spp_event_data,spp_change_request.group_spp_change_request_applicator,1,0,0,0 spp_change_request_cancel_wizard_applicator,Change Request Cancel Applicator Access,spp_change_request.model_spp_change_request_cancel_wizard,spp_change_request.group_spp_change_request_applicator,1,1,1,1 spp_dms_storage_applicator,SPP DMS Storage Applicator Access,dms.model_dms_storage,spp_change_request.group_spp_change_request_applicator,1,0,0,0 @@ -135,8 +125,6 @@ spp_ir_model_applicator,SPP IR Model Applicator Access,base.model_ir_model,spp_c spp_ir_model_fields_applicator,SPP IR Model Fields Applicator Access,base.model_ir_model_fields,spp_change_request.group_spp_change_request_applicator,1,0,0,0 spp_ir_sequence_applicator,SPP IR Sequence Applicator Access,base.model_ir_sequence,spp_change_request.group_spp_change_request_applicator,1,1,1,0 -spp_idqueue_applicator,SPP ID Queue Applicator Access,spp_idqueue.model_spp_print_queue_id,spp_change_request.group_spp_change_request_applicator,1,1,1,0 - spp_change_request_agent,Change Request Agent Access,spp_change_request.model_spp_change_request,spp_change_request.group_spp_change_request_agent,1,1,1,1 spp_change_request_validators_agent,Change Request Validators Agent Access,spp_change_request.model_spp_change_request_validators,spp_change_request.group_spp_change_request_agent,1,1,1,0 spp_change_request_validation_sequence_agent,Change Request Validation Sequence Agent Access,spp_change_request.model_spp_change_request_validation_sequence,spp_change_request.group_spp_change_request_agent,1,1,1,0 @@ -149,7 +137,6 @@ spp_change_request_g2p_group_membership_kind_agent,G2P Group Membership Kind Age spp_change_request_g2p_reg_rel_agent,G2P Registry Relationship CR Agent Access,g2p_registry_base.model_g2p_reg_rel,spp_change_request.group_spp_change_request_agent,1,0,0,0 spp_change_request_g2p_phone_number_agent,G2P Phone Number CR Agent Access,g2p_registry_base.model_g2p_phone_number,spp_change_request.group_spp_change_request_agent,1,0,0,0 spp_change_request_g2p_reg_id_agent,G2P Registrant ID CR Agent Access,g2p_registry_base.model_g2p_reg_id,spp_change_request.group_spp_change_request_agent,1,0,0,0 -spp_change_request_event_data_agent,SPP Event Data CR Agent Access,spp_event_data.model_spp_event_data,spp_change_request.group_spp_change_request_agent,1,0,0,0 spp_dms_storage_agent,SPP DMS Storage Agent Access,dms.model_dms_storage,spp_change_request.group_spp_change_request_agent,1,1,1,0 spp_dms_directory_agent,SPP DMS Directory Agent Access,dms.model_dms_directory,spp_change_request.group_spp_change_request_agent,1,1,1,0 @@ -163,6 +150,5 @@ spp_ir_model_fields_agent,SPP IR Model Fields Agent Access,base.model_ir_model_f spp_ir_sequence_agent,SPP IR Sequence Agent Access,base.model_ir_sequence,spp_change_request.group_spp_change_request_agent,1,0,0,0 spp_change_request_cancel_wizard_agent,Change Request Cancel Agent Access,spp_change_request.model_spp_change_request_cancel_wizard,spp_change_request.group_spp_change_request_agent,1,1,1,1 -spp_idqueue_requestor,SPP ID Queue Agent Access,spp_idqueue.model_spp_print_queue_id,spp_change_request.group_spp_change_request_agent,1,1,1,0 spp_change_request_user_assign_wizard_agent,Change Request User Assignment Agent Access,spp_change_request.model_spp_change_request_user_assign_wizard,spp_change_request.group_spp_change_request_agent,1,1,1,0 diff --git a/spp_change_request_add_children_demo/__manifest__.py b/spp_change_request_add_children_demo/__manifest__.py index eed92f39..e4af068e 100644 --- a/spp_change_request_add_children_demo/__manifest__.py +++ b/spp_change_request_add_children_demo/__manifest__.py @@ -22,7 +22,6 @@ "data/dms.xml", "data/change_request_stage.xml", "data/change_request_sequence.xml", - "data/id_type.xml", "views/change_request_add_children_view.xml", ], "assets": {}, @@ -32,3 +31,5 @@ "installable": True, "auto_install": False, } + +# "data/id_type.xml", From 4a5b45b59d3ef0b19aba78f38223febc3540262a Mon Sep 17 00:00:00 2001 From: Edwin Gonzales Date: Fri, 2 Feb 2024 13:59:49 +0800 Subject: [PATCH 2/2] Fix UI layout required by Odoo17 XML form layout --- .../views/change_request_view.xml | 180 +++++++++++------- .../change_request_add_children_view.xml | 132 ++++++++----- 2 files changed, 194 insertions(+), 118 deletions(-) diff --git a/spp_change_request/views/change_request_view.xml b/spp_change_request/views/change_request_view.xml index 4ff384f3..dceb8dd1 100644 --- a/spp_change_request/views/change_request_view.xml +++ b/spp_change_request/views/change_request_view.xml @@ -181,7 +181,7 @@ Part of OpenSPP. See LICENSE file for full copyright and licensing details. readonly="state != 'draft' or request_type_ref_id" class="oe_inline" /> - + /> -->