Skip to content

[19.0][IMP] commission_oca: add agents to partner list view#663

Open
JordiMForgeFlow wants to merge 1 commit intoOCA:19.0from
ForgeFlow:19.0-imp-commission_oca-agent_in_partner_tree
Open

[19.0][IMP] commission_oca: add agents to partner list view#663
JordiMForgeFlow wants to merge 1 commit intoOCA:19.0from
ForgeFlow:19.0-imp-commission_oca-agent_in_partner_tree

Conversation

@JordiMForgeFlow
Copy link
Copy Markdown
Contributor

No description provided.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @pedrobaeza,
some modules you are maintaining are being modified, check this out!

@pedrobaeza pedrobaeza added this to the 19.0 milestone Mar 3, 2026
@pedrobaeza
Copy link
Copy Markdown
Member

Any explanation about this?

@JordiMForgeFlow
Copy link
Copy Markdown
Contributor Author

JordiMForgeFlow commented Mar 3, 2026

@pedrobaeza just adding the field in the list view for visibility and usability for bulk update in the list view

@pedrobaeza
Copy link
Copy Markdown
Member

Uhm, this means to reduce the performance, as the relation table should be linked and displayed. Have you measured that? I like the mass-edition thing, but we shouldn't affect too much the performance of this critical view.

@JordiMForgeFlow
Copy link
Copy Markdown
Contributor Author

@pedrobaeza I am hiding the field by default, so it should not have that much impact right?

@pedrobaeza
Copy link
Copy Markdown
Member

Well, no, although you put optional="hide", the field is populated.

@JordiMForgeFlow
Copy link
Copy Markdown
Contributor Author

@pedrobaeza do you have any recommendations on how to measure the impact of the change to evaluate if we can add it in the base module or not?

@pedrobaeza
Copy link
Copy Markdown
Member

On a DB with populate tool to have a lot of partners, you should populate also agents (it can be a good moment to add the sql to populate them).

After that, open a profiling without that field, and showing a generous amount of partners in one shot, and do the same with the field. Then, comparing the profiling, you can measure the impact in percentage of difference.

@JordiMForgeFlow
Copy link
Copy Markdown
Contributor Author

@pedrobaeza I tested with a DB of 50000 partners and opening in one shot 10000 partners:

image

the resulting experience was very similar. Both scenarios were actually a bit slow when dealing with that amount of records. On another note, what we are adding is pretty much the same as it is happening by default with the partner tags.

@pedrobaeza
Copy link
Copy Markdown
Member

Well, all is additive, so 3 seconds more adding that field is a 20% more of time, so it's not negligible. Let's do this: create a new menu inside "Commission" section with a dedicate tree view with that multi_edit="1" attribute, and the fields you consider (name and agents, but maybe any other...), and this way, we have the best of both worlds: no penalty for usual contact view, and a way to change this massively when needed.

Useful for mass updating and having a list overview of agent relation.

Not added directly in the base list view to prevent performance issues.
@JordiMForgeFlow JordiMForgeFlow force-pushed the 19.0-imp-commission_oca-agent_in_partner_tree branch from bd08e04 to 6e899b8 Compare March 4, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants