Skip to content

Comments

Add missing hook to print common object lines#33302

Closed
atm-etienne wants to merge 2 commits intoDolibarr:17.0from
atm-etienne:fix/17.0/add-missing-lines-hook
Closed

Add missing hook to print common object lines#33302
atm-etienne wants to merge 2 commits intoDolibarr:17.0from
atm-etienne:fix/17.0/add-missing-lines-hook

Conversation

@atm-etienne
Copy link
Contributor

FIX - Add missing hook to replace default lines list on Common Object card

On common object cards, there is a list of object lines (invoice lines, for example), which can be modified with a hook for the title line of the list, or a hook executed on each line.

However, there is no hook to completely replace this list.
Some objects have several hundred or even thousands of lines, which prevents the object's card from loading. We therefore need to be able to replace this list to enable the card to be displayed, and custom the list.

@eldy
Copy link
Member

eldy commented Mar 3, 2025

Such hook "printObjectLinesList" was never introduced in v17 (can't find in v21 either)
If this is a new need, thanks to push in develop.

@eldy eldy added Discussion Some questions or discussions are opened and wait answers of author or other people to be processed PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason) and removed Discussion Some questions or discussions are opened and wait answers of author or other people to be processed labels Mar 3, 2025
@eldy eldy changed the base branch from 17.0 to develop March 6, 2025 12:55
@eldy eldy changed the base branch from develop to 17.0 March 6, 2025 12:56
@atm-etienne
Copy link
Contributor Author

@eldy I see you changed the base branche from 17.0 to develop, then you revert it.
What should I do so?

@eldy
Copy link
Member

eldy commented Mar 13, 2025

@eldy I see you changed the base branche from 17.0 to develop, then you revert it.
What should I do so?

Repush in develop if not already present (changing myself generates too conflict).
Or close the pr if already in develop.


$parameters = array('num'=>$num, 'dateSelector'=>$dateSelector, 'seller'=>$seller, 'buyer'=>$buyer, 'selected'=>$selected, 'table_element_line'=>$this->table_element_line);
$reshook = $hookmanager->executeHooks('printObjectLineTitle', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
$parameters = array();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello, maybe you can pass some parameters to the hook (seller, buyer...) ?

@Vaadasch
Copy link
Contributor

Vaadasch commented Mar 31, 2025

PR pulled anew in #33641 ?
If confirmed, can this one be closed ?

@eldy
Copy link
Member

eldy commented Mar 31, 2025

Yes, replaced by the new PR

@eldy eldy closed this Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants