# Not possible to add party relationships in 7.0

**URL:** https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708
**Category:** User
**Created:** [November 16, 2023, 12:41pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708 "2023-11-16T12:41:37Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![rmu](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/rmu/32/83_2.png) [@rmu](https://discuss.tryton.org/u/rmu)
#### Post date: [November 16, 2023, 12:41pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/1 "2023-11-16T12:41:38Z")

</div>

Maybe I’m overlooking something simple. Installed party\_relationship in demo 7.0 database. Added relationship type plus reverse. But I can’t get the “+” button to work, adding new relationship records is disabled in party view and in party relationship view.

Tried the same in demo 6.8 and everything works as expected, i.e. I can add new relationships, delete existing ones etc…

At first glance, nothing has been changed in party\_relationship in the last development cycle, so I’m probably missing something stupid…

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [November 16, 2023, 1:02pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/2 "2023-11-16T13:02:09Z")

</div>

Maybe you hit with:

> **[New button disabled after save (#12742) · Issues · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/issues/12742)**
>
> Reproduced on demo7.0: Go to products. Press new. Fill and save. Result: The new button is disabled, and you...

---

<div class="post-metadata">

### Author: ![rmu](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/rmu/32/83_2.png) [@rmu](https://discuss.tryton.org/u/rmu)
#### Post date: [November 16, 2023, 1:54pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/3 "2023-11-16T13:54:09Z")

</div>

I can not reproduce Issue #12742 on my local installation.

party\_relationship phenomenon happens in SAO and in GTK client on local install, can be reproduced with demo7.0.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [November 16, 2023, 2:34pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/4 "2023-11-16T14:34:30Z")

</div>

This is a different issue that must be reported. Could you please create it?

The issue was introduced with [Make ModelSQL based on table query read only by default (5870e7a5b3ee) · Commits · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/commit/5870e7a5b3ee) and the problem is that we are missing an access rules for the `party.relation.all` model to allow users write on the model.

This is an easy fix, it will be great if you can provide a patch for it following [Tryton - How to Develop](https://www.tryton.org/develop)

---

<div class="post-metadata">

### Author: ![rmu](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/rmu/32/83_2.png) [@rmu](https://discuss.tryton.org/u/rmu)
#### Post date: [November 16, 2023, 2:44pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/5 "2023-11-16T14:44:13Z")

</div>

I will give it a try.

---

<div class="post-metadata">

### Author: ![rmu](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/rmu/32/83_2.png) [@rmu](https://discuss.tryton.org/u/rmu)
#### Post date: [November 16, 2023, 2:51pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/6 "2023-11-16T14:51:28Z")

</div>

Shouldn’t this be caught by the unit tests? If not, how could they be modified to catch this? Tests pass fine AFAICT.

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [November 16, 2023, 3:55pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/7 "2023-11-16T15:55:05Z")

</div>

Normall table\_query models are readonly by default, so that was improved on the recent version to make explicit when no record rules are available. This allowed to remove the access rules for most of the table models.

The party relation is a table query that should not be readonly, and this is an exception so there is no possiblity to make a generic test to catch this error.

On the other hand, if we explicity give the permissions to the model, the client will allow the users to write without any issues. So once fixes there should be no issue and we won’t need any test to validate such setup.

---

<div class="post-metadata">

### Author: ![rmu](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/rmu/32/83_2.png) [@rmu](https://discuss.tryton.org/u/rmu)
#### Post date: [November 16, 2023, 3:59pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/8 "2023-11-16T15:59:29Z")

</div>

Yes I understand. I meant specifically the party\_relationship unit tests like here [https://foss.heptapod.net/tryton/tryton/-/blob/topic/default/tutorial-create-file/modules/party\_relationship/tests/test\_module.py#L41](https://foss.heptapod.net/tryton/tryton/-/blob/topic/default/tutorial-create-file/modules/party_relationship/tests/test_module.py#L41)

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [November 16, 2023, 4:06pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/9 "2023-11-16T16:06:27Z")

</div>

For me it is not needed to just test an access configuration.  
We normally do not test access rules configuration for modules as we know that the access rules work (there is a bunch of generic tests for access rules) and once they are setup they can not be broken.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [November 16, 2023, 5:56pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/10 "2023-11-16T17:56:26Z")

</div>

See [Default access for ModelSQL based on table\_query does not follow customization (#12757) · Issues · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/issues/12757)

---

<div class="post-metadata">

### Author: ![rmu](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/rmu/32/83_2.png) [@rmu](https://discuss.tryton.org/u/rmu)
#### Post date: [November 16, 2023, 8:50pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/11 "2023-11-16T20:50:26Z")

</div>

Thanks. It seems there is nothing left to fix for me ;-), but at least I managed to get/reset my heptapod password…

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [December 16, 2023, 8:51pm UTC](https://discuss.tryton.org/t/not-possible-to-add-party-relationships-in-7-0/6708/12 "2023-12-16T20:51:16Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
