diff --git a/cooperator/models/cooperative_membership.py b/cooperator/models/cooperative_membership.py index 1f5ce0394..031ad9f90 100644 --- a/cooperator/models/cooperative_membership.py +++ b/cooperator/models/cooperative_membership.py @@ -123,6 +123,7 @@ def _search_subscription_request_ids(self, operator, value): cooperator = fields.Boolean( string="Cooperator", help="Check this box if this contact is a cooperator (effective or not).", + readonly=True, copy=False, ) member = fields.Boolean( @@ -139,6 +140,7 @@ def _search_subscription_request_ids(self, operator, value): old_member = fields.Boolean( string="Old cooperator", help="Check this box if this cooperator is no more an effective member.", + readonly=True, ) share_ids = fields.One2many( "share.line", diff --git a/cooperator/models/partner.py b/cooperator/models/partner.py index 5feba21f1..82b9a662f 100644 --- a/cooperator/models/partner.py +++ b/cooperator/models/partner.py @@ -225,6 +225,7 @@ def add_cooperative_membership_field(name, field_type, **kwargs): fields.Boolean, string="Cooperator", help="Check this box if this contact is a cooperator (effective or not).", + readonly=True, ) add_cooperative_membership_field( "member", @@ -244,6 +245,7 @@ def add_cooperative_membership_field(name, field_type, **kwargs): fields.Boolean, string="Old cooperator", help="Check this box if this cooperator is no more an effective member.", + readonly=True, ) add_cooperative_membership_field( "cooperator_register_number", diff --git a/cooperator/readme/newsfragments/105.bugfix.rst b/cooperator/readme/newsfragments/105.bugfix.rst new file mode 100644 index 000000000..780613545 --- /dev/null +++ b/cooperator/readme/newsfragments/105.bugfix.rst @@ -0,0 +1,2 @@ +Fix error when creating a new contact (``res.partner``) as has been done in +version 16. diff --git a/cooperator/readme/newsfragments/105.feature.rst b/cooperator/readme/newsfragments/105.feature.rst new file mode 100644 index 000000000..566a28344 --- /dev/null +++ b/cooperator/readme/newsfragments/105.feature.rst @@ -0,0 +1 @@ +Rework ``res.partner`` form view as has been done in version 16. diff --git a/cooperator/readme/newsfragments/47.bugfix.rst b/cooperator/readme/newsfragments/47.bugfix.rst new file mode 100644 index 000000000..d09577413 --- /dev/null +++ b/cooperator/readme/newsfragments/47.bugfix.rst @@ -0,0 +1 @@ +Remove duplicated member field in ``res.partner`` form view. diff --git a/cooperator/views/res_partner_view.xml b/cooperator/views/res_partner_view.xml index 6c4f082ee..0293abafe 100644 --- a/cooperator/views/res_partner_view.xml +++ b/cooperator/views/res_partner_view.xml @@ -23,72 +23,70 @@ - - + + + + + + + + - - - - - - - - - - + @@ -115,7 +113,7 @@ @@ -203,8 +201,8 @@ Cooperators res.partner kanban,tree,form - [('cooperative_membership_ids.member', '=', True)] - {'create':False} + [("cooperative_membership_ids.member", "=", True)] + {"create": False}

Click to add a contact in your address book. @@ -223,8 +221,8 @@ ir.actions.act_window res.partner kanban,tree,form - [('coop_candidate', '=',True)] - {'create':False} + [("coop_candidate", "=", True)] + {"create": False}

@@ -244,7 +242,7 @@ ir.actions.act_window res.partner kanban,tree,form - [('representative_of_member_company','=',True)] + [("representative_of_member_company", "=", True)]