Repository navigation
Conversation
1343d97 to
564ad38
Compare
| <xpath expr="//field[@name='category_id']" position="after"> | ||
| <field | ||
| name="owner_company_id" | ||
| options="{'no_create': True, 'no_create_edit': True}" |
There was a problem hiding this comment.
I think if it is a company, it should be invisible, following the logic in the tree view.
There was a problem hiding this comment.
I don't follow - if the field is not visible, the users won't be able to the owner company on it.
There was a problem hiding this comment.
I agree with @luisDIXMIT. We should use base.group_multi_company on owner_company_id field same as odoo does for 'company_id' field. For only one single company, no need to show this field in view.
There was a problem hiding this comment.
I understand now. Yes, that makes sense,
There was a problem hiding this comment.
I see, added a fix for that.
564ad38 to
638d82f
Compare
|
I've found one issue
Possible enhancements:
|
I will check.
That probably makes sense. |
638d82f to
f8ef94d
Compare
|
Corrections were added. |
BhaveshHeliconia
left a comment
There was a problem hiding this comment.
Now, parent contact is there, but found following issue:
If we have one parent contact having owner_company_id set(Same as current company) and its one child contact having different owner_company_id than parent and we try to search child contact using partial name and 'Search More' option from many2one dropdown, child contact is there. As per the docs, other company contacts should only be searched by full name/email/reference/VAT.
|
@BhaveshHeliconia |
BhaveshHeliconia
left a comment
There was a problem hiding this comment.
@dreispt I agree with you on disabling/hiding the owner_company_id field for child contacts. However, I think its value should still be synced from the parent contact (parent_id.owner_company_id) to keep the data consistent.
Also, could you please confirm whether the following behaviour is expected?
- We have two contacts with different
owner_company_idvalues:ContactAandContactB. - Each contact has one child contact with the same
owner_company_idas its parent:ChildAandChildB. - We then set
ContactA'sowner_company_idto the current company and go to the Sale Order's Customer field dropdown. - In the dropdown, we can search for
ContactAandChildAusing a partial name, whileContactBandChildBrequire a full name search. This seems to be the expected behaviour according to the documentation. - However, when we click Search More and perform the same partial-name search, all contacts are returned.
Could you please confirm whether this is the intended behaviour of the module or if it is a bug that should be fixed?
If this is intentional, I think it would be helpful to mention this behaviour explicitly in the documentation.
|
Indeed, the implementation applies for name search only. I agree it would be better for childs to inherit the parent owner_id automatically, and that the doc could be improved as you describe. |
|
Okay, thanks for the info. Rest looks good to me. Just doc update and we're good to go. |
Add soft company ownership for contacts without imposing access restrictions. Filter dropdown autocomplete by owner company, with an exact-match fallback for contacts owned by other companies. Document that Search More and the Contacts list do not apply owner-company filtering, as clarified during review. Assisted-by: Devin:GPT-6.1
e61198b to
ba91c12
Compare
Child contacts could store a different owner from their parent, making stored ownership and company grouping inconsistent with dropdown searches. Creating a child or changing its parent did not inherit the parent owner, and changes to the parent owner did not reach existing children. Resolve the top-level contact once and update its direct children. Their writes recursively propagate ownership down the hierarchy without restarting from the root. Include archived children and update every child so stale descendants under consistent intermediates are repaired. Make child ownership read-only. Detaching a contact retains its last inherited owner so it can then be managed independently. Add seven acceptance tests covering inheritance, propagation, clearing, reparenting, child overrides, batch updates, dropdown behavior, and root-based repair of legacy ownership. Failing regressions were confirmed before implementation; all seven tests pass on Odoo 17. Focused pre-commit checks also pass. Assisted-by: Devin:GPT-6.1 Assisted-by: Devin:SWE-2 Flash Max
ae1c9d1 to
e86bba6
Compare
|
Docs were updated. |
The list view hid the owner company cell for every company contact, but company contacts can have a parent and inherit an owner company just like any other child contact. The form view already shows the value, so the list view hid information that is meaningful for child companies. Drop the invisible condition so the column behaves the same for all contacts. Assisted-by: Devin:SWE-2 Flash Medium


No description provided.